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: move notFoundError to notExistError #2213

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

fungaren
Copy link
Contributor

@fungaren fungaren commented Dec 2, 2024

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

What this PR does / why we need it:

If the user set WEBHOOK_HOST environment variable, the webhook certs will be written to filesystem (/tmp/yurt-manager-webhook-certs by default), and the code has a type confusion of notExistError and notFoundError.

This PR also fix a null pointer dereference in updateIfNotExists.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 45.14%. Comparing base (7763e7c) to head (bfe2b82).
Report is 43 commits behind head on master.

Files with missing lines Patch % Lines
pkg/yurtmanager/webhook/util/writer/certwriter.go 0.00% 4 Missing ⚠️
pkg/yurtmanager/webhook/util/writer/fs.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2213       +/-   ##
===========================================
- Coverage   58.93%   45.14%   -13.80%     
===========================================
  Files         210      402      +192     
  Lines       18968    27754     +8786     
===========================================
+ Hits        11179    12529     +1350     
- Misses       6707    13997     +7290     
- Partials     1082     1228      +146     
Flag Coverage Δ
unittests 45.14% <0.00%> (-13.80%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rambohe-ch rambohe-ch added approved approved lgtm lgtm labels Dec 2, 2024
@rambohe-ch
Copy link
Member

/LGTM

@rambohe-ch
Copy link
Member

@fungaren Very appreciated you for posting pull request to fix bug of fs cert management.

@rambohe-ch rambohe-ch merged commit 192ee6e into openyurtio:master Dec 2, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved lgtm lgtm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants