-
Notifications
You must be signed in to change notification settings - Fork 873
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: create analysisrun cmd using template generated name #1471
fix: create analysisrun cmd using template generated name #1471
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1471 +/- ##
==========================================
+ Coverage 81.35% 81.49% +0.14%
==========================================
Files 108 108
Lines 14505 14518 +13
==========================================
+ Hits 11801 11832 +31
+ Misses 2089 2058 -31
- Partials 615 628 +13
Continue to review full report at Codecov.
|
- set templateName if analsysis template has name in metadata - add unit test Signed-off-by: Hui Kang <hui.kang@salesforce.com>
4082dbe
to
ceb8e09
Compare
- unit test Signed-off-by: Hui Kang <hui.kang@salesforce.com>
ceb8e09
to
90290f6
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
objName, notFound, err := unstructured.NestedString(obj.Object, "metadata", "name") | ||
objName, found, err := unstructured.NestedString(obj.Object, "metadata", "name") | ||
if err != nil { | ||
return err | ||
} | ||
if !notFound { | ||
if found { |
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.
oops!
// Remove resourceVersion if exists | ||
_, found, err := unstructured.NestedString(obj.Object, "metadata", "resourceVersion") |
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.
Does this fix imply we never had --from in-cluster-analysis-template
working properly?
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.
yeah, the unit test failed to catch that because of the fake client.
Signed-off-by: Hui Kang hui.kang@salesforce.com
fix #1473
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.