Skip to content

🐛 Fix conversion regression test - #1897

Merged
perdasilva merged 1 commit into
operator-framework:mainfrom
perdasilva:fix-generate-manifests
Apr 4, 2025
Merged

🐛 Fix conversion regression test#1897
perdasilva merged 1 commit into
operator-framework:mainfrom
perdasilva:fix-generate-manifests

Conversation

@perdasilva

@perdasilvaperdasilva commented Apr 3, 2025

Copy link
Copy Markdown
Contributor

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-ciopenshift-ciBot 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 ownerApril 3, 2025 16:10
@openshift-ciopenshift-ciBot 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
@netlify

netlifyBot commented Apr 3, 2025

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit21ed53e
🔍 Latest deploy loghttps://app.netlify.com/sites/olmv1/deploys/67eeb34dd507d7000838debe
😎 Deploy Previewhttps://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 <pegoncal@redhat.com>
@perdasilva
perdasilvaforce-pushed the fix-generate-manifests branch from 8952873 to 21ed53eCompareApril 3, 2025 16:11
@codecov

codecovBot commented Apr 3, 2025

Copy link
Copy Markdown

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 
FlagCoverage Δ
e2e50.39% <ø> (ø)
unit56.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.

@anik120anik120 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

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 e490bd9Apr 4, 2025
Sign up for freeto 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

@perdasilva@anik120@thetechnick