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

  • Replaced three duplicated ARO-HCP provisioning implementations with thin wrappers that delegate to shared scripts in the ARO-HCP repository.
  • The wrappers load slot configuration, validate and export LOCATION, set CLUSTER_PROFILE_DIR, and execute the corresponding shared provisioning script.
  • Removed duplicated Azure authentication, image resolution, configuration generation, templating, and completion logic—515 lines replaced by 51 lines of wrapper code.
  • Depends on ARO-HCP pull request 6296.

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

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The ARO HCP step scripts now perform lightweight environment initialization and delegate Hypershift, environment, and from-main provisioning to dedicated hack/ci scripts. Inline Azure authentication, image resolution, configuration generation, templating, and completion handling were removed.

Changes

ARO HCP provisioning delegation

Layer / File(s) Summary
Hypershift deployment handoff
ci-operator/step-registry/aro-hcp/hypershift-deploy/...
The wrapper loads slot configuration, validates LOCATION, sets CLUSTER_PROFILE_DIR, and executes hack/ci/provision-hypershift.sh.
Provisioning entrypoint handoffs
ci-operator/step-registry/aro-hcp/provision/{environment,from-main}/...
The environment and from-main wrappers retain initialization and execute their corresponding dedicated provisioning scripts instead of performing inline provisioning.

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

Suggested reviewers: mcornea

🚥 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 accurately summarizes the main change: moving ARO-HCP provisioning step-registry scripts into the ARO-HCP repo.
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 PR only rewrites three shell wrapper scripts; no Ginkgo tests or test titles were added or changed.
Test Structure And Quality ✅ Passed PR only rewrites three shell step-registry wrappers; no Ginkgo test files or test code were changed, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed Only three shell wrapper scripts changed; no Ginkgo tests were added or modified, so MicroShift compatibility is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only shell wrapper scripts changed; no Ginkgo e2e tests were added or modified, so SNO-specific test review is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The PR only rewrites three shell wrappers; no manifests, operators, controllers, or scheduling constraints were added or modified.
Ote Binary Stdout Contract ✅ Passed The changed wrapper scripts contain no stdout writes in process-level code; they only source env, validate LOCATION, set CLUSTER_PROFILE_DIR, and exec shared scripts.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only shell wrapper scripts changed; no new Ginkgo tests, IPv4-specific logic, or external connectivity requirements were added.
No-Weak-Crypto ✅ Passed The changed scripts are thin shell wrappers only; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons appear in them.
Container-Privileges ✅ Passed Only thin shell wrappers changed; diff and file contents show no privileged, hostNetwork, hostPID, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The changed wrapper scripts contain no echo/printf/debug logging or xtrace, so they do not expose secrets or other sensitive 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
@openshift-ci

openshift-ci Bot commented Jul 28, 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 mmazur 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

@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
@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-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
pull-ci-openshift-hypershift-main-e2e-aro-hcp openshift/hypershift presubmit Registry content changed
periodic-ci-Azure-ARO-HCP-main-periodic-healthcheck-provision-westus3 N/A periodic 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

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

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.

@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.

@openshift-ci

openshift-ci Bot commented Jul 31, 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 e2e9b40 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