Skip to content

[Bug Fix] fix(ci): prevent runner group error on fork pushes#2911

Open
whats2000 wants to merge 3 commits intohuggingface:mainfrom
whats2000:fix/runner-group-fork-issue
Open

[Bug Fix] fix(ci): prevent runner group error on fork pushes#2911
whats2000 wants to merge 3 commits intohuggingface:mainfrom
whats2000:fix/runner-group-fork-issue

Conversation

@whats2000
Copy link

@whats2000 whats2000 commented Feb 5, 2026

[Bug Fix] fix(ci): prevent runner group error on fork pushes

fix(ci): prevent runner group error on fork pushes

Type / Scope

  • Type: CI
  • Scope: workflows

Summary / Motivation

When workflows with the aws-general-8-plus or aws-g6-4xlarge-plus runner groups run on forked repositories, they fail with "Required runner group not found" because these custom runner groups only exist in the main huggingface/lerobot repository.

GitHub Actions evaluates the runs-on field before checking if conditions, so simply adding repository checks doesn't prevent the runner allocation error. This PR implements a gating job pattern that runs a check on ubuntu-latest first, and all jobs requiring custom runners depend on it and only run if the check passes.

Related issues

  • Fixes: Runner group error on fork pushes
image

What changed

  • Added check-repo gating job to both unbound_deps_tests.yml and full_tests.yml that:
    • Runs on ubuntu-latest (always available)
    • Checks if github.repository == 'huggingface/lerobot'
    • Outputs the result for downstream jobs
  • Updated build-and-push-docker and gpu-tests jobs to:
    • Depend on the check-repo job via needs
    • Check the gating job's output before running
    • Only attempt runner allocation if running on main repository
  • No breaking changes - workflows function identically on main repo, just skip custom runner jobs on forks

How was this tested (or how to run locally)

  • Manual verification:

    • Confirmed nightly.yml already has proper repository checks (scheduled workflows don't trigger on forks)
    • Identified unbound_deps_tests.yml and full_tests.yml needed fixes
  • The fix prevents:

    1. Runner allocation errors when workflows trigger on forks
    2. Failed workflow runs due to missing runner groups
  • Expected behavior:

    • On main repo: All jobs run normally with custom runners
    • On forks: Check job runs and passes, but custom runner jobs are skipped

Checklist (required before merge)

  • Linting/formatting run (pre-commit run -a)
  • All tests pass locally (pytest) - N/A for workflow-only changes
  • Documentation updated - N/A
  • CI is green

Reviewer notes

  • This uses a gating job pattern instead of simple if conditions because GitHub evaluates runs-on before if
  • The pattern ensures runner allocation only happens after confirming we're on the main repository
  • Both unbound_deps_tests.yml and full_tests.yml now use this pattern
  • Jobs on ubuntu-latest (like full-tests in full_tests.yml) don't need the gating check as that runner is always available
  • This pattern is more robust than simple if conditions for preventing runner allocation errors

Add repository check to unbound_deps_tests workflow to ensure
aws-general-8-plus runner group is only used on main repository,
preventing 'Required runner group not found' errors on forks.
Copilot AI review requested due to automatic review settings February 5, 2026 13:55
@github-actions github-actions bot added CI Issues related to the continuous integration pipeline github_actions labels Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a CI workflow issue where forked repositories encounter "Required runner group 'aws-general-8-plus' not found" errors. The custom runner group only exists in the main huggingface/lerobot repository, so jobs using it must be restricted to the main repository.

Changes:

  • Added repository check to prevent aws-general-8-plus runner group usage on forks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The previous approach failed because GitHub evaluates runs-on before if conditions.
Now using a check-repo job that runs on ubuntu-latest first, and all jobs with
special runners depend on it and check its output before being scheduled.
@whats2000 whats2000 marked this pull request as draft February 5, 2026 14:06
… forks

Apply the same gating pattern used in unbound_deps_tests to full_tests.yml
to prevent GitHub from trying to allocate custom runners when workflows
run on forks. The check-repo job runs first on ubuntu-latest and all jobs
with custom runners depend on it and check its output.
@whats2000 whats2000 marked this pull request as ready for review February 5, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Issues related to the continuous integration pipeline github_actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant