HIVE-3148: ote-e2e for hive#79036
Conversation
|
@miyadav: This pull request references HIVE-3148 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 task 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. |
WalkthroughThe PR updates the OpenShift Hive CI pipeline by defining a new ChangesOTE e2e Testing Pipeline
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: miyadav 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 |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci-operator/config/openshift/hive/openshift-hive-master.yaml`:
- Around line 306-316: Update the cluster_claim version to match the rest of the
job payload by replacing cluster_claim.version "4.20" with "4.21"; locate the
cluster_claim block (the cluster_claim: entry and its version field) in the
openshift-hive-master.yaml and change the value to "4.21" so the AWS OTE job is
pinned to the same release as the rest of the config.
- Around line 29-34: The Dockerfile fragment uses RUN git clone --branch
fix-ote-init https://github.com/miyadav/hive.git . which pulls a personal fork
instead of building the hive-tests from the repository checked out for the PR;
remove the git clone step and build from the repository already present in the
build context (the WORKDIR /go/src/github.com/openshift/hive), i.e. ensure
dockerfile_literal omits the clone and leaves the existing WORKDIR and RUN make
-C test/ote build to operate on the checked-out openshift/hive source instead of
the miyadav fork.
- Around line 404-427: The test step is missing the vault-backed credential
mount used by the e2e-vsphere job, which is required by the helper scripts
sourced here (source $SHARED_DIR/vsphere_context.sh and source
$SHARED_DIR/govc.sh); add the same secret/credentials mount as the
vsphere-ibmcloud-ci entry in e2e-vsphere to this test step so the govc/vSphere
credentials are available under SHARED_DIR (mount the secret with the same name
and path used by e2e-vsphere), ensuring the helper scripts can read the creds
before running /usr/bin/openshift-tests-extension.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 63d4b492-3d45-46a8-be11-2d992d1a07c2
⛔ Files ignored due to path filters (1)
ci-operator/jobs/openshift/hive/openshift-hive-master-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift/hive/openshift-hive-master.yaml
| - dockerfile_literal: | | ||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 as builder | ||
| RUN mkdir -p /go/src/github.com/openshift/hive | ||
| WORKDIR /go/src/github.com/openshift/hive | ||
| RUN git clone --branch fix-ote-init --depth 1 https://github.com/miyadav/hive.git . | ||
| RUN make -C test/ote build |
There was a problem hiding this comment.
Build hive-tests from the checked-out openshift/hive source instead of a personal fork.
Cloning miyadav/hive@fix-ote-init here means these jobs are not actually testing the PR/branch under review; they are testing whatever happens to be on that external branch when the image build runs. It also adds a live GitHub dependency to every CI run.
Suggested fix
- dockerfile_literal: |
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 as builder
- RUN mkdir -p /go/src/github.com/openshift/hive
WORKDIR /go/src/github.com/openshift/hive
- RUN git clone --branch fix-ote-init --depth 1 https://github.com/miyadav/hive.git .
+ COPY . .
RUN make -C test/ote build
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - dockerfile_literal: | | |
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 as builder | |
| RUN mkdir -p /go/src/github.com/openshift/hive | |
| WORKDIR /go/src/github.com/openshift/hive | |
| RUN git clone --branch fix-ote-init --depth 1 https://github.com/miyadav/hive.git . | |
| RUN make -C test/ote build | |
| - dockerfile_literal: | | |
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 as builder | |
| WORKDIR /go/src/github.com/openshift/hive | |
| COPY . . | |
| RUN make -C test/ote build |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ci-operator/config/openshift/hive/openshift-hive-master.yaml` around lines 29
- 34, The Dockerfile fragment uses RUN git clone --branch fix-ote-init
https://github.com/miyadav/hive.git . which pulls a personal fork instead of
building the hive-tests from the repository checked out for the PR; remove the
git clone step and build from the repository already present in the build
context (the WORKDIR /go/src/github.com/openshift/hive), i.e. ensure
dockerfile_literal omits the clone and leaves the existing WORKDIR and RUN make
-C test/ote build to operate on the checked-out openshift/hive source instead of
the miyadav fork.
| - as: e2e-ote | ||
| cluster_claim: | ||
| architecture: amd64 | ||
| as: unused | ||
| cloud: aws | ||
| labels: | ||
| region: us-east-1 | ||
| owner: openshift-ci | ||
| product: ocp | ||
| timeout: 1h0m0s | ||
| version: "4.20" |
There was a problem hiding this comment.
Avoid the 4.20/4.21 skew in the AWS OTE job.
This is the only AWS cluster-claim job in the file pinned to 4.20; the rest of the config and the release payload under test are 4.21. That makes the new signal hard to interpret and can miss regressions that only reproduce on the current target version.
Suggested fix
cluster_claim:
@@
- version: "4.20"
+ version: "4.21"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - as: e2e-ote | |
| cluster_claim: | |
| architecture: amd64 | |
| as: unused | |
| cloud: aws | |
| labels: | |
| region: us-east-1 | |
| owner: openshift-ci | |
| product: ocp | |
| timeout: 1h0m0s | |
| version: "4.20" | |
| - as: e2e-ote | |
| cluster_claim: | |
| architecture: amd64 | |
| as: unused | |
| cloud: aws | |
| labels: | |
| region: us-east-1 | |
| owner: openshift-ci | |
| product: ocp | |
| timeout: 1h0m0s | |
| version: "4.21" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ci-operator/config/openshift/hive/openshift-hive-master.yaml` around lines
306 - 316, Update the cluster_claim version to match the rest of the job payload
by replacing cluster_claim.version "4.20" with "4.21"; locate the cluster_claim
block (the cluster_claim: entry and its version field) in the
openshift-hive-master.yaml and change the value to "4.21" so the AWS OTE job is
pinned to the same release as the rest of the config.
| test: | ||
| - as: test | ||
| cli: latest | ||
| commands: | | ||
| export KUBECONFIG="${SHARED_DIR}/kubeconfig" | ||
| source $SHARED_DIR/vsphere_context.sh | ||
| source $SHARED_DIR/govc.sh | ||
| source $SHARED_DIR/additional_cluster.sh | ||
|
|
||
| export CLUSTER_NAME=$ADDITIONAL_CLUSTER_NAME | ||
| export VSPHERE_API_VIP=$ADDITIONAL_CLUSTER_API_VIP | ||
| export VSPHERE_INGRESS_VIP=$ADDITIONAL_CLUSTER_INGRESS_VIP | ||
| export VSPHERE_MACHINE_NETWORK=$(<"${SHARED_DIR}"/machinecidr.txt) | ||
| export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt) | ||
| export VSPHERE_INSTALLER_PLATFORM_SPEC_JSON=$(<"${SHARED_DIR}"/platform.json) | ||
|
|
||
| export PLATFORM=vsphere | ||
| /usr/bin/openshift-tests-extension run-suite -c 1 openshift/hive -j ${ARTIFACT_DIR}/junit_results.xml | ||
| dependencies: | ||
| - env: HIVE_IMAGE | ||
| name: hive | ||
| - env: RELEASE_IMAGE | ||
| name: release:latest | ||
| from: hive-tests |
There was a problem hiding this comment.
Mirror the vsphere-ibmcloud-ci credentials mount from the existing vSphere job.
This OTE variant sources the same vSphere helper scripts as e2e-vsphere, but it omits the extra secret mount that job uses. Without that vault-backed credential, the govc/vSphere setup is likely to fail before the suite even starts.
Suggested fix
- as: test
cli: latest
commands: |
export KUBECONFIG="${SHARED_DIR}/kubeconfig"
source $SHARED_DIR/vsphere_context.sh
source $SHARED_DIR/govc.sh
source $SHARED_DIR/additional_cluster.sh
@@
export PLATFORM=vsphere
/usr/bin/openshift-tests-extension run-suite -c 1 openshift/hive -j ${ARTIFACT_DIR}/junit_results.xml
+ credentials:
+ - mount_path: /var/run/vault/vsphere-ibmcloud-ci
+ name: vsphere-ibmcloud-ci
+ namespace: test-credentials
dependencies:
- env: HIVE_IMAGE
name: hive📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| test: | |
| - as: test | |
| cli: latest | |
| commands: | | |
| export KUBECONFIG="${SHARED_DIR}/kubeconfig" | |
| source $SHARED_DIR/vsphere_context.sh | |
| source $SHARED_DIR/govc.sh | |
| source $SHARED_DIR/additional_cluster.sh | |
| export CLUSTER_NAME=$ADDITIONAL_CLUSTER_NAME | |
| export VSPHERE_API_VIP=$ADDITIONAL_CLUSTER_API_VIP | |
| export VSPHERE_INGRESS_VIP=$ADDITIONAL_CLUSTER_INGRESS_VIP | |
| export VSPHERE_MACHINE_NETWORK=$(<"${SHARED_DIR}"/machinecidr.txt) | |
| export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt) | |
| export VSPHERE_INSTALLER_PLATFORM_SPEC_JSON=$(<"${SHARED_DIR}"/platform.json) | |
| export PLATFORM=vsphere | |
| /usr/bin/openshift-tests-extension run-suite -c 1 openshift/hive -j ${ARTIFACT_DIR}/junit_results.xml | |
| dependencies: | |
| - env: HIVE_IMAGE | |
| name: hive | |
| - env: RELEASE_IMAGE | |
| name: release:latest | |
| from: hive-tests | |
| test: | |
| - as: test | |
| cli: latest | |
| commands: | | |
| export KUBECONFIG="${SHARED_DIR}/kubeconfig" | |
| source $SHARED_DIR/vsphere_context.sh | |
| source $SHARED_DIR/govc.sh | |
| source $SHARED_DIR/additional_cluster.sh | |
| export CLUSTER_NAME=$ADDITIONAL_CLUSTER_NAME | |
| export VSPHERE_API_VIP=$ADDITIONAL_CLUSTER_API_VIP | |
| export VSPHERE_INGRESS_VIP=$ADDITIONAL_CLUSTER_INGRESS_VIP | |
| export VSPHERE_MACHINE_NETWORK=$(<"${SHARED_DIR}"/machinecidr.txt) | |
| export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt) | |
| export VSPHERE_INSTALLER_PLATFORM_SPEC_JSON=$(<"${SHARED_DIR}"/platform.json) | |
| export PLATFORM=vsphere | |
| /usr/bin/openshift-tests-extension run-suite -c 1 openshift/hive -j ${ARTIFACT_DIR}/junit_results.xml | |
| credentials: | |
| - mount_path: /var/run/vault/vsphere-ibmcloud-ci | |
| name: vsphere-ibmcloud-ci | |
| namespace: test-credentials | |
| dependencies: | |
| - env: HIVE_IMAGE | |
| name: hive | |
| - env: RELEASE_IMAGE | |
| name: release:latest | |
| from: hive-tests |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ci-operator/config/openshift/hive/openshift-hive-master.yaml` around lines
404 - 427, The test step is missing the vault-backed credential mount used by
the e2e-vsphere job, which is required by the helper scripts sourced here
(source $SHARED_DIR/vsphere_context.sh and source $SHARED_DIR/govc.sh); add the
same secret/credentials mount as the vsphere-ibmcloud-ci entry in e2e-vsphere to
this test step so the govc/vSphere credentials are available under SHARED_DIR
(mount the secret with the same name and path used by e2e-vsphere), ensuring the
helper scripts can read the creds before running
/usr/bin/openshift-tests-extension.
|
/pj-rehearse pull-ci-openshift-hive-master-e2e-ote |
|
@miyadav: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-hive-master-e2e-ote |
|
@miyadav: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@miyadav: The following test 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. |
/hold
This PR adds OpenShift Test Extension (OTE) end-to-end testing to the Hive project's CI/CD pipeline.
What's changing: The PR updates the CI configuration for the OpenShift Hive repository to introduce new OTE e2e test jobs that validate Hive's functionality across multiple cloud platforms.
Practical impact:
The
hive-testscontainer image is being rebuilt with a cleaner, more reproducible approach — starting from an OpenShift builder image and explicitly checking out Hive at a specific branch before compiling the OTE test binary. The resulting container includes necessary runtime dependencies (gzip, jq) and is based on UBI9 minimal for a smaller footprint.Four new OTE e2e test jobs are added to the Hive CI pipeline:
Each job runs the OTE test suite against the Hive codebase, produces JUnit test results, and includes explicit timeout and conditional execution guards to avoid unnecessary runs on configuration-only changes.
This enables automated validation of Hive's test infrastructure across major cloud providers, ensuring consistent test behavior and reducing manual verification effort for OTE-related changes.