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: prevent caching js when http code isn't 200 #814

Merged
merged 3 commits into from
May 10, 2023

Conversation

chivalryq
Copy link
Member

Description of your changes

Ref #811

This PR prevent caching non-200 http response in JsCache. Add some logs to track the issue better.

Fixes #

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run yarn lint to ensure the frontend changes are ready for review.
  • Run make reviewableto ensure the server changes are ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

Special notes for your reviewer

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 64.28% and project coverage change: -0.03 ⚠️

Comparison is base (872f162) 61.13% compared to head (3e38451) 61.10%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #814      +/-   ##
==========================================
- Coverage   61.13%   61.10%   -0.03%     
==========================================
  Files         109      109              
  Lines       19134    19143       +9     
==========================================
  Hits        11697    11697              
- Misses       5988     5992       +4     
- Partials     1449     1454       +5     
Flag Coverage Δ
apiserver-unittests 33.68% <61.53%> (-0.06%) ⬇️
server-e2e-tests 49.78% <7.14%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/server/utils/filters/gzip.go 44.11% <0.00%> (-1.34%) ⬇️
pkg/server/utils/filters/js-cache.go 76.08% <66.66%> (-5.97%) ⬇️
pkg/server/server.go 55.38% <100.00%> (ø)

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Qiaozp <[email protected]>
Signed-off-by: Qiaozp <[email protected]>
Copy link
Collaborator

@barnettZQG barnettZQG left a comment

Choose a reason for hiding this comment

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

lgtm

@github-actions
Copy link

Successfully created backport PR #816 for release-1.8.

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