-
Notifications
You must be signed in to change notification settings - Fork 605
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
Properly export trace for duplicated "finished" event #6536
Properly export trace for duplicated "finished" event #6536
Conversation
Fixes an issue with duplicated finished event in which case the following error was thrown: knative.dev/eventing/test/upgrade/prober.(*prober).getStepNoFromMsg ... panic: runtime error: index out of range [1] with length 0
Codecov ReportBase: 81.96% // Head: 81.96% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #6536 +/- ##
=======================================
Coverage 81.96% 81.96%
=======================================
Files 235 235
Lines 11726 11726
=======================================
Hits 9611 9611
Misses 1644 1644
Partials 471 471 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
test/upgrade/prober/verify.go
Outdated
@@ -101,7 +102,11 @@ func (p *prober) Verify() (eventErrs []error, eventsSent int) { | |||
} else if p.config.OnDuplicate == Error { | |||
eventErrs = append(eventErrs, errors.New(t)) | |||
} | |||
p.exportStepEventTrace(i, t) | |||
if strings.HasPrefix(t, "finish event") { |
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.
Can we extract a constant for this string and use it in both call and verification sites?
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.
OK
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.
Pushed.
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.
Thank you!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mgencur, pierDipi 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 |
/cherry-pick release-1.7 |
@pierDipi: new pull request created: #6540 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherry-pick release-1.8 |
@matzew: #6536 failed to apply on top of branch "release-1.8":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@matzew this is already present on release-1.8 branch, just checked. |
Fixes an issue with duplicated finished event in which case the following error was thrown:
knative.dev/eventing/test/upgrade/prober.(*prober).getStepNoFromMsg ...
panic: runtime error: index out of range [1] with length 0
Proposed Changes
Pre-review Checklist
Release Note
Docs