Skip to content
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

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

mgencur
Copy link
Contributor

@mgencur mgencur commented Sep 23, 2022

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

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note


Docs

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
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/test-and-release Test infrastructure, tests or release labels Sep 23, 2022
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Base: 81.96% // Head: 81.96% // No change to project coverage 👍

Coverage data is based on head (68e225f) compared to base (3a69d31).
Patch has no changes to coverable lines.

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -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") {
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed.

Copy link
Member

@pierDipi pierDipi left a 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

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 23, 2022
@knative-prow
Copy link

knative-prow bot commented Sep 23, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 23, 2022
@knative-prow knative-prow bot merged commit b9a8451 into knative:main Sep 23, 2022
@pierDipi
Copy link
Member

/cherry-pick release-1.7

@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #6540

In response to this:

/cherry-pick release-1.7

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
Copy link
Member

matzew commented Dec 23, 2022

/cherry-pick release-1.8

@knative-prow-robot
Copy link
Contributor

@matzew: #6536 failed to apply on top of branch "release-1.8":

Applying: Properly export trace for duplicated "finished" event
Using index info to reconstruct a base tree...
M	test/upgrade/prober/verify.go
M	test/upgrade/prober/wathola/event/services.go
Falling back to patching base and 3-way merge...
Auto-merging test/upgrade/prober/wathola/event/services.go
CONFLICT (content): Merge conflict in test/upgrade/prober/wathola/event/services.go
Auto-merging test/upgrade/prober/verify.go
CONFLICT (content): Merge conflict in test/upgrade/prober/verify.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Properly export trace for duplicated "finished" event
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.8

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.

@mgencur
Copy link
Contributor Author

mgencur commented Jan 2, 2023

@matzew this is already present on release-1.8 branch, just checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants