Repository navigation
Route test tasks to per-package queues and split Docker release builds - #244
Merged
Merged
Conversation
New package_queue_suffixes scheduler option maps a package name regex
to a queue suffix, e.g. {'acme-.*': 'acme'} sends matching test tasks
to <runner>-<arch>-acme, so dedicated workers can serve them. The regex
must match the whole name and the first matching entry wins. It is
empty by default. Docker release builds now get their own
docker-<arch>-1 queue, like OpenNebula already does with
opennebula-<arch>-2.
anfimovdm
force-pushed
the
al-alts-reserved-docker-queues
branch
from
November 5, 2026 21:31
4c6e0e2 to
c7d537a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A new
package_queue_suffixesscheduler option maps package name regexes to queue suffixes, so test tasks of those packages go to their own<runner>-<arch>-<suffix>queue and can be served by dedicated workers. The option is empty by default, so nothing changes until it is set. Docker release builds also get their own queue, the same way OpenNebula already handles them.docker-<arch>-0(unchanged)opennebula-<arch>-1(unchanged)docker-<arch>-1(new)opennebula-<arch>-2(unchanged)package_queue_suffixesregex, any builddocker-<arch>-<suffix>(new)opennebula-<arch>-<suffix>(new)Example
scheduler.yaml:Changes
alts/scheduler/scheduling.py: newget_package_queue_suffix()returns the suffix of the first regex that matches the whole package name (re.fullmatch, case-sensitive). Newget_queue_suffix()uses it, falling back to the runner'sget_cost(release_build).alts/shared/models.py: newSchedulerConfig.package_queue_suffixes: Dict[str, str] = {}. A validator rejects invalid regexes and empty suffixes when the config loads.alts/worker/runners/docker.py:DockerRunnergetsCOST_STANDARD = 0,COST_RELEASE_BUILD = 1and aget_cost()built the same way asOpennebulaRunner's.tests/scheduler/test_scheduling.py: tests for the queue names and the config validation.Notes
get_cost, so only the scheduler needs redeploying.alts/worker/app.py. Celery creates them the first time a task is sent there (task_create_missing_queuesis on by default), with the samex-max-priorityargument. A test checks this.0-4are the runners' cost queues.docker-<arch>-1on at least one Docker node per architecture, for release builds;docker-<arch>-<suffix>/opennebula-<arch>-<suffix>on the nodes set aside for those packages.Testing
CELERY_CONFIG_PATH=tests/tests_config.yaml SCHEDULER_CONFIG_PATH=tests/tests_config.yaml pytest tests/ --deselect tests/executors: 100 passed, 6 skipped. The executor tests need a local SSH server (CI runs one in the container), so they were left out locally.acme-foo.*,acme-bar[0-9]+(-.*)?and a catch-allacme-.*, each package goes to its own suffix queue for both runners, release or not, and the first matching entry wins;my-acme-foo1), different case (ACME-FOO1) and unrelated packages keep their cost queues;x-max-priorityargument.🤖 Generated with Claude Code