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

ci(stage,prod): skip /static when syncing rest of build #8784

Merged
merged 2 commits into from
May 8, 2023

Conversation

caugner
Copy link
Contributor

@caugner caugner commented May 5, 2023

Summary

Fixes #8752.

Problem

We're seeing 404s on /static/js/main.*.js for about 10-15 minutes during deployment, because the static assets do not seem to be available when the first updated HTML files are served from the CDN.

Solution

Sync the build in three passes:

  1. Copy the static assets first (we already do this).
  2. Sync the build completely (without deleting extra files).
  3. Sync the build again (and delete extra files)

Skip /static (which is copied separately first) when rsyncing the rest of the build (and deleting extra files).


How did you test this change?

Will trigger a stage build to see what impact on runtime this has.

@caugner caugner requested a review from fiji-flo May 5, 2023 16:40
@caugner caugner temporarily deployed to stage May 5, 2023 16:41 — with GitHub Actions Inactive
@caugner caugner changed the title ci(stage,prod): sync everything before deleting extra files ci(stage,prod): skip /static when syncing rest of build May 5, 2023
@caugner caugner temporarily deployed to stage May 5, 2023 17:30 — with GitHub Actions Inactive
Copy link
Contributor

@fiji-flo fiji-flo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 great

@fiji-flo fiji-flo merged commit 9c28eb6 into main May 8, 2023
@fiji-flo fiji-flo deleted the sync-before-deleting-extra-files branch May 8, 2023 09:11
fiji-flo added a commit that referenced this pull request May 8, 2023
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.

Static JS/CSS temporarily not found (HTTP 404) during deployment
2 participants