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. |
WalkthroughAdds a ChangesOTE e2e Testing Pipeline
sequenceDiagram
participant Builder as Builder Image (ocp/builder:rhel-9-golang-1.25)
participant Repo as Hive Git Repo (fix-ote-init)
participant Runtime as hive-tests Runtime Image
participant CI as CI Job (e2e-*-ote)
participant Cluster as Target Cluster (kubeconfig)
participant Artifacts as Artifact Storage (${ARTIFACT_DIR})
Builder->>Repo: clone hive@fix-ote-init
Builder->>Builder: make -C test/ote build
Builder->>Runtime: copy built binary to /usr/bin/openshift-tests-extension
Builder->>Runtime: install gzip and jq then gzip binary
CI->>Runtime: run container from hive-tests
CI->>Cluster: provide kubeconfig and platform context
Runtime->>Cluster: /usr/bin/openshift-tests-extension run-suite -c 1 openshift/hive -j ${ARTIFACT_DIR}/junit_results.xml
Runtime->>Artifacts: write junit_results.xml
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
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. |
|
/pj-rehearse pull-ci-openshift-hive-master-e2e-ote-a |
|
@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-a |
|
@miyadav: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ci-operator/config/openshift/hive/openshift-hive-master.yaml (1)
303-477: Regenerate downstream artifacts after finalizing changes.As per coding guidelines: "After modifying CI configuration files in
ci-operator/config/, regenerate downstream artifacts by runningmake update".🤖 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 303 - 477, You changed CI config entries (e.g., the jobs identified by "as: e2e-ote-a", "as: e2e-ote-b" and other workflows in openshift-hive-master.yaml) but did not regenerate downstream artifacts; run the repo's artifact generation to update ci-operator outputs by executing the project make target (make update), verify the generated files are updated, and commit the resulting changes alongside your config edits so the downstream artifacts stay in sync.
🤖 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.
Nitpick comments:
In `@ci-operator/config/openshift/hive/openshift-hive-master.yaml`:
- Around line 303-477: You changed CI config entries (e.g., the jobs identified
by "as: e2e-ote-a", "as: e2e-ote-b" and other workflows in
openshift-hive-master.yaml) but did not regenerate downstream artifacts; run the
repo's artifact generation to update ci-operator outputs by executing the
project make target (make update), verify the generated files are updated, and
commit the resulting changes alongside your config edits so the downstream
artifacts stay in sync.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 41c84de4-c458-4212-bc68-e8e1de6e2e44
📒 Files selected for processing (1)
ci-operator/config/openshift/hive/openshift-hive-master.yaml
647cb09 to
a24a186
Compare
|
/pj-rehearse pull-ci-openshift-hive-master-e2e-ote-a |
|
@miyadav: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
a24a186 to
2e5cdcb
Compare
|
/pj-rehearse pull-ci-openshift-hive-master-e2e-ote-a |
|
@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-a |
|
@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-b |
|
@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-a |
|
@miyadav: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
4d7df25 to
3f7d85a
Compare
|
/pj-rehearse periodic-ci-openshift-hive-master-periodic-e2e-ote-sd-rosa-a periodic-ci-openshift-hive-master-periodic-e2e-ote-sd-rosa-b |
|
@miyadav: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse periodic-ci-openshift-hive-master-periodic-e2e-ote-sd-rosa-a periodic-ci-openshift-hive-master-periodic-e2e-ote-sd-rosa-b |
|
@miyadav: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[REHEARSALNOTIFIER]
A total of 26 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs. A full list of affected jobs can be found here Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@miyadav: The following tests 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. |
|
/close |
|
@miyadav: Closed this PR. 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 kubernetes-sigs/prow repository. |
/hold
This PR updates OpenShift CI configuration for the openshift/hive repository to add OpenShift Test Extension (OTE) end-to-end tests and to rebuild the hive-tests image used by those jobs.
What changed (practical terms)
Practical impact
Notes / review pointers