Skip to content

OCPCLOUD-3513: cluster-api-provider-aws: inject oc-cli into test/e2e-aws-capi-techpreview#80470

Open
hongkailiu wants to merge 1 commit into
openshift:mainfrom
hongkailiu:inject-cli
Open

OCPCLOUD-3513: cluster-api-provider-aws: inject oc-cli into test/e2e-aws-capi-techpreview#80470
hongkailiu wants to merge 1 commit into
openshift:mainfrom
hongkailiu:inject-cli

Conversation

@hongkailiu

@hongkailiu hongkailiu commented Jun 12, 2026

Copy link
Copy Markdown
Member

We are going to use the oc-cli in the test.
The ref. of HowTO is here.

Summary by CodeRabbit

This PR updates the OpenShift CI configuration for the cluster-api-provider-aws repository (ci-operator config: ci-operator/config/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-main.yaml).

What changed:

  • The e2e-aws-capi-techpreview test step's test container now requests an injected oc CLI by adding cli: latest to the test declaration.
  • The test commands remain configured as openshift/e2e-tests.sh (no explicit oc version availability check was added in this diff).

Practical impact:

  • The e2e-aws-capi-techpreview CI job will have the oc CLI injected into the test environment via the step-registry mechanism, ensuring oc is available for tests that need it without modifying the test script itself.
  • Rehearsals reported by the author showed an initial "oc: command not found" error; adding cli: latest aims to address that by providing the oc binary in the test container.

@coderabbitai

coderabbitai Bot commented Jun 12, 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: 72a14744-ec18-4ad0-9450-6391b0ca9463

📥 Commits

Reviewing files that changed from the base of the PR and between 1d6d5ea and 585bd71.

📒 Files selected for processing (1)
  • ci-operator/config/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-main.yaml

Walkthrough

The PR updates the e2e-aws-capi-techpreview ci-operator test step by adding cli: latest to its configuration.

Changes

E2E Test Configuration

Layer / File(s) Summary
E2E step CLI flag
ci-operator/config/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-main.yaml
The e2e-aws-capi-techpreview test step now includes cli: latest.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Microshift Test Compatibility ❓ Inconclusive Custom check execution failed before a final verdict was produced. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: injecting the oc CLI into a specific test step configuration for cluster-api-provider-aws.
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 #80470 changes only ci-operator YAML (adds oc version && ...); no Ginkgo It/Describe/Context titles are modified/introduced, so no unstable/dynamic test names are present. citeturn2view0
Test Structure And Quality ✅ Passed PR #80470 only changes ci-operator YAML (adds cli: latest) and does not modify any Ginkgo test code/It blocks, so the test-structure quality requirements are not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR changes only ci-operator YAML (adds cli: latest to e2e-aws-capi-techpreview); no new Ginkgo test code added, so no new SNO multi-node assumptions to check.
Topology-Aware Scheduling Compatibility ✅ Passed In ci-operator/.../openshift-cluster-api-provider-aws-main.yaml, the e2e-aws-capi-techpreview step only sets cli: latest; no affinity/anti-affinity, topologySpread, nodeSelector, PDB, or control-pl...
Ote Binary Stdout Contract ✅ Passed PR #80470 updates only ci-operator/.../openshift-cluster-api-provider-aws-main.yaml by adding cli: latest; no OTE/Go main-process stdout code is changed, so the JSON-stdout contract is unaffected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR 80470 modifies only ci-operator YAML (adds cli: latest for e2e-aws-capi-techpreview); no new Ginkgo e2e test code or IPv4/external connectivity assumptions introduced.
No-Weak-Crypto ✅ Passed PR adds only cli: latest; searched updated YAML for MD5/SHA1/DES/RC4/3DES/Blowfish/ECB/crypto/compare_digest—no matches.citeturn4view0turn9view0turn9view7turn9view8
Container-Privileges ✅ Passed Checked ci-operator/config/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-main.yaml: it contains cli: latest but no privileged/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPriv...
No-Sensitive-Data-In-Logs ✅ Passed PR change is confined to cluster-api-provider-aws main step setting cli: latest; the file contains no password/token/API key/PII or similar sensitive strings.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

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

@hongkailiu

Copy link
Copy Markdown
Member Author

See if oc is available already.
/pj-rehearse

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 12, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@hongkailiu: This pull request references OCPCLOUD-3513 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.

Details

In response to this:

We are going to use the oc-cli in the test.
The ref. of HowTO is here.

Summary by CodeRabbit

This PR injects the oc CLI tool into the e2e-aws-capi-techpreview test step for the cluster-api-provider-aws repository's CI configuration.

What changed:
The test commands for the e2e-aws-capi-techpreview test step in the cluster-api-provider-aws main branch CI configuration have been updated to run oc version before executing the test script. This validates that the oc CLI is properly available in the test environment before the actual e2e tests begin.

Practical impact:
The test will now explicitly verify oc CLI availability as a precondition for the test execution. This follows the OpenShift CI patterns for properly injecting required CLI tools into test environments, as documented in the OpenShift CI architecture step registry.

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 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hongkailiu
Once this PR has been reviewed and has the lgtm label, please assign damdo 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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@hongkailiu

Copy link
Copy Markdown
Member Author

The rehearsal errored out with oc: command not found as expected.

@hongkailiu

Copy link
Copy Markdown
Member Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@hongkailiu

Copy link
Copy Markdown
Member Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@hongkailiu

Copy link
Copy Markdown
Member Author

The pod log from this rehearsal has the following:

Client Version: v4.2.0-alpha.0-2970-g40ce70f
Kustomize Version: v5.7.1
Server Version: 5.0.0-0.ci-2026-06-12-190423-test-ci-op-pn2hgbv9-latest
Kubernetes Version: v1.35.3-dirty
Running e2e-tests.sh
cloning github.com/openshift/cluster-capi-operator at branch 'main'
Cloning into '/tmp/tmp.eM9LFi1fW1'...

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@hongkailiu: 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 Jun 12, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@hongkailiu: 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-cluster-api-provider-aws-main-e2e-aws-capi-techpreview openshift/cluster-api-provider-aws 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.

@openshift-merge-bot openshift-merge-bot Bot removed the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jun 12, 2026
@hongkailiu

Copy link
Copy Markdown
Member Author

#80470 (comment)

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@hongkailiu: 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 Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants