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

🐛 Fix conversion regression test #1897

Merged

Conversation

perdasilva
Copy link
Contributor

@perdasilva perdasilva commented Apr 3, 2025

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)

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2025
@perdasilva perdasilva marked this pull request as ready for review April 3, 2025 16:10
@perdasilva perdasilva requested a review from a team as a code owner April 3, 2025 16:10
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2025
Copy link

netlify bot commented Apr 3, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 21ed53e
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/67eeb34dd507d7000838debe
😎 Deploy Preview https://deploy-preview-1897--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Per Goncalves da Silva <[email protected]>
@perdasilva perdasilva force-pushed the fix-generate-manifests branch from 8952873 to 21ed53e Compare April 3, 2025 16:11
Copy link

codecov bot commented Apr 3, 2025

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.

Copy link
Contributor

@anik120 anik120 left a comment

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.

@perdasilva
Copy link
Contributor Author

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.

@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.

@perdasilva perdasilva added this pull request to the merge queue Apr 4, 2025
Merged via the queue into operator-framework:main with commit e490bd9 Apr 4, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants