OPRUN-4598: dynamically resolve catalog image tag from OCP release version#750
OPRUN-4598: dynamically resolve catalog image tag from OCP release version#750ankitathomas wants to merge 1 commit into
Conversation
Dynamically set default CatalogSource image tags to match the OpenShift cluster version (e.g., v4.23, v5.0) when RELEASE_VERSION is available. Behavior: - Only affects default CatalogSources with tagged images - Preserves digest-based images and non-OpenShift deployments - Extracts major.minor from RELEASE_VERSION (4.23.0-rc.1 → v4.23) - Skips if RELEASE_VERSION is unset or "0.0.1-snapshot" - Only done once at startup for the set of default CatalogSources. Assisted by: Claude Signed-off-by: Ankita Thomas <ankithom@redhat.com>
|
@ankitathomas: This pull request references OPRUN-4598 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
tmshort
left a comment
There was a problem hiding this comment.
My concern here is that this always seems to be overriding the tag with the value from RELEASE_VERSION. But we currently don't have 4.23 nor 5.0 catalogs available yet. Unless I'm missing something?
It seems to be that the OLMv1 mechanism ought to be followed; use a "special value" that gets written over. from RELEASE_VERSION. Such that if the reference is "v4.22", we remain using that catalog until it is changed to a value to be replaced.
The special value that was added seems to purposefully not replace the version with RELEASE_VERION.
| if len(versionString) == 0 || versionString == defaultCatsrcVersionString { | ||
| return "", nil | ||
| } |
There was a problem hiding this comment.
How could versionString == defaultCatsrcVersionString ever be true? This function is used at one point, and the value retrieved is from an environment variable, so it will likely be either "5.0.something" or "4.23.something".
So, I'm not sure what this part of the check is for?
It almost seems to me you want to override the value only if the existing version is defaultCatsrcVersionString, which you don't know about in this function. You know about that in the overrideImageTag function.
There was a problem hiding this comment.
It will be true for upstream, where CVO does not update the default RELEASE value for the marketplace operator to something besides 0.0.1-snapshot. The purpose of this special value is so that we don't break the marketplace-operator in case it runs on a cluster without CVO. If we see 0.0.1-snapshot, we use the default catalogs as they are, so for the current state of the catalogs they would use 4.22 as in
This is based on
operator-marketplace/manifests/09_operator.yaml
Lines 91 to 93 in 8673f5a
There was a problem hiding this comment.
OK, so this is effectively an upstream-only check.
|
/retest |
|
This still seems to always override the catalog version with the RELEASE_VERSION variable. That's a problem because the This is from the failed It's trying to load the |
|
@ankitathomas: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Dynamically set default CatalogSource image tags to match the OpenShift cluster version (e.g., v4.23, v5.0) when RELEASE_VERSION is available.
Behavior:
Assisted by: Claude
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs