Use slot-manager for e2e-parallel job#80156
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (16)
✅ Files skipped from review due to trivial changes (8)
🚧 Files skipped from review as they are similar to previous changes (7)
WalkthroughThis PR adds step-registry entries and ownership for ARO-HCP lease acquire/release, updates the local-e2e workflow to run acquire as a pre-step and release as a post-step, and changes multiple scripts and job config to source a runtime slot env file and resolve LOCATION from SELECTED_LOCATION or MULTISTAGE_PARAM_OVERRIDE_LOCATION. ChangesARO-HCP Lease Lifecycle and Runtime Environment Sourcing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
b91c377 to
9e8d4cf
Compare
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/step-registry/aro-hcp/test/local/aro-hcp-test-local-commands.sh`:
- Around line 12-17: After sourcing the runtime slot env (source "${env_file}"),
immediately validate that CUSTOMER_SUBSCRIPTION is present by adding a guard
like using shell parameter expansion (e.g., :
"${CUSTOMER_SUBSCRIPTION:?CUSTOMER_SUBSCRIPTION must be provided by the runtime
slot env}"); place this check alongside the existing LOCATION export block so
any slot contract regression fails fast with a clear message before
CUSTOMER_SUBSCRIPTION is referenced later.
🪄 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: 110c5bbe-08a3-4a55-ad24-fe6de46e05c4
📒 Files selected for processing (15)
ci-operator/config/Azure/ARO-HCP/Azure-ARO-HCP-main.yamlci-operator/step-registry/aro-hcp/lease/acquire/OWNERSci-operator/step-registry/aro-hcp/lease/acquire/aro-hcp-lease-acquire-commands.shci-operator/step-registry/aro-hcp/lease/acquire/aro-hcp-lease-acquire-ref.metadata.jsonci-operator/step-registry/aro-hcp/lease/acquire/aro-hcp-lease-acquire-ref.yamlci-operator/step-registry/aro-hcp/lease/release/OWNERSci-operator/step-registry/aro-hcp/lease/release/aro-hcp-lease-release-commands.shci-operator/step-registry/aro-hcp/lease/release/aro-hcp-lease-release-ref.metadata.jsonci-operator/step-registry/aro-hcp/lease/release/aro-hcp-lease-release-ref.yamlci-operator/step-registry/aro-hcp/local-e2e/aro-hcp-local-e2e-workflow.yamlci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.shci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-ref.yamlci-operator/step-registry/aro-hcp/test/local/aro-hcp-test-local-commands.shci-operator/step-registry/aro-hcp/write-config/aro-hcp-write-config-commands.shci-operator/step-registry/aro-hcp/write-config/aro-hcp-write-config-ref.yaml
| # shellcheck disable=SC1090 | ||
| source "${env_file}" | ||
|
|
||
| export LOCATION="${SELECTED_LOCATION:-${LOCATION:-}}" | ||
| : "${LOCATION:?LOCATION must be provided by SELECTED_LOCATION or the legacy runtime slot export file}" | ||
|
|
There was a problem hiding this comment.
Validate CUSTOMER_SUBSCRIPTION immediately after sourcing runtime slot env.
CUSTOMER_SUBSCRIPTION is used later (Line 41) but not asserted at the env-file boundary. Add an explicit guard here so slot contract regressions fail early with a clear message.
Suggested fix
# shellcheck disable=SC1090
source "${env_file}"
export LOCATION="${SELECTED_LOCATION:-${LOCATION:-}}"
: "${LOCATION:?LOCATION must be provided by SELECTED_LOCATION or the legacy runtime slot export file}"
+: "${CUSTOMER_SUBSCRIPTION:?CUSTOMER_SUBSCRIPTION must be provided by the runtime slot export file}"📝 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.
| # shellcheck disable=SC1090 | |
| source "${env_file}" | |
| export LOCATION="${SELECTED_LOCATION:-${LOCATION:-}}" | |
| : "${LOCATION:?LOCATION must be provided by SELECTED_LOCATION or the legacy runtime slot export file}" | |
| # shellcheck disable=SC1090 | |
| source "${env_file}" | |
| export LOCATION="${SELECTED_LOCATION:-${LOCATION:-}}" | |
| : "${LOCATION:?LOCATION must be provided by SELECTED_LOCATION or the legacy runtime slot export file}" | |
| : "${CUSTOMER_SUBSCRIPTION:?CUSTOMER_SUBSCRIPTION must be provided by the runtime slot export file}" |
🤖 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/aro-hcp/test/local/aro-hcp-test-local-commands.sh`
around lines 12 - 17, After sourcing the runtime slot env (source
"${env_file}"), immediately validate that CUSTOMER_SUBSCRIPTION is present by
adding a guard like using shell parameter expansion (e.g., :
"${CUSTOMER_SUBSCRIPTION:?CUSTOMER_SUBSCRIPTION must be provided by the runtime
slot env}"); place this check alongside the existing LOCATION export block so
any slot contract regression fails fast with a clear message before
CUSTOMER_SUBSCRIPTION is referenced later.
|
/pj-rehearse pull-ci-Azure-ARO-HCP-main-e2e-parallel |
|
@roivaz: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
9e8d4cf to
a02728c
Compare
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/pj-rehearse pull-ci-Azure-ARO-HCP-main-e2e-parallel |
|
@roivaz: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-Azure-ARO-HCP-main-e2e-parallel |
|
@roivaz: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: raelga, roivaz 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 |
|
/pj-rehearse ack |
|
@roivaz: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@roivaz: all tests passed! 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. |
https://redhat.atlassian.net/browse/ARO-27243
Summary by CodeRabbit
This pull request introduces slot-manager integration for ARO (Azure Red Hat OpenShift) HCP E2E parallel job testing. The changes refactor how Boskos resource leases are managed in the CI pipeline by replacing inline lease configurations with dedicated acquire and release steps.
Key changes:
Lease Management Refactoring:
aro-hcp-lease-acquireandaro-hcp-lease-releasestep-registry entries that invoke the slot-manager to dynamically acquire and release Boskos leases during test workflowsSELECTED_LOCATION) toSHARED_DIR/aro-hcp-slot.envfor consumption by downstream test stepspreandpoststep referencesRuntime Location Resolution:
SELECTED_LOCATION(assigned by slot-manager) rather than relying on hardcodedLOCATIONvaluesMULTISTAGE_PARAM_OVERRIDE_LOCATIONinstead of directly settingLOCATIONLOCATIONifSELECTED_LOCATIONis not availableStep Registry Updates:
aro-hcp-sl-approversandaro-hcp-sl-reviewersgroups as maintainersThis refactoring enables dynamic resource allocation by allowing the slot-manager to choose available regions/subscriptions at test runtime rather than using predetermined values.