https://serverless-stack.com/ logo
#sst
Title
# sst
a

Adrián Mouly

10/12/2021, 12:15 AM
Hey guys… I’m using
StaticSite
for one site, and
ReactSite
for other sites… I’ve noticed that when the frontend is updated, the app is pushed again, and the previous is deleted… that maybe makes sense, due is uploading a whole new build… BUT… there is sone downtime when this happens, and we get 404 xml-error from CF…. Is this the intended behavior? maybe makes sense to me, but wouldn’t be better to upload new build, and then switch the DNS and delete old build? Let me know which should be the intended behavior, because my current setup is kind of weird.
t

thdxr

10/12/2021, 12:24 AM
I noticed this a few days ago talked to frank about this. @Frank did you have a specific fix for this?
j

Jack Fraser

10/12/2021, 6:42 AM
Would it make more sense for an existing deployed StaticSite when updated to just upload the built assets to the distribution’s S3 bucket and the cloudfront cache invalidated? Would be lots faster.
p

Phil Astle

10/12/2021, 8:22 AM
Might need to do some comparisons first, to check they're the only changes? Uploading StaticSites is painfully slow atm - takes way longer than the other constructs. If there was a way to speed this up it would be much appreciated!
a

Adrián Mouly

10/12/2021, 2:40 PM
There is a way to compare with Lerna.
In my case, for some reason the ReactSite is detecting changes, but not when using StaticSite.
Maybe it’s a problem of how my
build
on each site works.
But anyway, we need the “no timeout” thing.
f

Frank

10/12/2021, 4:59 PM
Hey guys, I’m working on a fix for this, will release today!
a

Adrián Mouly

10/12/2021, 5:00 PM
Thanks @Frank, what’s the fix?
f

Frank

10/12/2021, 5:00 PM
Right now the CF distribution is invalidated too early, before the S3 assets are completely uploaded.
It was fixed in the
NextjsSite
construct, I’m going to apply the same fix here.
a

Adrián Mouly

10/12/2021, 7:17 PM
Thanks Frank.
@Frank updates on this? 😄
f

Frank

10/14/2021, 4:25 AM
Just released v0.46.1 with the fix 😁