Skip to content

Backport must gather image 1.5 - #240

Closed
NicholasYancey wants to merge 2 commits into
migtools:oadp-1.5from
NicholasYancey:backport-must-gather-image-1.5
Closed

Backport must gather image 1.5#240
NicholasYancey wants to merge 2 commits into
migtools:oadp-1.5from
NicholasYancey:backport-must-gather-image-1.5

Conversation

@NicholasYancey

Copy link
Copy Markdown
Contributor

Why the changes were made

Backports #237 to oadp-1.5. oadp-cli must-gather was resolving the must-gather image from a hardcoded/default value instead of the one actually pinned in the installed OADP operator's CSV relatedImages, so it could pull the wrong image version. This finds the OADP operator's CSV (matching by display name, only in Succeeded phase) and uses its pinned must-gather image instead.

…ages

Previously, oc oadp must-gather used a hardcoded image tag (registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.5)
regardless of the OADP operator version installed in the cluster.
This caused version mismatches between the operator and the diagnostics image.

https://github.com/migtools/oadp-cli/blob/oadp-dev/cmd/must-gather/must_gather.go#L57

The image is now resolved at runtime by querying the OADP operator
ClusterServiceVersion across all namespaces and extracting the pinned
must-gather image reference from spec.relatedImages. This provides
an exact SHA256-digested image reference that is guaranteed to match
the installed operator release. The CSV is matched by DisplayName
("OADP Operator") for compatibility with both Red Hat and community
operator distributions. CSV lookup is bounded by a 30-second timeout.
If detection fails, the command errors with a hint to use --image for
explicit override.

Signed-off-by: Prasad Joshi <prajoshi@redhat.com>
@NicholasYancey NicholasYancey self-assigned this Jul 28, 2026
@openshift-ci
openshift-ci Bot requested review from kaovilai and weshayutin July 28, 2026 13:57
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 76566b1b-97a8-46f0-977c-b8c8bbb8bd79

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: NicholasYancey
Once this PR has been reviewed and has the lgtm label, please assign rayfordj for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

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