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

Combine --spawn and --priority flags #1530

Merged
merged 3 commits into from
Dec 7, 2021
Merged

Combine --spawn and --priority flags #1530

merged 3 commits into from
Dec 7, 2021

Conversation

sema
Copy link
Contributor

@sema sema commented Oct 29, 2021

When running multiple agents on the same host, it is recommended to use the --priority flag if you want to force load to be balanced evenly across the hosts (https://buildkite.com/docs/agent/v3/prioritization).

The --spawn flag allows for easily registering multiple agents on the same host, greatly simplifying the operational overhead of running multiple agents.

However, --spawn and --priority can't be mixed.

This pull request proposes a general approach to combine the two flags to allow for the ease-of-use of --spawn and also solve the load balancing problem for which --priority is being suggested for. The solution is to automatically assign a --priority to each spawned agent based on the internal agent index.

I'm happy to contribute further to this (tests, etc.) as soon as there is a general agreement on the direction.

@eleanorakh
Copy link
Contributor

This is great, thanks so much @sema! I've just popped a commit on to use with instead of splay in the naming. The implementation looks 👍🏼

@keithduncan keithduncan merged commit fdd00d4 into buildkite:main Dec 7, 2021
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.

3 participants