-
Notifications
You must be signed in to change notification settings - Fork 54
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
Filter out user devfile errors #433
Filter out user devfile errors #433
Conversation
Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
/retest |
1 similar comment
/retest |
@@ -2371,7 +2371,7 @@ var _ = Describe("SnapshotEnvironmentBinding controller", func() { | |||
return len(createdBinding.Status.GitOpsRepoConditions) > 0 && createdBinding.Status.GitOpsRepoConditions[0].Reason == "GenerateError" | |||
}, timeout, interval).Should(BeTrue()) | |||
|
|||
Expect(createdBinding.Status.GitOpsRepoConditions[0].Message).Should(ContainSubstring("failed to decode devfile json")) | |||
Expect(createdBinding.Status.GitOpsRepoConditions[0].Message).Should(ContainSubstring("cannot unmarshal string into Go value of type map[string]interface")) |
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.
What does the full error message look like with this? The test just checks for the substring, so I wasn't sure.
If it's just cannot unmarshal string into Go value of type map[string]interface
, it's not really user friendly (compared to the old message), and we should probably update the error string that's set in the SEB status. If it's just a subset, and it mentions something along the lines of "failed to decode devfile" or "failed to parse devfile", then that's fine.
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.
it looks like,
Expected
<string>: Component updated failed: error parsing devfile because of non-compliant data due to json: cannot unmarshal string into Go value of type map[string]interface {}
to contain substring
<string>: cannot unmarslhal string into Go value of type map[string]interface
WDYT?
so i changed it from
failed to decode devfile json: json: cannot unmarshal string into Go value of type map[string]interface {}
to
error parsing devfile because of non-compliant data due to json: cannot unmarshal string into Go value of type map[string]interface {}
The json: cannot unmarshal string into Go value of type map[string]interface {}
is coming from the go module and the first bit is ours.
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.
Looks good
@@ -792,7 +792,7 @@ var _ = Describe("Component controller", func() { | |||
|
|||
errCondition := updatedHasComp.Status.Conditions[len(updatedHasComp.Status.Conditions)-1] | |||
Expect(errCondition.Status).Should(Equal(metav1.ConditionFalse)) | |||
Expect(errCondition.Message).Should(ContainSubstring("failed to decode devfile json")) | |||
Expect(errCondition.Message).Should(ContainSubstring("cannot unmarshal string into Go value of type map[string]interface")) |
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.
Same comment that I left for SEB
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #433 +/- ##
==========================================
- Coverage 81.39% 80.56% -0.84%
==========================================
Files 32 32
Lines 4907 5016 +109
==========================================
+ Hits 3994 4041 +47
- Misses 715 770 +55
- Partials 198 205 +7 ☔ View full report in Codecov by Sentry. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnmcollier, maysunfaisal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do?:
Which issue(s)/story(ies) does this PR fixes:
https://issues.redhat.com/browse/DEVHAS-580
PR acceptance criteria:
Unit/Functional tests
Documentation
Client Impact
How to test changes / Special notes to the reviewer:
Test with updated metrics should pass