Skip to content

[Bug]: EW stage pages don't load correctly  #2047

Open

Description

@ioanarusiczki

What happened?

While looking over mozilla/addons-server#23260 (comment)

From -dev or -stage https://extensionworkshop.allizom.org/ is not loading content

What did you expect to happen?

Looking in the Console there's lots of CSP errors

This is only reproducible from -dev/stage
Prod is fine

Activity

  1. added theissue type on Apr 8, 2025
  2. changed the title [-][Bug]: EW pages don't load correctly[/-] [+][Bug]: EW stage pages don't load correctly [/+] on Apr 8, 2025
  3. diox commented on Apr 8, 2025

    @diox
    Member

    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, 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.

    HTML files were uploaded by this deploy script:

    # evertying else in bucket.

    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" 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.

  4. diox commented on Apr 8, 2025

    @diox
    Member

    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.

  5. transferred this issue frommozilla/addonson Apr 8, 2025
  6. added theissue type on Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions