-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 Ensure all ownerRef assertions for some Kind are evaluated #10590
🐛 Ensure all ownerRef assertions for some Kind are evaluated #10590
Conversation
The assertFuncs are passed as a list. Previously, if two assertFuncs were defined for the same Kind, the assertFunc that appeared later in the list would overwrite the one that appeared earlier. If someone introduced a second assertFunc for a given Kind, they would receive no signal that the first assertFunc was overwritten. That would result in missed assertions. With this change, if two or more assertFuncs are defined for the same Kind, both are evaluated.
/lgtm |
LGTM label has been added. Git tree hash: f5c3cea91b7fbd6c514ec7120a2f3c549bce81b9
|
/approve |
/cherry-pick release-1.7 |
@chrischdi: once the present PR merges, I will cherry-pick it on top of release-1.7 in a new PR and assign it to you. 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi 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.6 |
@chrischdi: once the present PR merges, I will cherry-pick it on top of release-1.6 in a new PR and assign it to you. 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-sigs/prow repository. |
@chrischdi: new pull request created: #10592 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-sigs/prow repository. |
@chrischdi: #10590 failed to apply on top of branch "release-1.6":
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-sigs/prow repository. |
What this PR does / why we need it:
The assertFuncs are passed as a list*. Previously, if two assertFuncs were defined for the same Kind, the assertFunc that appeared later in the list would overwrite the one that appeared earlier.
If someone introduced a second assertFunc for a given Kind, they would receive no signal that the first assertFunc was overwritten. A test relying on the first assertion would give a false positive.
With this change, if two or more assertFuncs are defined for the same Kind, both are evaluated.
* Example:
cluster-api/test/e2e/quick_start_test.go
Lines 44 to 49 in 99866da
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
/area e2e-testing