You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML files were uploaded with the wrong CSP and caching headers. This not only breaks the site, but poisons the cache as well, because we set cache-control: max-age=31536000, immutable on those files. If that were to happen in prod, that would be terrible, impossible to recover from without asking every visitor to hard-refresh once the problem is fixed.
We can see that html files are rsynced with the right headers... and then overwritten by the "catch-all" last rsync, which is not supposed to happen. Under normal, working circumstances, the only thing that prevents that from happening is the fact that rsync shouldn't overwrite files that haven't changed, but this is super fragile, and this issue is the proof that it can fail.
We should add some exclusions to the last rsync step in that deploy script to ensure it doesn't accidentally overwrites .html, .svg and .js files that it should already have uploaded during previous steps.
One suspicion I have is that it's more likely to happen when we do several deploys (commits) in quick succession. Which is more likely to happen on dev. On top of fixing the deploy, we should prevent concurrent deploy in GitHub Actions.
Activity
[-][Bug]: EW pages don't load correctly[/-][+][Bug]: EW stage pages don't load correctly [/+]diox commentedon Apr 8, 2025
Summary of discussion on slack:
HTML files were uploaded with the wrong CSP and caching headers. This not only breaks the site, but poisons the cache as well, because we set
cache-control: max-age=31536000, immutableon those files. If that were to happen in prod, that would be terrible, impossible to recover from without asking every visitor to hard-refresh once the problem is fixed.HTML files were uploaded by this deploy script:
extension-workshop/.utils/gcs-deploy.sh
Line 83 in ca434f1
The workflow that lead to this is https://github.com/mozilla/extension-workshop/actions/runs/14238009866/job/39901250602
We can see that html files are
rsynced with the right headers... and then overwritten by the "catch-all" lastrsync, which is not supposed to happen. Under normal, working circumstances, the only thing that prevents that from happening is the fact thatrsyncshouldn't overwrite files that haven't changed, but this is super fragile, and this issue is the proof that it can fail.We should add some exclusions to the last
rsyncstep in that deploy script to ensure it doesn't accidentally overwrites.html,.svgand.jsfiles that it should already have uploaded during previous steps.diox commentedon Apr 8, 2025
One suspicion I have is that it's more likely to happen when we do several deploys (commits) in quick succession. Which is more likely to happen on dev. On top of fixing the deploy, we should prevent concurrent deploy in GitHub Actions.