Skip to content

Update openshift/api verify scripts to tolerate existing replace statements#81726

Open
JoelSpeed wants to merge 1 commit into
openshift:mainfrom
JoelSpeed:tolerate-existing-replace-api-verify
Open

Update openshift/api verify scripts to tolerate existing replace statements#81726
JoelSpeed wants to merge 1 commit into
openshift:mainfrom
JoelSpeed:tolerate-existing-replace-api-verify

Conversation

@JoelSpeed

@JoelSpeed JoelSpeed commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

When pre-merge testing with /testwith we end up with multiple replace statements trying to prove that the various staged PRs will play nicely together. I think this should improve the situation and allow us to properly replace the go.mod statements even if they were previously replaced in another PR in the chain

Summary by CodeRabbit

  • Updated the OpenShift CI openshift/api master verification configuration (ci-operator/config/openshift/api/openshift-api-master.yaml) so the verify-client-go and verify-hypershift-integration jobs safely set local replace directives for /testwith runs.
  • Instead of blindly appending replace ... => ... lines to go.mod, the jobs now use go mod edit to remove any existing local replace entries for the relevant modules (github.com/openshift/api and, for hypershift integration, github.com/openshift/client-go) and then apply the intended local replacements.
  • This makes pre-merge /testwith testing work correctly when multiple staged pull requests already introduced replace statements in go.mod, avoiding conflicts between replacements.

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 020c5a43-83ab-4383-9188-9f407a922797

📥 Commits

Reviewing files that changed from the base of the PR and between 4aff98c and e5326c2.

📒 Files selected for processing (1)
  • ci-operator/config/openshift/api/openshift-api-master.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/config/openshift/api/openshift-api-master.yaml

Walkthrough

The OpenShift API CI configuration replaces appended go.mod replacement lines with go mod edit commands that remove existing directives and configure local paths for client-go and HyperShift integration verification.

Changes

CI module replacement updates

Layer / File(s) Summary
Verification replacement commands
ci-operator/config/openshift/api/openshift-api-master.yaml
verify-client-go and verify-hypershift-integration now remove existing local replacements and configure the relevant github.com/openshift/api and github.com/openshift/client-go modules with go mod edit -replace.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating verify scripts to handle existing go.mod replace statements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes a ci-operator YAML script; no Ginkgo test titles were added or modified, so the check is not applicable.
Test Structure And Quality ✅ Passed Only a ci-operator YAML changed; no Ginkgo test code was added or modified, so the test-structure check is not applicable.
Microshift Test Compatibility ✅ Passed Only ci-operator YAML changed; no new Ginkgo tests or MicroShift-relevant APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only ci-operator YAML changed; no new or modified Ginkgo e2e tests, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only CI verify-step commands changed; no deployment manifests, operator code, or scheduling constraints were added or modified.
Ote Binary Stdout Contract ✅ Passed Only ci-operator YAML changed; no main/init/TestMain suite code or stdout-writing process code was added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only CI operator config changed; no new Ginkgo/e2e tests or network-sensitive test code was added.
No-Weak-Crypto ✅ Passed PASS: The changed ci config only adjusts go mod replace handling; no weak ciphers, custom crypto, or secret/token comparisons appear.
Container-Privileges ✅ Passed The changed ci-operator YAML contains no privileged, host* , SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The changed CI commands only edit go.mod and append public module paths; no secret, PII, or internal-host logging appears.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@JoelSpeed

Copy link
Copy Markdown
Contributor Author

/testwith openshift/api/master/verify-client-go openshift/client-go#368

@JoelSpeed

Copy link
Copy Markdown
Contributor Author

/testwith openshift/api/master/verify-client-go openshift/client-go#368 openshift/api#2813

@JoelSpeed JoelSpeed force-pushed the tolerate-existing-replace-api-verify branch from 4aff98c to e5326c2 Compare July 10, 2026 09:04
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@JoelSpeed: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-api-master-verify-client-go openshift/api presubmit Ci-operator config changed
pull-ci-openshift-api-master-verify-hypershift-integration openshift/api presubmit Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@JoelSpeed

Copy link
Copy Markdown
Contributor Author

/testwith openshift/api/master/verify-client-go openshift/client-go#368 openshift/api#2813

@JoelSpeed

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

I don't think this is rehearseable, but I've tested the go mod edits locally and I'm fairly happy this should help

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@JoelSpeed: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 10, 2026
@JoelSpeed

Copy link
Copy Markdown
Contributor Author

/test yamllint

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@JoelSpeed: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant