[WIP] automate Orion configurations and metadata detection#80284
[WIP] automate Orion configurations and metadata detection#80284rsevilla87 wants to merge 4 commits into
Conversation
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughSwitches ORION_CONFIG selection to workload-type-driven behavior: adds ORION_WORKLOAD_TYPE in step refs, derives ORION_CONFIG from that type when empty, fetches cluster metadata via ocp-metadata, tightens config-download conditions, and adjusts the Orion repo checkout and invocation. ChangesOrion workload type and configuration selection
🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels: Suggested reviewers:
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rsevilla87 The full list of commands accepted by this bot can be found here. The pull request process is described 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: 4
🤖 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/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh`:
- Line 104: The assignment uses unquoted variables which can cause
word-splitting/globbing; update occurrences to quote ORION_CONFIG (e.g.,
fileBasename="$(basename "${ORION_CONFIG}")") and any uses of ARTIFACT_DIR to
use "${ARTIFACT_DIR}" so paths with spaces are safe, but keep EXTRA_FLAGS
unquoted where intentionally meant to split into multiple args (line with
EXTRA_FLAGS on or around 180); ensure references to ORION_CONFIG, EXTRA_FLAGS,
ARTIFACT_DIR and fileBasename are the ones you change.
- Line 18: Replace the personal development repository URLs with the official
organization repos: find and replace occurrences of
"https://github.com/rsevilla87/orion.git" with the official
"https://github.com/cloud-bulldozer/orion.git" and replace
"https://github.com/rsevilla87/go-commons" (and any similar
rsevilla87/go-commons references) with the official go-commons repository
source; update both git clone lines and any related references in the script
(search for the exact URL strings) so the CI uses the official cloud-bulldozer
repositories before removing the WIP tag.
- Line 18: The git clone invocation uses the URL as the --branch value; update
the git clone command so the repository URL is the positional argument and the
branch uses the LATEST_TAG variable (i.e., pass LATEST_TAG to --branch),
replacing the invalid "--branch https://github.com/..." usage in the git clone
line so it becomes: git clone -q --branch "$LATEST_TAG"
https://github.com/rsevilla87/orion.git --depth 1; ensure you reference the
LATEST_TAG variable declared earlier.
- Around line 76-81: The script downloads and immediately executes the
ocp-metadata-linux-amd64 binary which will fail without executable permission
and lacks verification and error handling; update the block that sets
ORION_CONFIG / downloads ocp-metadata-linux-amd64 so that after curl you (1)
check curl exit status and fail with a clear error if the download failed, (2)
validate the binary via checksum or signature before use (or switch to an
official release URL), (3) chmod +x the downloaded ocp-metadata-linux-amd64
before running it, and (4) handle failures from executing
ocp-metadata-linux-amd64 and avoid proceeding if CLUSTER_METADATA is empty;
reference symbols: ORION_WORKLOAD_TYPE, ORION_CONFIG, ocp-metadata-linux-amd64,
CLUSTER_METADATA, EXTRA_FLAGS.
🪄 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: b2c492df-f8a7-4de0-9892-a4c7694f1713
📒 Files selected for processing (3)
ci-operator/step-registry/openshift-qe/orion/crd-scale/openshift-qe-orion-crd-scale-ref.yamlci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.shci-operator/step-registry/openshift-qe/orion/udn-density/openshift-qe-orion-udn-density-ref.yaml
9010d1b to
f9320ed
Compare
|
/pj-rehearse periodic-ci-openshift-eng-ocp-qe-perfscale-ci-main-aws-5.0-nightly-x86-payload-control-plane-6nodes |
|
@rsevilla87: 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.
Actionable comments posted: 2
🤖 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/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh`:
- Around line 76-85: The cluster metadata binary is executed without being on
PATH and the appended flag is later dropped because EXTRA_FLAGS is
reinitialized; fix by installing or invoking the helper with a stable path
(move/copy ocp-metadata-linux-amd64 into /usr/local/bin or call it via
./ocp-metadata-linux-amd64) and capture its output into CLUSTER_METADATA, then
ensure EXTRA_FLAGS is not re-assigned later (do not reinitialize EXTRA_FLAGS or
re-append --input-vars=${CLUSTER_METADATA} after any reset) so the --input-vars
flag is present when invoking orion; update the block around
ORION_WORKLOAD_TYPE/ORION_CONFIG, ocp-metadata-linux-amd64, CLUSTER_METADATA,
and EXTRA_FLAGS accordingly.
- Around line 13-18: The current hardcoded git clone (git clone -q
https://github.com/rsevilla87/orion.git --depth 1) ignores ORION_REPO and TAG;
restore the original logic: compute LATEST_TAG by checking if TAG == "latest"
(use git ls-remote ... | awk ... | sort -V | tail -n1) otherwise set
LATEST_TAG=$TAG, then perform git clone -q "$ORION_REPO" --branch "$LATEST_TAG"
--depth 1 (or equivalent) so the main checkout uses the same repo/tag inputs as
the experimental block and both runs analyze the same revision.
🪄 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: b1671f30-079f-4e4d-9711-f9a333593ca8
📒 Files selected for processing (1)
ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh
| #if [[ $TAG == "latest" ]]; then | ||
| # LATEST_TAG=$(git ls-remote --tags https://github.com/cloud-bulldozer/orion.git | awk -F'refs/tags/' '{print $2}' | grep -v '\^{}' | sort -V | tail -n1) | ||
| #else | ||
| # LATEST_TAG=$TAG | ||
| #fi | ||
| git clone -q https://github.com/rsevilla87/orion.git --depth 1 |
There was a problem hiding this comment.
Don't drop the repo/tag inputs from the main checkout.
This now always clones a hardcoded default branch, so the main run ignores ${ORION_REPO} and ${TAG} while the experimental block later still clones ${ORION_REPO}. The two Orion runs can end up analyzing different revisions entirely.
🔧 Suggested fix
-#if [[ $TAG == "latest" ]]; then
-# LATEST_TAG=$(git ls-remote --tags https://github.com/cloud-bulldozer/orion.git | awk -F'refs/tags/' '{print $2}' | grep -v '\^{}' | sort -V | tail -n1)
-#else
-# LATEST_TAG=$TAG
-#fi
-git clone -q https://github.com/rsevilla87/orion.git --depth 1
+if [[ "${TAG}" == "latest" ]]; then
+ LATEST_TAG=$(git ls-remote --tags "${ORION_REPO}" | awk -F'refs/tags/' '{print $2}' | grep -v '\^{}' | sort -V | tail -n1)
+else
+ LATEST_TAG="${TAG}"
+fi
+git clone -q --branch "${LATEST_TAG}" "${ORION_REPO}" --depth 1Based on the PR objective and stack context for Orion workload config derivation.
🤖 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/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh`
around lines 13 - 18, The current hardcoded git clone (git clone -q
https://github.com/rsevilla87/orion.git --depth 1) ignores ORION_REPO and TAG;
restore the original logic: compute LATEST_TAG by checking if TAG == "latest"
(use git ls-remote ... | awk ... | sort -V | tail -n1) otherwise set
LATEST_TAG=$TAG, then perform git clone -q "$ORION_REPO" --branch "$LATEST_TAG"
--depth 1 (or equivalent) so the main checkout uses the same repo/tag inputs as
the experimental block and both runs analyze the same revision.
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
f9320ed to
424e933
Compare
|
/pj-rehearse periodic-ci-openshift-eng-ocp-qe-perfscale-ci-main-aws-5.0-nightly-x86-payload-control-plane-6nodes |
|
@rsevilla87: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
|
/pj-rehearse periodic-ci-openshift-eng-ocp-qe-perfscale-ci-main-aws-5.0-nightly-x86-payload-control-plane-6nodes |
|
@rsevilla87: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
|
[REHEARSALNOTIFIER]
A total of 179 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: |
|
/pj-rehearse periodic-ci-openshift-eng-ocp-qe-perfscale-ci-main-aws-5.0-nightly-x86-payload-control-plane-6nodes |
|
@rsevilla87: 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh (1)
80-80:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove orphan curl command downloading unused file.
Line 80 downloads
ocp-metadata-linux-amd64but this file is never used. Line 81 downloads a different file (ocp-metadata) which is what's actually executed at line 86. This appears to be a leftover from a previous edit.🐛 Proposed fix
if [[ -n "${ORION_WORKLOAD_TYPE:-}" ]] && [[ -z "${ORION_CONFIG:-}" ]]; then ORION_CONFIG="examples/${ORION_WORKLOAD_TYPE}.yaml" - curl -LO https://github.com/rsevilla87/go-commons/releases/download/v1.2.4/ocp-metadata-linux-amd64 if ! curl -fsSLO https://github.com/rsevilla87/go-commons/releases/download/v1.2.4/ocp-metadata; then echo "Error: Failed to download ocp-metadata binary" exit 1🤖 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/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh` at line 80, Remove the unused download command for ocp-metadata-linux-amd64: delete the curl invocation that fetches "https://github.com/rsevilla87/go-commons/releases/download/v1.2.4/ocp-metadata-linux-amd64" since the script actually uses the "ocp-metadata" binary (downloaded later) at the execution point referenced by "ocp-metadata"; ensure only the needed curl for "ocp-metadata" remains so no orphan artifact is downloaded.
🤖 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.
Outside diff comments:
In `@ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh`:
- Line 80: Remove the unused download command for ocp-metadata-linux-amd64:
delete the curl invocation that fetches
"https://github.com/rsevilla87/go-commons/releases/download/v1.2.4/ocp-metadata-linux-amd64"
since the script actually uses the "ocp-metadata" binary (downloaded later) at
the execution point referenced by "ocp-metadata"; ensure only the needed curl
for "ocp-metadata" remains so no orphan artifact is downloaded.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 81235d1e-214e-4746-ba6c-d16f9a71ca7b
📒 Files selected for processing (1)
ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh
|
@rsevilla87: 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. |
Summary by CodeRabbit
This PR modifies OpenShift CI step definitions and the Orion runner used by OpenShift QE performance jobs (ci-operator/step-registry/openshift-qe/orion). It adds workload-type driven auto-selection of Orion configs, injects runtime cluster metadata into Orion invocations, and changes how the Orion codebase and metadata tool are fetched.
What changed in practice
Files / step refs impacted
Reviewer notes / impact