:bug: Fix conversion regression test by perdasilva · Pull Request #1897 · operator-framework/operator-controller
Conversation
Description
In #1895 we added a regression test for the registry+v1 bundle to plain manifest converter that generates plain manifests from a bundle into a directory then uses git diff --exit-code to fail if it detects changes (similar to how verify works with the generated code). Currently, the manifest files are generated in the order and the filename for each manifest includes an index based on that order. E.g. 05_clusterrole_something.yaml.
To avoid failing on correctly generated manifests that happened to be out of order, this PR sorts the output manifests by kind/namespace/name before writing them out to maintain order over consecutive independent executions. For the test, the order of manifest is not important. What is important is that the same manifests are generated with the same content.
Reviewer Checklist
- API Go Documentation
- Tests: Unit Tests (and E2E Tests, if appropriate)
- Comprehensive Commit Messages
- Links to related GitHub Issue(s)
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 68.91%. Comparing base (
23b9cdc) to head (21ed53e).
Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@ ## main #1897 +/- ## ========================================== - Coverage 68.93% 68.91% -0.02% ========================================== Files 66 66 Lines 5243 5243 ========================================== - Hits 3614 3613 -1 - Misses 1397 1398 +1 Partials 232 232
| Flag | Coverage Δ | |
|---|---|---|
| e2e | 50.39% <ø> (ø) |
|
| unit | 56.70% <ø> (-0.02%) |
⬇️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look pretty minimal. I am just a little lost on the why of this PR from just this message
Fixes bundle -> plain manifest generator to sort generated manifest before writing them out to avoid false negatives
😅 I am unaware of what these false negatives are, so it'll be helpful for these PRs to have a little more context. For current reviewers who are trying to catch up to the context and for future maintainers who might stumble upon this and need to do something with it.
There are also a LOT of file renames that I'm not sure I understand the "why it was needed" part of.
Code changes look pretty minimal. I am just a little lost on the
whyof this PR from just this messageFixes bundle -> plain manifest generator to sort generated manifest before writing them out to avoid false negatives😅 I am unaware of what these false negatives are, so it'll be helpful for these PRs to have a little more context. For current reviewers who are trying to catch up to the context and for future maintainers who might stumble upon this and need to do something with it.
There are also a LOT of file renames that I'm not sure I understand the "why it was needed" part of.
@anik120 fair call - sorry about that. I was rushing because I needed to sign off and wanted this up to help not block any other PRs.
I'll add more description to the context.
Merged
via the queue into
operator-framework:main
with commit e490bd9
20 of 21 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters