-
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
fix: Resource relate path invalid when tenant change #15581
Conversation
* fix can not get correct resource related path when user run workflow with differnet tenant of resource created * also fix can not get correct related path when we use `resource.storage.type=LOCAL`
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.
maybe we should total remove tenant attribute when we CURD resource later
// prefix schema `file:/` should be remove in local file mode | ||
String fullNameRemoveSchema = fullName.replaceFirst(hdfsProperties.getDefaultFS(), ""); |
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.
fix get related path not work in local resources mode
// Replace resource dir not effective in case of run workflow with different tenant from resource file's. | ||
// this is backup solution to get related path, by split with RESOURCE_TYPE_FILE | ||
return filenameReplaceResDir.contains(RESOURCE_TYPE_FILE) | ||
? filenameReplaceResDir.split(String.format("%s/", RESOURCE_TYPE_FILE))[1] | ||
: filenameReplaceResDir; |
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.
fix error when execute workflow with different tenant of resource's creator
Quality Gate failedFailed conditions 6.7% Coverage on New Code (required ≥ 60%) |
+1, resource dir connected with tenant code is kind of outdated. |
thanks, but you sleep so later, nightbird 🌔 🐱 |
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.
Better if we have it covered with unit test.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #15581 +/- ##
============================================
- Coverage 38.53% 38.52% -0.01%
- Complexity 4765 4766 +1
============================================
Files 1305 1306 +1
Lines 44845 44852 +7
Branches 4808 4808
============================================
+ Hits 17279 17280 +1
- Misses 25687 25694 +7
+ Partials 1879 1878 -1 ☔ View full report in Codecov by Sentry. |
Could we add later? I wish I could raise release vote tonight and I can stay with my family in Chinese new year |
* fix can not get correct resource related path when user run workflow with differnet tenant of resource created * also fix can not get correct related path when we use `resource.storage.type=LOCAL` (cherry picked from commit bd83631)
Sure, happy new year : ) |
thanks, happy new year |
resource.storage.type=LOCAL
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