bmctest: added optional presubmit - #83024
Conversation
WalkthroughAdded a disabled-by-default ChangesOpenShift 4.22 BMC test
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ 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: tdomnesc 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: 1
🤖 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-metal3/bmctest/openshift-metal3-bmctest-main.yaml`:
- Around line 35-36: Update the test-openshift-4-22 presubmit configuration to
set optional: true, making the manually triggered job non-blocking while
preserving its existing triggering behavior.
🪄 Autofix
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: Pro Plus
Run ID: 8dff350c-2147-4d82-9b4a-44eabf3c9f9e
⛔ Files ignored due to path filters (1)
ci-operator/jobs/openshift-metal3/bmctest/openshift-metal3-bmctest-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift-metal3/bmctest/openshift-metal3-bmctest-main.yaml
| - always_run: false | ||
| as: test-openshift-4-22 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Repository files around target config:"
git ls-files | rg '(^|/)openshift-metal3-bmctest-main\.ya?ml$|ci-operator/config/openshift-metal3/bmctest|zz_generated_metadata' || true
echo
echo "Target config excerpt:"
if [ -f ci-operator/config/openshift-metal3/bmctest/openshift-metal3-bmctest-main.yaml ]; then
cat -n ci-operator/config/openshift-metal3/bmctest/openshift-metal3-bmctest-main.yaml | sed -n '1,140p'
fi
echo
echo "Search for optional/always_run patterns in same repo/config family:"
rg -n '^\s*(optional|always_run):\s*|ProwJob|presubmit|postsubmit' ci-operator/config/openshift-metal3 || trueRepository: openshift/release
Length of output: 3476
🌐 Web query:
ci-operator test configuration optional always_run nonblocking meaning Openshift CI
💡 Result:
In OpenShift CI, the ci-operator configuration fields always_run and optional control how and when automated tests are executed and whether they gate the merging of pull requests [1][2]. always_run This field determines if a test is triggered automatically for every pull request [1][3]. - When set to true (default), the test runs on every pull request [1]. - When set to false, the test does not automatically trigger on every PR [1]. This is typically used for tests that only need to run under specific conditions or are intended to be triggered manually [3]. - Note: always_run: true is mutually exclusive with conditional execution fields such as run_if_changed and skip_if_only_changed [1][2]. optional This field determines whether a test result is required for a pull request to be merged [1][3]. - When set to true, the test is non-blocking [1]. Even if the test fails, it does not prevent the pull request from being merged [4]. - When set to false (default), the test is blocking (required) [3][4]. The pull request cannot be merged unless the test passes [3]. In summary, a "nonblocking" test in OpenShift CI is achieved by setting optional: true [1][4]. The always_run field controls the trigger mechanism, and setting it to false is often used in combination with other configurations to ensure tests only run when necessary rather than on every single PR [3].
Citations:
- 1: https://docs.ci.openshift.org/architecture/ci-operator/
- 2: https://github.com/openshift/ci-docs/blob/main/content/en/architecture/ci-operator.md
- 3: https://docs.ci.openshift.org/how-tos/creating-a-pipeline/
- 4: https://docs.ci.openshift.org/how-tos/add-security-scanning/
Mark this presubmit as non-blocking.
always_run: false only controls triggering. optional still defaults to false, so a manually triggered test-openshift-4-22 job remains required for merge unless it is made optional.
Proposed change
- always_run: false
+ optional: true📝 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.
| - always_run: false | |
| as: test-openshift-4-22 | |
| - always_run: false | |
| optional: true | |
| as: test-openshift-4-22 |
🤖 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-metal3/bmctest/openshift-metal3-bmctest-main.yaml`
around lines 35 - 36, Update the test-openshift-4-22 presubmit configuration to
set optional: true, making the manually triggered job non-blocking while
preserving its existing triggering behavior.
|
[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: |
|
/pj-rehearse pull-ci-openshift-metal3-bmctest-main-test-openshift-4-22 |
|
@tdomnesc: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-metal3-bmctest-main-test-openshift-4-22 |
|
@tdomnesc: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@tdomnesc: 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. |
add openshift server test run as optional presubmit
Summary by CodeRabbit
Adds an optional, disabled-by-default OpenShift 4.22 presubmit for
bmctest.The test uses the
equinix-ocp-metalcluster profile andlab-smallcluster type. It acquires a cluster, runsbmctest-openshift, and releases the cluster after testing.