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

Generate catalog for 4.17 with olm.csv.metadata #3012

Merged

Conversation

mgencur
Copy link
Contributor

@mgencur mgencur commented Nov 12, 2024

Fixes errors such as this one in Konflux pipeline:

!FAILURE! - olm.bundle.object bundle properties are not permitted in a FBC fragment for OCP version 4.17. Fragments must move to olm.csv.metadata bundle metadata.
!FAILURE! - every olm.bundle object in the fragment must have a corresponding olm.csv.metadata bundle property

Example: https://console.redhat.com/application-pipeline/workspaces/ocp-serverless/applications/serverless-operator-135-fbc-417/pipelineruns/serverless-index-135-fbc-417-on-pull-request-97tvx

There are already fbc-validation checks in Konflux pipeline that verify that: https://github.com/konflux-ci/build-definitions/blob/main/task/fbc-validation/0.1/USAGE.md#bundle-metadata-in-the-appropriate-format

The catalogs will be re-generated on the next "make generated-files" PR.

Proposed Changes

@@ -38,8 +38,15 @@ function generate_catalog {
add_channel "${catalog_template}" "$channel" "$(metadata.get 'olm.replaces')"
done < <(metadata.get 'olm.channels.list[*]')

level=none
Copy link
Member

Choose a reason for hiding this comment

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

😅 nice level argument

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah.

ᐅ opm alpha render-template basic -h
Generate a file-based catalog from a single 'basic template' file
When FILE is '-' or not provided, the template is read from standard input

Usage:
  opm alpha render-template basic basic-template-file [flags]

Flags:
  -h, --help                   help for basic
      --migrate-level string   Name of the last migration to run (default: none)
                               
                               The migrator will run all migrations up to and including the selected level.
                               
                               Available migrators:
                                 - none                          : do nothing
                                 - bundle-object-to-csv-metadata : migrates bundles' "olm.bundle.object" to "olm.csv.metadata"

Copy link
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Nov 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matzew, mgencur

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mgencur mgencur merged commit 7f68aff into openshift-knative:main Nov 12, 2024
13 of 18 checks passed
@mgencur
Copy link
Contributor Author

mgencur commented Nov 12, 2024

Merging. As this part is not tested in CI anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants