From b75931522ba783b8bd9509d84fd0182aa3ed10a5 Mon Sep 17 00:00:00 2001 From: Lukas Piwowarski Date: Thu, 20 Aug 2026 12:42:09 -0400 Subject: [PATCH] List packagemanifests by CATALOG in scripts/gen-rhosls.sh With the new release to the community-operators catalog (v0.0.2) the "make kuttl-test-ocp" Makefile target is failing (and probably others). The issue is that scripts/gen-rhosls.sh looks up the packagemanifest by name (openstack-lightspeed-operator) only, without filtering by catalog. Because the community-operators catalog also ships a packagemanifest with that same name, the lookup is ambiguous and can return the community CSV_VERSION (v0.0.2) instead of the version from the catalog we build internally as part of "make kuttl-test-ocp". This commit filters packagemanifests by the catalog label so that we pick only the packagemanifest coming from the ${CATALOG} catalog. Co-Authored-By: Claude Opus 4.8 --- scripts/gen-rhosls.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/gen-rhosls.sh b/scripts/gen-rhosls.sh index 30d0159..0d22549 100644 --- a/scripts/gen-rhosls.sh +++ b/scripts/gen-rhosls.sh @@ -33,7 +33,10 @@ spec: EOF for _i in $(seq 1 20); do - CSV_VERSION=$(oc get --ignore-not-found=true packagemanifest openstack-lightspeed-operator -o go-template="{{range .status.channels}}{{if eq .name \"${CHANNEL}\"}}{{.currentCSV}}{{\"\n\"}}{{end}}{{end}}") + CSV_VERSION=$(oc get --ignore-not-found=true packagemanifest \ + --field-selector "metadata.name=openstack-lightspeed-operator" \ + -l "catalog=${CATALOG}" \ + -o go-template="{{range .items}}{{range .status.channels}}{{if eq .name \"${CHANNEL}\"}}{{.currentCSV}}{{\"\n\"}}{{end}}{{end}}{{end}}") if [ -n "${CSV_VERSION}" ]; then break fi