Skip to content

Conversation

@ruanwenjun
Copy link
Member

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixFileAlreadyExist branch from 551a243 to c2a33cd Compare February 6, 2024 02:41
@ruanwenjun ruanwenjun added the bug Something isn't working label Feb 6, 2024
@ruanwenjun ruanwenjun changed the title Fix create parent directory will cause FileAlreadyExistsException [HotFix] Fix create parent directory will cause FileAlreadyExistsException Feb 6, 2024
@ruanwenjun ruanwenjun self-assigned this Feb 6, 2024
Copy link
Contributor

@rickchengx rickchengx left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@fuchanghai fuchanghai left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (69676b4) 38.53% compared to head (d3c2801) 38.53%.

❗ Current head d3c2801 differs from pull request most recent head 7d65e0e. Consider uploading reports for the commit 7d65e0e to get more accurate results

Files Patch % Lines
...pache/dolphinscheduler/common/utils/FileUtils.java 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15576      +/-   ##
============================================
- Coverage     38.53%   38.53%   -0.01%     
  Complexity     4766     4766              
============================================
  Files          1305     1305              
  Lines         44838    44841       +3     
  Branches       4806     4806              
============================================
+ Hits          17278    17279       +1     
- Misses        25684    25686       +2     
  Partials       1876     1876              

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

Files.createDirectory(path);
Files.setPosixFilePermissions(path, PERMISSION_755);
try {
Files.createDirectory(path);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
Files.setPosixFilePermissions(path, PERMISSION_755);
} catch (FileAlreadyExistsException fileAlreadyExistsException) {
// Catch the FileAlreadyExistsException here to avoid create the same parent directory in parallel
log.debug("The directory: {} already exists", path);

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2024

@ruanwenjun ruanwenjun merged commit 4541e74 into apache:dev Feb 6, 2024
@ruanwenjun ruanwenjun deleted the dev_wenjun_fixFileAlreadyExist branch February 6, 2024 03:59
zhongjiajie pushed a commit that referenced this pull request Feb 6, 2024
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.

4 participants