karmada icon indicating copy to clipboard operation
karmada copied to clipboard

add CRDs archive verification to enhance file system robustness

Open zhzhuang-zju opened this issue 1 year ago • 2 comments

What type of PR is this? /kind feature

What this PR does / why we need it: karmada-operator provides a custom download path for CRDs files. Before processing the files, it's necessary to validate the CRDs archive to enhance system robustness.

  • Check if its file name includes relative paths.

  • check if the CRDs archive has the expected directory structure.

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer: karamdactl init has the same issue, and its enhancement is ongoing

Does this PR introduce a user-facing change?:


zhzhuang-zju avatar Oct 17 '24 03:10 zhzhuang-zju

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 38.27160% with 50 lines in your changes missing coverage. Please review.

Project coverage is 46.28%. Comparing base (ccdf485) to head (63590cb). Report is 131 commits behind head on master.

Files with missing lines Patch % Lines
pkg/util/validation/validation.go 54.38% 26 Missing :warning:
operator/pkg/tasks/init/crd.go 0.00% 23 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5703      +/-   ##
==========================================
+ Coverage   46.21%   46.28%   +0.07%     
==========================================
  Files         663      663              
  Lines       54592    54686      +94     
==========================================
+ Hits        25230    25314      +84     
- Misses      27735    27745      +10     
  Partials     1627     1627              
Flag Coverage Δ
unittests 46.28% <38.27%> (+0.07%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 17 '24 04:10 codecov-commenter

cc @RainbowMango

zhzhuang-zju avatar Nov 26 '24 03:11 zhzhuang-zju

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

karmada-bot avatar Nov 27 '24 08:11 karmada-bot