Repository navigation
Drop build size from test task priorities - #245
Merged
Merged
Conversation
Priorities are now: 0 reserved for tasks routed by hand (never sent by the scheduler), 1 for release builds, 2 for all other builds. Small and large builds no longer get different priorities, so the small_build_max_tasks option is removed.
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
Test task priorities no longer depend on build size. Release builds now come first and all other builds share one priority. Release builds already get their own cost queues (#244), so splitting the rest by size isn't needed anymore.
MANUAL, never sent by the schedulerRESERVED, never sent by the schedulerRELEASE_BUILDRELEASE_BUILDSMALL_BUILD(≤small_build_max_taskstest tasks)REGULAR_BUILD(all other builds; also the default priority)LARGE_BUILDChanges
alts/shared/constants.py:TaskPriorityis nowRESERVED = 0,RELEASE_BUILD = 1,REGULAR_BUILD = 2.alts/shared/models.py:task_default_priorityisREGULAR_BUILD. Redispriority_stepsfollowsTaskPriority, so it becomes[0, 1, 2].SchedulerConfig.small_build_max_tasksis removed. If a config still sets it, the key is ignored and the scheduler starts normally.alts/scheduler/scheduling.py:get_task_priority(release_build)only looks at the release flag. Thebuild_tasks_countargument ofschedule_test_task()and the per-poll task counting inrun()are removed.tests/scheduler/test_scheduling.py: tests updated.Deploy notes
<queue>:3lists. Large-build tasks sent by the old scheduler are waiting there. Workers with this code only read lists 0–2, so anything left in:3would never be picked up. Release tasks (:1) and small-build tasks (:2) are already in lists the new workers read.Testing
CELERY_CONFIG_PATH=tests/tests_config.yaml SCHEDULER_CONFIG_PATH=tests/tests_config.yaml pytest tests/ --deselect tests/executors: 104 passed, 6 skipped. The executor tests need a local SSH server (CI runs one in the container), so they were left out locally.priority_stepslists everyTaskPriorityvalue, and the default priority isREGULAR_BUILD.🤖 Generated with Claude Code