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
[StaticSite]: Please make atomic deploys 'optional' #1100
Comments
I've debated on how best to handle this myself (Dev/Preview environments, mostly around the Next construct, but it's a similar concept). I am not intimately familiar with the particulars of implementation, so I could be wrong below. I think I have mostly settled my own opinion on that this should likely be another construct that shares a bit of functionality with the main construct. It changes the deployment pretty fundamentally, and if you tried to change the setting from one to another, it could rapidly become VERY complex, especially in the more complex constructs (like Next). I do, however, like the idea of a "throwaway" deploy using CFn. I think using SDK only could get tedious. |
For what its worth.. we've been doing our frontend code deploy non-atomically for years for dev/feat without issue. Just have a boolean on
|
I worry about how the atomic deploy would check if there were any non-atomic deploys...but it's possible that doesnt matter and there would just be random files in the root of the bucket. The other direction does indeed seem simpler, as you can just delete it all. A new construct would just avoid any of these complications and doesnt really have a downside (at least that I can see). |
@dkershner6 Not sure what the scenario is that "atomic deploy would check if there were any non-atomic deploys"? There would only ever be two kinds of stacks:
Never would there be a stack/bucket that has both. |
I understood your use case, but to suggest these things are true you would either need:
Cfn is not a fan of the honor system. ;) I agree with you on |
Ok, I see the scenario now. Just a way to ensure that IF someone changed the setting after deploy.... what would happen. |
I believe Detecting the change is another issue as well though, as you don't really have access to "previous" that I know of without building something custom. Regardless, I'm now out of my depth and I'll let the pros answer those ones. |
Currently, each time even when the smallest copy change is made to our frontend code, SST needs to update the
deployId
in the CF Distro which costs a minimum of +6mins of replication time.This is fine for a production deploy, but for a dev/feat deploy it would be ideal to choose to disable it and instead just do a simple
aws s3 sync --delete
to push all files into the root of the bucket and delete any orphans. This would result is much faster non-prod deploys.Somewhat related to #1099
The text was updated successfully, but these errors were encountered: