Skip to content

ARO-HCP: move provisioning step-registry scripts to ARO-HCP repo - #82572

Open
gmfrasca wants to merge 1 commit into
openshift:mainfrom
gmfrasca:aro28196-use-arohcp-provision
Open

ARO-HCP: move provisioning step-registry scripts to ARO-HCP repo#82572
gmfrasca wants to merge 1 commit into
openshift:mainfrom
gmfrasca:aro28196-use-arohcp-provision

Conversation

@gmfrasca

@gmfrasca gmfrasca commented Jul 28, 2026

Copy link
Copy Markdown
Member

Rewrite three ARO-HCP provisioning step-registry scripts as thin wrappers
that exec into shared scripts in the ARO-HCP repository:

  • aro-hcp-provision-environmenthack/ci/provision-environment.sh
  • aro-hcp-provision-from-mainhack/ci/provision-from-main.sh
  • aro-hcp-hypershift-deployhack/ci/provision-hypershift.sh

Each wrapper now only handles slot environment setup (sourcing
aro-hcp-slot.env, exporting LOCATION and CLUSTER_PROFILE_DIR)
before delegating to the ARO-HCP repo. This reduces 515 lines of
duplicated provisioning logic to 3x 17-line shims.

Depends on: Azure/ARO-HCP#6296

Summary by CodeRabbit

The ARO-HCP step registry now uses thin wrappers for environment provisioning, provisioning from main, and Hypershift deployment. Each wrapper loads aro-hcp-slot.env, validates and exports LOCATION, sets CLUSTER_PROFILE_DIR, and delegates to the shared ARO-HCP script.

This removes 515 lines of duplicated Azure, image, provisioning, and cleanup logic. The change depends on ARO-HCP pull request 6296.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 4028ef50-0b83-4b86-89cf-5ca177c0dafd

📥 Commits

Reviewing files that changed from the base of the PR and between 086f3b0 and a2b6c68.

📒 Files selected for processing (2)
  • ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh
  • ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh
  • ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.sh

Walkthrough

The ARO HCP step wrappers now perform lightweight environment setup and delegate Hypershift and environment provisioning to shared scripts. Inline Azure authentication, image resolution, validation, finalization, and completion logic were removed.

Changes

ARO HCP provisioning delegation

Layer / File(s) Summary
Hypershift deployment delegation
ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh
The wrapper sources slot data, validates LOCATION, sets CLUSTER_PROFILE_DIR, and executes hack/ci/provision-hypershift.sh.
Environment provisioning delegation
ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.sh
The wrapper initializes LOCATION and CLUSTER_PROFILE_DIR, then executes hack/ci/provision-environment.sh.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: geoberle, deads2k

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: moving ARO-HCP provisioning logic from step-registry scripts to the ARO-HCP repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The commit changes only two shell wrappers and adds no Ginkgo test declarations or dynamic test-title expressions.
Test Structure And Quality ✅ Passed The diff changes only two shell wrapper scripts; it adds or modifies no Ginkgo tests, so the stated test-quality requirements do not apply.
Microshift Test Compatibility ✅ Passed The PR diff modifies only two Bash wrappers and adds no Ginkgo It/Describe/Context/When tests or MicroShift-incompatible test APIs; this check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The parent-to-HEAD diff changes only two shell wrapper scripts and adds no Ginkgo e2e tests, so SNO compatibility rules do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed The commit changes only two shell wrappers. It adds no deployment manifests, operator/controller code, or scheduling constraints such as affinity, topology spread, selectors, tolerations, replicas,...
Ote Binary Stdout Contract ✅ Passed The commit changes only two shell wrappers; added lines are an export and exec, with no OTE Go code or process-level stdout writes. The from-main wrapper is unchanged.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The diff changes only two Bash wrappers and adds no Ginkgo tests, IPv4 assumptions, or external connectivity requirements; this check is not applicable.
No-Weak-Crypto ✅ Passed The actual diff adds only environment setup and exec delegation; it introduces no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The exact diff changes only two shell wrappers; added lines contain no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings, and ARO-HCP manifests contain none.
No-Sensitive-Data-In-Logs ✅ Passed Changed wrappers add no logging and remove prior ACR/registry/digest and config output; no changed line exposes passwords, tokens, PII, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from deads2k and geoberle July 28, 2026 17:12
@gmfrasca

Copy link
Copy Markdown
Member Author

/hold
depends on Azure/ARO-HCP#6296 to merge first

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 28, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh (1)

17-17: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

All three wrappers exec an unqualified relative path with no CWD anchor. The shared root cause is that each shim assumes the step's working directory is the ARO-HCP clone root; a cwd override in the ref, a job in another repo referencing these steps, or a missing executable bit produces an opaque No such file or directory with none of the previous inline diagnostics. Anchoring the path (e.g. cd "/go/src/github.com/Azure/ARO-HCP" or resolving via a repo-root variable) plus a [[ -x ... ]] precheck makes the failure self-explanatory.

  • ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh#L17-L17: anchor the path before exec hack/ci/provision-hypershift.sh and precheck that it is executable.
  • ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.sh#L17-L17: apply the same anchor/precheck around exec hack/ci/provision-environment.sh.
  • ci-operator/step-registry/aro-hcp/provision/from-main/aro-hcp-provision-from-main-commands.sh#L17-L17: apply the same anchor/precheck around exec hack/ci/provision-from-main.sh.
♻️ Illustrative pattern (apply per file with the matching script name)
-exec hack/ci/provision-hypershift.sh
+provision_script="hack/ci/provision-hypershift.sh"
+if [[ ! -x "${provision_script}" ]]; then
+    echo "ERROR: ${provision_script} not found or not executable in $(pwd); expected the ARO-HCP repository root" >&2
+    exit 1
+fi
+exec "${provision_script}"
🤖 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/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh`
at line 17, Anchor the repository path and add an executable precheck before the
exec command in
ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh:17-17,
then exec the anchored hack/ci/provision-hypershift.sh. Apply the same anchor
and precheck in
ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.sh:17-17
for provision-environment.sh and
ci-operator/step-registry/aro-hcp/provision/from-main/aro-hcp-provision-from-main-commands.sh:17-17
for provision-from-main.sh.
🤖 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/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh`:
- Line 15: Update the CLUSTER_PROFILE_DIR assignment to safely handle an unset
VAULT_SECRET_PROFILE under nounset, defaulting the profile value to dev while
preserving explicitly provided values.

---

Nitpick comments:
In
`@ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh`:
- Line 17: Anchor the repository path and add an executable precheck before the
exec command in
ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh:17-17,
then exec the anchored hack/ci/provision-hypershift.sh. Apply the same anchor
and precheck in
ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.sh:17-17
for provision-environment.sh and
ci-operator/step-registry/aro-hcp/provision/from-main/aro-hcp-provision-from-main-commands.sh:17-17
for provision-from-main.sh.
🪄 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: Pro Plus

Run ID: f064c54a-113d-4797-914e-30f127516e4a

📥 Commits

Reviewing files that changed from the base of the PR and between fcc0e20 and e2e9b40.

📒 Files selected for processing (3)
  • ci-operator/step-registry/aro-hcp/hypershift-deploy/aro-hcp-hypershift-deploy-commands.sh
  • ci-operator/step-registry/aro-hcp/provision/environment/aro-hcp-provision-environment-commands.sh
  • ci-operator/step-registry/aro-hcp/provision/from-main/aro-hcp-provision-from-main-commands.sh

@gmfrasca

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-Azure-ARO-HCP-main-e2e-parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

gmfrasca commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Upon further investigation, it appears the hypershift job has historically only run thrice - it passed in the PR which it was introduced, and was aborted or failed in the other 2 runs:
Introduced/Passed
Aborted
Failed

Given that history, the rehearsal failures are suspicious and unlikely to be related to the script migration.

Running a couple other rehearsals for more coverage/confidence:
/pj-rehearse pull-ci-Azure-ARO-HCP-main-capz-e2e-dev
/pj-rehearse pull-ci-Azure-ARO-HCP-main-upgrade-e2e-parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: requesting more than one rehearsal in one comment is not supported. If you would like to rehearse multiple specific jobs, please separate the job names by a space in a single command.

@gmfrasca

gmfrasca commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-Azure-ARO-HCP-main-upgrade-e2e-parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

gmfrasca commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-Azure-ARO-HCP-main-upgrade-e2e-parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

gmfrasca commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

/retest

@gmfrasca

gmfrasca commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp pull-ci-Azure-ARO-HCP-main-upgrade-e2e-parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

Delegate provisioning logic to shared scripts in the ARO-HCP repo

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
@gmfrasca
gmfrasca force-pushed the aro28196-use-arohcp-provision branch from e2e9b40 to a2b6c68 Compare August 11, 2026 21:59
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gmfrasca
Once this PR has been reviewed and has the lgtm label, please assign roivaz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@gmfrasca: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-hypershift-main-e2e-aro-hcp openshift/hypershift presubmit Registry content changed
pull-ci-openshift-hypershift-release-5.1-e2e-aro-hcp openshift/hypershift presubmit Registry content changed
pull-ci-openshift-hypershift-release-5.0-e2e-aro-hcp openshift/hypershift presubmit Registry content changed
pull-ci-openshift-hypershift-release-4.23-e2e-aro-hcp openshift/hypershift presubmit Registry content changed
pull-ci-Azure-ARO-HCP-main-e2e-parallel Azure/ARO-HCP presubmit Registry content changed
pull-ci-Azure-ARO-HCP-main-capz-e2e-dev Azure/ARO-HCP presubmit Registry content changed
pull-ci-Azure-ARO-HCP-main-upgrade-e2e-parallel Azure/ARO-HCP presubmit Registry content changed
periodic-ci-Azure-ARO-HCP-main-periodic-healthcheck-provision-centralus N/A periodic Registry content changed
periodic-ci-Azure-ARO-HCP-main-periodic-healthcheck-provision-canadacentral N/A periodic Registry content changed
periodic-ci-openshift-hypershift-release-5.1-periodics-e2e-aro-hcp N/A periodic Registry content changed
periodic-ci-openshift-hypershift-release-5.0-periodics-e2e-aro-hcp N/A periodic Registry content changed
periodic-ci-Azure-ARO-HCP-main-periodic-healthcheck-provision-westus3 N/A periodic Registry content changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@gmfrasca

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp pull-ci-Azure-ARO-HCP-main-e2e-parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

Copy link
Copy Markdown
Member Author

/pj-rehearse rehearse-82572-pull-ci-openshift-hypershift-main-e2e-aro-hcp

Retesting to get a new baseline - last run was around 2 weeks ago, possible some changes may potentially have affected the job in question.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: job(s): rehearse-82572-pull-ci-openshift-hypershift-main-e2e-aro-hcp either don't exist or were not found to be affected, and cannot be rehearsed

@gmfrasca

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

gmfrasca commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp

Previous rehearsal had new error shape, Suspect transient DNS failure, retrying while investigating in parallel

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@gmfrasca

gmfrasca commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp

Cause of last failure was exaustion of RoleAssignments: quota issue unrelated to PR. Manually verified the sub has RA capacity now at time of re-run

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@gmfrasca: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/openshift/hypershift/main/e2e-aro-hcp a2b6c68 link unknown /pj-rehearse pull-ci-openshift-hypershift-main-e2e-aro-hcp

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant