karmada icon indicating copy to clipboard operation
karmada copied to clipboard

karmadactl init: 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: karmadactl init 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 unclean paths.

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

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


zhzhuang-zju avatar Oct 19 '24 06: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 0% with 27 lines in your changes missing coverage. Please review.

Project coverage is 46.28%. Comparing base (f78e7e2) to head (b7afcaf).

Files with missing lines Patch % Lines
pkg/karmadactl/cmdinit/kubernetes/deploy.go 0.00% 18 Missing :warning:
pkg/karmadactl/cmdinit/utils/util.go 0.00% 9 Missing :warning:

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5713      +/-   ##
==========================================
- Coverage   46.30%   46.28%   -0.03%     
==========================================
  Files         663      663              
  Lines       54686    54707      +21     
==========================================
- Hits        25324    25322       -2     
- Misses      27737    27760      +23     
  Partials     1625     1625              
Flag Coverage Δ
unittests 46.28% <0.00%> (-0.03%) :arrow_down:

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 19 '24 06:10 codecov-commenter

Wait for #5703 as the two PR will share common functions.

RainbowMango avatar Nov 27 '24 06:11 RainbowMango

Wait for #5703 as the two PR will share common functions.

done~

zhzhuang-zju avatar Nov 27 '24 08: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 09:11 karmada-bot