Skip to content

[ISV-6166] add CSV parsing before add-image-to-bundle step#858

Closed
tomasbakk wants to merge 1 commit into
mainfrom
ISV-6166
Closed

[ISV-6166] add CSV parsing before add-image-to-bundle step#858
tomasbakk wants to merge 1 commit into
mainfrom
ISV-6166

Conversation

@tomasbakk
Copy link
Copy Markdown
Contributor

@tomasbakk tomasbakk commented Sep 25, 2025

I reorganised the tasks in the hosted pipeline in order for preflight to validate and catch the incorrectly referenced CSV in the earlier stages. There should not be any problems by doing so. The hosted pipeline can run it's course normally.

Preflight is using 4 validators from operator-sdk -> https://github.com/redhat-openshift-ecosystem/openshift-preflight/blob/main/internal/bundle/bundle.go#L50-L55 -> 2 of them are responsible for metadata requirements, 1 is checking API deprecation and OperatorHubV2Validator is validating the bundle against the operatorhub.io requirements which is one we need. (Validators (all and ones used in preflight) are referenced here in operator-framewrok api: https://github.com/operator-framework/api/blob/master/pkg/validation/validation.go)

If there are incorrectly referenced specs in CSV (such as was the case why this ticket was raised), not only will the validation fail for checking the operatorhub requirements but other scorecards will fail as well.

Since the bundle will be run through validations before add-bundle-to-index task, we will save up the time and owners can fix potential problems earlier, with a clear error message.

Tested in preprod; artifacts from preflight -> logs and pipeline logs.

Merge Request Checklists

  • Development is done in feature branches
  • Code changes are submitted as pull request into a primary branch [Provide reason for non-primary branch submissions]
  • Code changes are covered with unit and integration tests.
  • Code passes all automated code tests:
    • Linting
    • Code formatter - Black
    • Security scanners
    • Unit tests
    • Integration tests
  • Code is reviewed by at least 1 team member
  • Pull request is tagged with "risk/good-to-go" label for minor changes

@tomasbakk tomasbakk requested a review from Allda September 25, 2025 11:23
Copy link
Copy Markdown
Contributor

@Allda Allda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Tomas, I am not sure how this is going to work. The preflight trigger needs a bundle and index image as an input that are created in earlier stages by the task that you moved. I am honesly not sure how the pipeline could pass if the index image created by IIB is created only after preflight trigger.

Could you perhaps build it using same source and later during a testing the solution used the index from previous pipeline run whre the order of the task was correct?

@tomasbakk
Copy link
Copy Markdown
Contributor Author

Closing PR as this change will not be implemented. Details in the jira story itself.

@tomasbakk tomasbakk closed this Sep 29, 2025
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.

2 participants