opm validate: make sure skipped bundles are not included in replaces chain
Description of the change:
When verifying channel validity, halt replaces chain traversal when we encounter a bundle that is skipped by any other entry anywhere in the channel.
Motivation for the change:
opm validate currently says that invalid graphs are actually valid. In certain circumstances when a bundle is both skipped and is also somewhere in the replaces chain, the current opm validate logic has a preference for the bundle being in the replaces chain despite being skipped. In reality, skipped bundles are NOT in the replaces chain and their upgrade edges are NOT honored.
Reviewer Checklist
- [ ] Implementation matches the proposed design, or proposal is updated to match implementation
- [ ] Sufficient unit test coverage
- [ ] Sufficient end-to-end test coverage
- [ ] Docs updated or added to
/docs - [ ] Commit messages sensible and descriptive
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Codecov Report
:x: Patch coverage is 96.59091% with 6 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 55.56%. Comparing base (a0e2cf8) to head (1d1230f).
:warning: Report is 2 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| alpha/model/graph.go | 96.40% | 4 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1762 +/- ##
==========================================
+ Coverage 55.17% 55.56% +0.38%
==========================================
Files 136 137 +1
Lines 15917 16094 +177
==========================================
+ Hits 8782 8942 +160
- Misses 5982 5995 +13
- Partials 1153 1157 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This is an aspirational, holistic attempt to resolve the family of problems characterized by inadvertent invalid channels, as well as to buttress the lax off-cluster validations (to enable earlier-detected errors and avoid on-cluster surprise).
Versus #1750 which seeks to narrowly-define a single validation failure case -- and more importantly, to navigate a publishing path through existing catalog content to ameliorate impacts.
#1762 also runs the risks of introducing v0-isms into validation as default, by introducing the semver-noncompliant build metadata processing v0 uses.
I didn't see an impact assessment of applying the new rules to existing catalog content, and I think we absolutely need to understand any impacts there to understand how viable this PR is, and/or the nature/scope of follow-up actions we need to take to enable it.
At this point, I'd favor working to get #1750 to consensus and giving ourselves some more time to work through the complexities this is trying to tackle.
PR needs rebase.
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.
PRs go stale after 90 days of inactivity. If there is no further activity, the PR will be closed in another 30 days.