Hey guys… I’m using `StaticSite` for one site, and...
# sst
a
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
I noticed this a few days ago talked to frank about this. @Frank did you have a specific fix for this?
j
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
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
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
Hey guys, I’m working on a fix for this, will release today!
a
Thanks @Frank, what’s the fix?
f
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
Thanks Frank.
@Frank updates on this? 😄
f
Just released v0.46.1 with the fix 😁