ARO-HCP: use Prow PULL_BASE_SHA instead of fetching main for upgrade presubmit - #82018
Conversation
|
/pj-rehearse pull-ci-Azure-ARO-HCP-main-upgrade-e2e-parallel |
|
@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe ARO HCP provision-from-main step now selects ChangesARO HCP base commit selection
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 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 |
| # | ||
| # Prow sets PULL_BASE_SHA to the exact base-branch commit used for the | ||
| # merge. That commit is already in the local clone, so no fetch needed. | ||
| # For rehearsal runs (openshift/release PRs), PULL_BASE_SHA belongs to a |
There was a problem hiding this comment.
Does the rehearsal set any env that lets you know that you're in one? If so, detect it and use main explicitly, not implicitly. Make it so a non-rehearsal + invalid PULL_BASE_SHA -> failure.
There was a problem hiding this comment.
We could use the convention that rehearsal jobs are all prefixed with rehearse-. I am not finding any official documentation for that convention, but it is hardcoded here and various other jobs across the repo are using a similar check
There was a problem hiding this comment.
Alternatively we could simply check against REPO_OWNER/REPO_NAME but that's a bit more fragile IMO when dealing with forks, renames, etc
- Use the Prow-provided PULL_BASE_SHA to check out the exact merge base commit, avoiding a redundant git fetch to GitHub. - Falls back to fetching main for rehearsal runs (JOB_NAME=rehearsal-*) - Fails fast if non-rehearsal job and PULL_BASE_SHA not found Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
25b8eec to
650fc7b
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-upgrade-e2e-parallel |
|
@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gmfrasca, janboll 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 |
|
@gmfrasca: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@gmfrasca: 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. |
…ade (openshift#82018) - Use the Prow-provided PULL_BASE_SHA to check out the exact merge base commit, avoiding a redundant git fetch to GitHub. - Falls back to fetching main for rehearsal runs (JOB_NAME=rehearsal-*) - Fails fast if non-rehearsal job and PULL_BASE_SHA not found Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
…ade (openshift#82018) - Use the Prow-provided PULL_BASE_SHA to check out the exact merge base commit, avoiding a redundant git fetch to GitHub. - Falls back to fetching main for rehearsal runs (JOB_NAME=rehearsal-*) - Fails fast if non-rehearsal job and PULL_BASE_SHA not found Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
Summary
The
aro-hcp-provision-from-mainstep was doinggit fetch https://github.com/Azure/ARO-HCP.git mainto check out the base branch, which is redundant and non-deterministic. Prow already clones the repo and setsPULL_BASE_SHAto the exact base-branch commit used for the merge, so the commit is alreadyin the local clone.
This PR switches to using
PULL_BASE_SHAdirectly (no network fetch needed).Rehearsal runs are detected explicitly via the
JOB_NAMEprefix (rehearse-*)Non-rehearsal runs with a missing or invalid
PULL_BASE_SHAfail immediately with a clear error.Changes
JOB_NAME == rehearse-*and fetch main explicitlyPULL_BASE_SHAdirectly for non-rehearsal runsPULL_BASE_SHAis missing or invalid outside of rehearsalsTesting
/pj-rehearse pull-ci-Azure-ARO-HCP-main-upgrade-e2e-parallelSummary by CodeRabbit
PULL_BASE_SHA, ensuring tests provision from the pull request’s actual base commit rather than always usingmain.rehearse-*JOB_NAMEfetch and usemain.