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 broken catalog-build-from-index command #390

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

sutaakar
Copy link
Contributor

@sutaakar sutaakar commented Nov 1, 2023

Issue link

What changes have been made

Verification steps

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

Copy link
Contributor

@Bobbins228 Bobbins228 left a comment

Choose a reason for hiding this comment

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

/lgtm

@sutaakar
Copy link
Contributor Author

sutaakar commented Nov 1, 2023

/approve

Copy link

openshift-ci bot commented Nov 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bobbins228, sutaakar

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

@openshift-ci openshift-ci bot added the approved label Nov 1, 2023
Copy link
Contributor

@dimakis dimakis left a comment

Choose a reason for hiding this comment

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

just the one comment

@@ -331,7 +331,7 @@ catalog-build-from-index: opm ## Build a catalog image.
mkdir catalog
$(OPM) render $(CATALOG_BASE_IMG) -o yaml > catalog/bundles.yaml
$(OPM) render $(BUNDLE_IMG) $(OPM_BUNDLE_OPT) > catalog/codeflare-operator-bundle.yaml
$(SED) -i -E "s/(.*)(- name: codeflare-operator.$(PREVIOUS_VERSION).*)/\1- name: codeflare-operator.$(VERSION)\n replaces: codeflare-operator.$(PREVIOUS_VERSION)\n\2/" catalog/bundles.yaml
$(SED) -i -E "s/(.*)(- name: codeflare-operator.v0.2.0)/\1- name: codeflare-operator.$(VERSION)\n replaces: codeflare-operator.$(PREVIOUS_VERSION)\n\2/" catalog/bundles.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

excuse my lack of sed knowledge here but are we now hardcoding a version? is this PR just for this fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The purpose of this line is to inject replacing entry into the bundle section, where replacing entries are kept.
Originally this new replacing entry is placed right before last CodeFlare operator entry, however due to the regex issues with v1.0.0 the injection was duplicated. By fixing the searched text I made sure that only one injection is done.

Anyway this code is used just for tests, for real OLM release this bundle index is generated in OLM repo, we just provide manifests.

@openshift-ci openshift-ci bot merged commit 2e3d952 into project-codeflare:main Nov 1, 2023
5 checks passed
@sutaakar sutaakar deleted the olm branch November 1, 2023 16:02
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.

3 participants