Skip to content

chore: migrate Openshift bundles to FBC#2047

Open
vrutkovs wants to merge 1 commit intomasterfrom
openshift-fbc
Open

chore: migrate Openshift bundles to FBC#2047
vrutkovs wants to merge 1 commit intomasterfrom
openshift-fbc

Conversation

@vrutkovs
Copy link
Copy Markdown
Collaborator

@vrutkovs vrutkovs commented Apr 9, 2026

Cleanup release scripts and manifests, move most of the logic into Makefile.

See https://redhat-openshift-ecosystem.github.io/operator-pipelines/users/fbc_onboarding/ for FBC details.

Fixes #2037

TODO:

  • Find a way to test this safely
    Generated 0.68.4 bundle using this Makefile and its identical to the generated catalog bundle
  • Support channels - beta / latest / lts?
    Now defined in the file

Comment thread .github/workflows/operatorhub.yaml Fixed
@vrutkovs vrutkovs force-pushed the openshift-fbc branch 3 times, most recently from eec12a2 to af8d34d Compare April 16, 2026 13:23
@vrutkovs vrutkovs force-pushed the openshift-fbc branch 4 times, most recently from 0b5c04d to 5b6f1eb Compare April 21, 2026 12:53
@vrutkovs vrutkovs marked this pull request as ready for review April 21, 2026 12:55
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/operatorhub.yaml">

<violation number="1" location=".github/workflows/operatorhub.yaml:88">
P1: `PREV_CATALOG` is used without a guaranteed value, so first-time catalog generation can fail when no existing `catalog.yaml` is present.</violation>
</file>

<file name="Makefile">

<violation number="1" location="Makefile:299">
P2: Avoid fixed `/tmp/vm-*.{txt,yaml}` filenames in recipes; they can race across concurrent runs and corrupt generated catalogs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread .github/workflows/operatorhub.yaml
Comment thread Makefile
$(YQ) -i '.annotations."com.redhat.openshift.versions" = "v4.12-v4.21"' \
bundle/$(VERSION)/metadata/annotations.yaml
mkdir -p bundle/$(VERSION)/catalog-templates catalog/latest
$(YQ) '.entries[] | select(.schema == "olm.channel") | .entries[] | select(.name != "victoriametrics-operator.v$(VERSION)") | .name' config/manifests/catalog-templates/latest.yaml > /tmp/vm-prev-names.txt
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 21, 2026

Choose a reason for hiding this comment

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

P2: Avoid fixed /tmp/vm-*.{txt,yaml} filenames in recipes; they can race across concurrent runs and corrupt generated catalogs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 299:

<comment>Avoid fixed `/tmp/vm-*.{txt,yaml}` filenames in recipes; they can race across concurrent runs and corrupt generated catalogs.</comment>

<file context>
@@ -283,25 +283,63 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
 	$(YQ) -i '.annotations."com.redhat.openshift.versions" = "v4.12-v4.21"' \
 		bundle/$(VERSION)/metadata/annotations.yaml
+	mkdir -p bundle/$(VERSION)/catalog-templates catalog/latest
+	$(YQ) '.entries[] | select(.schema == "olm.channel") | .entries[] | select(.name != "victoriametrics-operator.v$(VERSION)") | .name' config/manifests/catalog-templates/latest.yaml > /tmp/vm-prev-names.txt
+	$(YQ) '.entries[] | select(.schema == "olm.channel") | .entries[] | select(.name != "victoriametrics-operator.v$(VERSION)") | .replaces | select(.)' config/manifests/catalog-templates/latest.yaml > /tmp/vm-prev-replaces.txt
+	PREV_HEAD=$$(grep -Fxvf /tmp/vm-prev-replaces.txt /tmp/vm-prev-names.txt | head -1); \
</file context>
Fix with Cubic

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.

Migrate OLM setup to use FBC

3 participants