ci: fall back to GitHub-hosted runners on forks#20165
Conversation
The custom `oracle-vm-*` self-hosted runner labels are only available inside `vitessio/vitess`. Workflows that hard-code them fail to schedule when a contributor opens a PR from their fork. Guard every `runs-on` that targets a custom runner with `github.repository == 'vitessio/vitess'` so forks fall back to `ubuntu-24.04`. `docker_build_images.yml` is unchanged because its jobs are already gated by `if: github.repository == 'vitessio/vitess'` and never schedule on forks. Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions workflows that currently hard-pin jobs to oracle-vm-* self-hosted runners by adding an expression-based fallback to ubuntu-24.04, intended to prevent jobs from queueing indefinitely when the custom runner labels aren’t available.
Changes:
- Wraps multiple workflow
runs-onvalues withgithub.repository == 'vitessio/vitess'checks to selectoracle-vm-*only in the main repo, elseubuntu-24.04. - Adjusts matrix-driven
runs-onselection inunit_test.ymlandcluster_endtoend.ymlto incorporate the same repository check. - Applies the same fallback pattern across the upgrade/downgrade and example workflows.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/vtop_example.yml | Adds runs-on fallback from oracle-vm-* to ubuntu-24.04 based on github.repository. |
| .github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_query_serving_schema.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_query_serving_queries.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_onlineddl_flow.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_backups_manual.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_backups_e2e.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/unit_test.yml | Gates the race-runner selection with a repository check (oracle runner vs ubuntu). |
| .github/workflows/region_example.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/local_example.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/codecov.yml | Adds runs-on fallback logic for fork execution. |
| .github/workflows/cluster_endtoend.yml | Gates the “larger-runner” selection with a repository check (oracle runner vs ubuntu). |
|
Thanks @copilot-pull-request-reviewer, but resolving these — the suggestion goes the wrong way for what this PR is trying to do. The intent is to keep using our self-hosted runners whenever the workflow runs inside Switching to |
timvaillancourt
left a comment
There was a problem hiding this comment.
Nice, this would have saved me a lot of time on previous forks 🚀
upgrade_downgrade_test_semi_sync.yml exists only on release-24.0 (it was removed from main before #20165 landed) and so was missed by the cherry-pick. Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
upgrade_downgrade_test_semi_sync.yml was removed on main before #20165 landed, so it wasn't part of the original PR. On release-23.0 it still pins runs-on: oracle-vm-16cpu-64gb-x86-64, which means the workflow queues forever on forks. Apply the same fallback used in #20165. Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
… (#20183) Signed-off-by: Arthur Schreiber <arthur@planetscale.com> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
… (#20182) Signed-off-by: Arthur Schreiber <arthur@planetscale.com> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Arthur Schreiber <arthur@planetscale.com>
Description
Today the GitHub Actions workflows pin many jobs to the custom
oracle-vm-*self-hosted runner labels. Those runners are only attached tovitessio/vitess, so when a contributor opens a PR inside of their fork, the workflows queue forever (no eligible runner) and ultimately fail.This PR guards every
runs-onthat targets a custom runner withgithub.repository == 'vitessio/vitess', falling back to the standardubuntu-24.04runner when the workflow executes outside the main repo. The actual runner choice invitessio/vitessis unchanged.docker_build_images.ymlis intentionally left alone — its jobs are already gated byif: github.repository == 'vitessio/vitess', so they get skipped on forks and the runner label is never queried.Related Issue(s)
None.
Checklist
Deployment Notes
None — CI-only change. Behavior inside
vitessio/vitessis unchanged.AI Disclosure
This PR was written primarily by Claude Code — I just provided direction.