openyurtio / openyurt

OpenYurt - Extending your native Kubernetes to edge(project under CNCF)
https://openyurt.io
Apache License 2.0
1.72k stars 405 forks source link

fix: create abspath dir in case that contents is empty #2164

Closed vie-serendipity closed 1 month ago

vie-serendipity commented 1 month ago

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

/kind bug

What this PR does / why we need it:

fix bug of issue 2133

Which issue(s) this PR fixes:

Fixes #2133

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

other Note

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 58.92%. Comparing base (3713163) to head (5163848). Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
pkg/yurthub/storage/disk/storage.go 0.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2164 +/- ## ========================================== + Coverage 56.09% 58.92% +2.82% ========================================== Files 186 211 +25 Lines 18092 19010 +918 ========================================== + Hits 10149 11201 +1052 + Misses 6910 6723 -187 - Partials 1033 1086 +53 ``` | [Flag](https://app.codecov.io/gh/openyurtio/openyurt/pull/2164/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openyurtio) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/openyurtio/openyurt/pull/2164/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openyurtio) | `58.92% <0.00%> (+2.82%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openyurtio#carryforward-flags-in-the-pull-request-comment) to find out more.

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

rambohe-ch commented 1 month ago

@vie-serendipity would you like to post a pull request to fix Trivy Scan error. you can check the error Details and find the error reason.

vie-serendipity commented 1 month ago

@rambohe-ch ok

vie-serendipity commented 1 month ago

/rerun

vie-serendipity commented 1 month ago

It looks like the download of the vulnerability database failed due to some network issues. But after I tried again, everything is working fine now.

vie-serendipity commented 1 month ago

/PTAL @rambohe-ch

rambohe-ch commented 1 month ago

/LGTM

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud