Skip to content

feat: allow runner_pool to override runner type for self-hosted pools#767

Closed
atheurer wants to merge 1 commit intoperftool-incubator:masterfrom
atheurer:backport-runner-pool-2026.1
Closed

feat: allow runner_pool to override runner type for self-hosted pools#767
atheurer wants to merge 1 commit intoperftool-incubator:masterfrom
atheurer:backport-runner-pool-2026.1

Conversation

@atheurer
Copy link
Contributor

Summary

This change allows workflows to redirect GitHub-hosted jobs (type: "github") to self-hosted runner pools when the runner_pool parameter is specified, while maintaining full backward compatibility.

Changes

  • Modified build_runner_labels() to check runner_pool parameter first
  • When runner_pool is set, use self-hosted runners with pool label regardless of runner_type
  • Pass scenario tags when runner_pool is specified, even for "github" type scenarios
  • Updated logic to include scenario tags in label generation when pool is specified

Backward Compatibility

No runner_pool argument → uses ubuntu-latest for "github" type (unchanged)
With runner_pool → uses self-hosted + pool label (new behavior)
self-hosted without pool → uses self-hosted with tags (unchanged)

Example Behavior

Before (or without runner_pool):

--runner-type "github"
# Result: ["ubuntu-latest"]

After (with runner_pool):

--runner-type "github" --runner-pool "aws-cloud-1"
# Result: ["self-hosted", "aws-cloud-1", <scenario-tags>]

Use Case

This enables CI workflows to:

  1. Use existing scenario configs with type: "github"
  2. Route those jobs to custom self-hosted runner pools (e.g., AWS EC2 instances)
  3. Without modifying scenario definitions in crucible-ci.json

Testing

CI tests will verify backward compatibility - existing workflows without runner_pool continue to work unchanged.

Related to runner pool support added in #753

When runner_pool is specified, scenarios configured with type "github"
will now run on self-hosted runners with the specified pool label.
This enables workflows to redirect GitHub-hosted jobs to self-hosted
runner pools while maintaining backward compatibility.

Changes:
- Modify build_runner_labels() to check runner_pool first
- If runner_pool is set, use self-hosted with pool label regardless of runner_type
- Pass scenario tags when runner_pool is specified, even for "github" type
- Maintain backward compatibility: no runner_pool = existing behavior

Backward compatibility verified:
- No runner_pool argument → uses ubuntu-latest for "github" type (unchanged)
- runner_pool specified → uses self-hosted with pool (new behavior)
- self-hosted without pool → uses self-hosted with tags (unchanged)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@atheurer atheurer force-pushed the backport-runner-pool-2026.1 branch from 2d914cd to d96c653 Compare March 17, 2026 01:14
@atheurer atheurer requested a review from k-rister March 17, 2026 01:20
Copy link
Contributor

@k-rister k-rister left a comment

Choose a reason for hiding this comment

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

needs to be pushed upstream for PR

@atheurer
Copy link
Contributor Author

Closing to recreate with upstream branch as head instead of fork

@atheurer atheurer closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants