Skip to content
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

fix(gcp): cache volatile content for 1h #9050

Merged
merged 2 commits into from
Jun 9, 2023
Merged

Conversation

LeoMcA
Copy link
Member

@LeoMcA LeoMcA commented Jun 8, 2023

disable cdn invalidation by default in the build - it doesn't really
work in gcp: even after waiting the ~20 minutes it takes to "finish",
content is still cached for certain users in certain geos - but keep
the option for manual use in exceptional circumstances

Summary

https://mozilla-hub.atlassian.net/browse/MP-440

Problem

  • cdn invalidation doesn't work well (or at all) in gcp

Solution

  • stop using invalidation, set caching header to 1h on volatile content (i.e. content which doesn't have a hash in its path)

How did you test this change?

I haven't yet, and I need help learning how :)
@caugner we'll peer review/test this tomorrow

https://mozilla-hub.atlassian.net/browse/MP-440

disable cdn invalidation by default in the build - it doesn't really
work in gcp: even after waiting the ~20 minutes it takes to "finish",
content is still cached for certain users in certain geos - but keep
the option for manual use in exceptional circumstances
@LeoMcA LeoMcA requested a review from caugner June 8, 2023 16:31
@LeoMcA
Copy link
Member Author

LeoMcA commented Jun 8, 2023

I also couldn't fully figure out what this cache header set, or if it was relevant at all - to discuss tomorrow:

gsutil -q -m -h "Cache-Control: public, max-age=86400" cp -r client/build/static gs://${{ vars.GCP_BUCKET_NAME }}/main/

@LeoMcA LeoMcA temporarily deployed to xyz June 9, 2023 11:16 — with GitHub Actions Inactive
@LeoMcA LeoMcA merged commit 78c6e35 into main Jun 9, 2023
@LeoMcA LeoMcA deleted the mp-440-1h-volatile-caching branch June 9, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants