-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[HotFix] Fix createTaskInstanceWorkingDirectory failed if the old path exist #15377
[HotFix] Fix createTaskInstanceWorkingDirectory failed if the old path exist #15377
Conversation
0f6c407
to
5747436
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
try { | ||
// Test if the working directory is exist | ||
// will delete it and recreate | ||
Files.createDirectory(Paths.get(taskWorkingDirectory)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @ruanwenjun plz use Files.createDirectories
to ensure that cascade creation does not report errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thx.
b8f1734
to
519177b
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #15377 +/- ##
=========================================
Coverage 38.03% 38.04%
+ Complexity 4691 4688 -3
=========================================
Files 1304 1304
Lines 44771 44770 -1
Branches 4799 4799
=========================================
+ Hits 17027 17031 +4
+ Misses 25893 25888 -5
Partials 1851 1851 ☔ View full report in Codecov by Sentry. |
519177b
to
7c3ba47
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Purpose of the pull request
Fix
Files.deleteIfExists
cannot delete when the directory is not emptyBrief 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