fix(caching): Prevent stale JS bundles with cache control headers - #4105
sentry[bot] wants to merge 1 commit into
Conversation
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4105 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4387 4379 -8
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4105 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Harness.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #4105 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4379 4387 +8
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4105 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Description
This PR addresses an issue where outdated JavaScript bundles were being served from browser caches, leading to GraphQL query failures against the updated API schema.
To resolve this, the
public/_headersfile has been updated to implement a more robust caching strategy. This change ensures that users consistently receive the most current frontend code, preventing schema mismatches and related GraphQL errors caused by stale client-side code.Code Example
Notable Changes
/*): TheCache-Controlheader is set tono-cache, no-store, must-revalidate. This ensures that the browser always re-fetches theindex.htmlfile, guaranteeing that users receive the latest version of the application./assets/*): For immutable, hashed assets (like JS and CSS bundles),Cache-Controlis set topublic, max-age=31536000, immutable. This allows browsers to aggressively cache these files, improving performance, while ensuring that new deployments with changed asset hashes are always loaded.Screenshots
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.
Fixes API-EZQ
This PR was automatically generated by Sentry. You can adjust this setting at any time.