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: Add script in the index.html if unable to dynamically load asset #3373

Conversation

nicholas-codecov
Copy link
Contributor

Description

Basically we're seeing a lot of failing to load assets in Sentry, this is because of the way our infra is setup, and old versions of the app are not there for the user to request. This is how Vite recommends resolving the issue: load-error-handling.

This PR adds this script into the index.html so it is unaffected by new deployments as the index.html is the file that is consistently served and not cached in the same manner.

@nicholas-codecov nicholas-codecov changed the title fix: Add script in the index.html head to run if this event is thrown fix: Add script in the index.html if unable to dynamically load asset Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Bundle Report

Bundle size has no change ✅

@codecov-staging
Copy link

Bundle Report

Bundle size has no change ✅

@codecov-qa
Copy link

codecov-qa bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (55c3e63) to head (a776abb).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3373   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3886     3896   +10     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           

see 4 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <ø> (+<0.01%) ⬆️
Shared 99.80% <ø> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55c3e63...a776abb. Read the comment docs.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (55c3e63) to head (a776abb).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3373   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3891     3896    +5     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           

see 4 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <ø> (+<0.01%) ⬆️
Shared 99.80% <ø> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55c3e63...a776abb. Read the comment docs.

Copy link

codecov-public-qa bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (55c3e63) to head (a776abb).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3373   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3886     3896   +10     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           

see 4 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <ø> (+<0.01%) ⬆️
Shared 99.80% <ø> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55c3e63...a776abb. Read the comment docs.

@codecov-releaser
Copy link
Contributor

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
a776abb Wed, 09 Oct 2024 11:11:44 GMT Cloud Enterprise

@codecov-notifications
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3373   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3891     3896    +5     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           

see 4 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <ø> (+<0.01%) ⬆️
Shared 99.80% <ø> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55c3e63...a776abb. Read the comment docs.

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Oct 9, 2024
Merged via the queue into main with commit c80deba Oct 9, 2024
62 checks passed
@nicholas-codecov nicholas-codecov deleted the fix-add-in-reload-script-if-vite-notices-out-of-date-files branch October 9, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants