Skip to content

Conversation

@r4f4
Copy link
Contributor

@r4f4 r4f4 commented Sep 18, 2025

Description

A commit hash cannot be easily related to an ocp release version.

Github / Jira issue: OCPBUGS-60903

Dependencies

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

  1. Use Cluster bot to build a custom OCP release payload from this PR
  2. Build oc from source including the changes from OCPBUGS-60903: oc adm release extract: add oc-mirror to the tools list oc#2106
  3. Extract oc-mirror from the custom payload
❯ ~/prjs/github.com/openshift/oc/oc adm release extract --command=oc-mirror registry.build10.ci.openshift.org/ci-ln-yg7n4h2/release:latest

❯ ./oc-mirror version --v2
2025/09/22 16:26:30  [INFO]   : 👋 Hello, welcome to oc-mirror
2025/09/22 16:26:30  [INFO]   : ⚙️  setting up the environment for you...
WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"", Minor:"", EmulationMajor:"", EmulationMinor:"", MinCompatibilityMajor:"", MinCompatibilityMinor:"", GitVersion:"v0.2.0-alpha.1-460-ga3425b8", GitCommit:"a3425b88", GitTreeState:"clean", BuildDate:"2025-09-22T14:06:34Z", GoVersion:"go1.24.4 (Red Hat 1.24.4-2.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
Client Release Version: 4.20.0-0-2025-09-22-141652-test-ci-ln-yg7n4h2-latest

❯ ./oc-mirror version --v2 --short
Flag --short has been deprecated, and will be removed in a future release. Use oc-mirror version instead.
2025/09/22 16:28:10  [INFO]   : 👋 Hello, welcome to oc-mirror
2025/09/22 16:28:10  [INFO]   : ⚙️  setting up the environment for you...
Client Version: v0.2.0-alpha.1-460-ga3425b8
Client Release Version: 4.20.0-0-2025-09-22-141652-test-ci-ln-yg7n4h2-latest

Expected Outcome

The version command output contains the OCP release information when oc-mirror is extract by oc from the release payload.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 18, 2025
@openshift-ci-robot
Copy link

@r4f4: This pull request references Jira Issue OCPBUGS-60903, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Description

A commit hash cannot be easily related to an ocp release version.

Github / Jira issue: OCPBUGS-60903

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Expected Outcome

Please describe the outcome expected from the tests.

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.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 18, 2025
@openshift-ci openshift-ci bot requested a review from aguidirh September 18, 2025 08:54
@openshift-ci
Copy link

openshift-ci bot commented Sep 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: r4f4

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

The pull request process is described here

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 18, 2025
@r4f4
Copy link
Contributor Author

r4f4 commented Sep 18, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 18, 2025
@openshift-ci-robot
Copy link

@r4f4: This pull request references Jira Issue OCPBUGS-60903, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @nidangavali

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot requested a review from nidangavali September 18, 2025 08:57
@openshift-ci-robot
Copy link

@r4f4: This pull request references Jira Issue OCPBUGS-60903, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @nidangavali

In response to this:

Description

A commit hash cannot be easily related to an ocp release version.

Github / Jira issue: OCPBUGS-60903

Dependencies

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Expected Outcome

Please describe the outcome expected from the tests.

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.

Let `main` finish and call `os.Exit`
There is no reason to duplicate this definition given that we already
import k8s.io/apimachinery anyway.
@r4f4 r4f4 force-pushed the ocpbugs-60903-output-ocp-release branch from a9bcc62 to b6c723e Compare September 22, 2025 13:36
The binary must have one main definition of the release version
variable, otherwise the substitution during binary extraction won't
work.
This change makes it possible for `oc` to inject the current OCP release
version information into the `oc-mirror` binary so that we can report a
better version output other than just a commit hash.
@r4f4 r4f4 force-pushed the ocpbugs-60903-output-ocp-release branch from b6c723e to 789c29a Compare September 23, 2025 13:36
@openshift-ci
Copy link

openshift-ci bot commented Sep 23, 2025

@r4f4: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn 789c29a link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants