Skip to content

update openshift release#2120

Open
AndrewChubatiuk wants to merge 1 commit intomasterfrom
openshift-release-update
Open

update openshift release#2120
AndrewChubatiuk wants to merge 1 commit intomasterfrom
openshift-release-update

Conversation

@AndrewChubatiuk
Copy link
Copy Markdown
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Apr 29, 2026

Summary by cubic

Update OpenShift support to v4.22 and simplify the OperatorHub flow by switching to the operators/victoriametrics-operator layout and dropping in-repo catalog generation.

  • Refactors
    • Bump .annotations."com.redhat.openshift.versions" to v4.12-v4.22.
    • CI downloads the olm artifact from release.yaml, moves the bundle to operators/victoriametrics-operator/<version>, sets CSV spec.replaces when a previous version exists, updates channel templates in-place when present, and opens PRs under that path.
    • Remove opm from the olm Makefile target; delete config/manifests/catalog-templates/latest.yaml; stop building local catalog/; keep operator-sdk and yq only.
    • CSV: set relatedImages; stop setting spec.replaces during build.

Written for commit 885f239. Summary will update on new commits. Review in cubic

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 3 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:113">
P0: Remove the stray trailing text line; it breaks workflow YAML syntax.</violation>
</file>

<file name="Makefile">

<violation number="1" location="Makefile:291">
P1: The generated CSV no longer sets `spec.replaces`, which can break OLM upgrade paths between operator versions.</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 Outdated
Comment thread Makefile
PREV_HEAD="$$PREV_HEAD" $(YQ) -i '(.entries[] | select(.schema == "olm.channel")).entries = [{"name": "victoriametrics-operator.v$(VERSION)", "replaces": strenv(PREV_HEAD)}] + (.entries[] | select(.schema == "olm.channel") | .entries | map(select(.name != "victoriametrics-operator.v$(VERSION)")))' \
config/manifests/catalog-templates/latest.yaml; \
PREV_HEAD="$$PREV_HEAD" $(YQ) -i '.spec.relatedImages = [{"name": "victoriametrics-operator", "image": "$(REGISTRY)/$(ORG)/$(REPO)@$(DIGEST)"}] | .spec.replaces = strenv(PREV_HEAD)' \
$(YQ) -i '.spec.relatedImages = [{"name": "victoriametrics-operator", "image": "$(REGISTRY)/$(ORG)/$(REPO)@$(DIGEST)"}]' \
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

P1: The generated CSV no longer sets spec.replaces, which can break OLM upgrade paths between operator versions.

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

<comment>The generated CSV no longer sets `spec.replaces`, which can break OLM upgrade paths between operator versions.</comment>

<file context>
@@ -286,27 +286,10 @@ olm: operator-sdk opm yq docs
-	PREV_HEAD="$$PREV_HEAD" $(YQ) -i '(.entries[] | select(.schema == "olm.channel")).entries = [{"name": "victoriametrics-operator.v$(VERSION)", "replaces": strenv(PREV_HEAD)}] + (.entries[] | select(.schema == "olm.channel") | .entries | map(select(.name != "victoriametrics-operator.v$(VERSION)")))' \
-		config/manifests/catalog-templates/latest.yaml; \
-	PREV_HEAD="$$PREV_HEAD" $(YQ) -i '.spec.relatedImages = [{"name": "victoriametrics-operator", "image": "$(REGISTRY)/$(ORG)/$(REPO)@$(DIGEST)"}] | .spec.replaces = strenv(PREV_HEAD)' \
+	$(YQ) -i '.spec.relatedImages = [{"name": "victoriametrics-operator", "image": "$(REGISTRY)/$(ORG)/$(REPO)@$(DIGEST)"}]' \
 		bundle/$(VERSION)/manifests/victoriametrics-operator.clusterserviceversion.yaml
-	cp config/manifests/catalog-templates/latest.yaml bundle/$(VERSION)/catalog-templates/latest.yaml
</file context>
Fix with Cubic

@AndrewChubatiuk AndrewChubatiuk force-pushed the openshift-release-update branch from 885f239 to fe96a56 Compare April 30, 2026 13:16
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