Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for jobs that are ambivalent about particular labels #335

Open
jonathanmorley opened this issue May 11, 2023 · 3 comments
Open

Allow for jobs that are ambivalent about particular labels #335

jonathanmorley opened this issue May 11, 2023 · 3 comments

Comments

@jonathanmorley
Copy link

Currently, the set of labels you pass in from a job in a workflow must match completely to the set of labels on a runner.
It would be nice to be able to omit certain labels to be able to benefit from existing infrastructure/load balancing

Example

You may have multiple providers (Lambda, Codebuild, ECS), and a job that doesn't care which of those providers it gets placed on. The job could simply not specify the provider type, and let the orchestrator place it as it thinks best.

@kichik
Copy link
Member

kichik commented May 11, 2023

What kind of criteria are you thinking for best placing?

FWIW you can define your own provider by implementing IRunnerProvider and theoretically it can be used to build a composite provider that has some logic to pick a provider.

@jonathanmorley
Copy link
Author

Lets say you have ECS runners of various sizes (small, medium, large), running on a shared ASG, with instances sized to hold 1 large, or 2 medium, or 4 small runners.

Then occasionally you may have extra capacity in the cluster for mediums or smalls.

If a request comes in for [self-hosted, small], then it may be faster to provision a runner on the ECS cluster, than on another runner (e.g. codebuild).

@kichik
Copy link
Member

kichik commented May 12, 2023

So you want this for cases where you're over capacity on some resource like in #193? Or are there other use cases? Do you want to also be able to force it to a certain provider without fallback?

Maybe something like:

new FallbackRunnerProvider(this, 'fallback', {
  labels: ['small'],
  providersOrder: [
    new EcsRunnerProvider(...),
    new CodeBuildRunnerProvider(...),
  ],
});

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

No branches or pull requests

2 participants