Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync / Clear bucket before uploading? #74

Open
andrewmartin opened this issue Jun 17, 2017 · 17 comments
Open

Sync / Clear bucket before uploading? #74

andrewmartin opened this issue Jun 17, 2017 · 17 comments

Comments

@andrewmartin
Copy link

andrewmartin commented Jun 17, 2017

I have a really quick question; is there an option to sync the assets up, e.g. clean the S3 bucket before I upload? Just curious how you might handle asset revving to clear out the old assets to keep the bucket clean. Sorry if I missed something obvious, thanks again for your wonderful work on this. Using it in production with great success!

Cheers.

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • [ x ] I have read and understood this plugin's README
  • [ x ] If filing a bug report, I have included my version of node and s3-plugin-webpack
  • [ x ] If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • [ x ] If filing a bug report, I have included a minimal test case that reproduces
    my issue.
  • [ x ] I understand this is an open-source project staffed by someone with a job and
    that any help I receive is done on free time. I know I am not entitled to anything and will be polite and courteous.
  • [ x ] I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps or the issue is not with the library itself

Thank you for adhering to this process! This ensures that I can pay attention to issues that are relevant and answer questions faster.

@MikaAK
Copy link
Owner

MikaAK commented Jun 17, 2017

Honestly when releasing for prod you usually want to use a hash on the end of your filenames to cache bust. I'm fairly certain this will override the old files though

@andrewmartin
Copy link
Author

andrewmartin commented Jun 17, 2017 via email

@MikaAK
Copy link
Owner

MikaAK commented Jun 17, 2017

Sadly no, though I would totally accept a pr with one since I could see this being useful! I can of course add it later on too

@andrewmartin
Copy link
Author

andrewmartin commented Jun 17, 2017 via email

@wootencl
Copy link

@andrewmartin Out of curiosity, did you ever come up with a solution? Dealing with this exact same issue.

@andrewmartin
Copy link
Author

@wootencl I got sidetracked on it, ended up leaving it for now. Would love to hear if you / anyone came up with a solution...

@gertjanwytynck
Copy link

Does someone has a solution for this issue?

@MikaAK
Copy link
Owner

MikaAK commented Aug 20, 2018

Nothing yet, PR's welcome!

@Birowsky
Copy link

Birowsky commented Oct 30, 2018

A napkin note to whoever decides to roll up sleeves for this: in order to achieve zero downtime, deletion of the old/obsolete S3 objects would need to happen after the upload of the new ones, not before.

@dejanvasic85
Copy link

dejanvasic85 commented Dec 12, 2018

Made an attempt on this here and seems to work just fine.

A napkin note to whoever decides to roll up sleeves for this: in order to achieve zero downtime, deletion of the old/obsolete S3 objects would need to happen after the upload of the new ones, not before.

Spot on. We are using Circle CI so this is dockerized and just runs after the deployment completes to ensure no downtime. Let me know if you guys are interested, and I can move this code inside the plugin with a config (default to false):

s3Options: {
   cleanAfterDeployment: true
}

@Birowsky
Copy link

@dejanvasic85 I would looooove to have this feature in the plugin!

@MikaAK
Copy link
Owner

MikaAK commented Dec 13, 2018

@dejanvasic85 A PR is welcome!

@Turbotailz
Copy link

2 years later, still no PR?

@coopersamuel
Copy link

Any news on this?

@bfagundez
Copy link

This would be nice!

@MikaAK
Copy link
Owner

MikaAK commented Dec 15, 2020

2 years later, still no PR?

Maybe a good opportunity to do some OSS work 😉

@dejanvasic85
Copy link

Hey there, I came across needing to use this tool again. Got a branch to cater for a sync option but when I push the branch I am getting access denied @MikaAK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants