Repository navigation
Historical resource scheduler: hints by digest keys, size classes with a cold-start policy, and where each reservation came from - #2832
Merged
amankrx merged 4 commits intoSep 30, 2026
Conversation
…h a cold-start policy, and where each reservation came from
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…rce-scheduler # Conflicts: # web/apps/docs/content/docs/reference/nativelink-config/main.mdx
corcillo
reviewed
Sep 30, 2026
corcillo
reviewed
Sep 30, 2026
corcillo
reviewed
Sep 30, 2026
corcillo
reviewed
Sep 30, 2026
corcillo
reviewed
Sep 30, 2026
corcillo
reviewed
Sep 30, 2026
corcillo
reviewed
Sep 30, 2026
…e action carries, zero hints fall to cold start, rules and property types checked at load, disk on the cold start
corcillo
approved these changes
Sep 30, 2026
This branch was successfully deployed
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.
What and why
The
historical_resourcescheduler sized only actions with a hint keyed by target, so anything else ran with whatever the client sent, and a producer fed by origin events had no key it could write. Hints are now read by a ladder of keys: target and mnemonic, target, the action digest, the command digest, then the mnemonic alone, so a hint reaches every client, with or without Bazel request metadata.classesnames the fleet's size ladder, a hint may name a class instead of numbers, and an action no hint matches takes the class picked byclass_by_mnemonic, thenclass_by_timeout(Bazel test sizes arrive as timeouts), thendefault_class; without classes the rawcold_startnumbers fill only the properties the client left out. Ascheduler.hints.resolutionscounter says where each action's reservation came from, so a hint feed can be judged by how far it drives thecold_startshare down. A record is indexed under every key family it names, so one carrying a target and a digest is found by either; each ladder step is probed only when the action carries that key, so a mnemonic alone never outranks a digest hint; a hint that reserves nothing falls to the cold start and is counted there; the cold-start rules take the first named class that exists, and a rule naming a class the ladder lacks is refused at load, as is a reserved property the nested scheduler does not declare as a minimum; an unknown class in a hint is dropped once at load, not logged per action; andcold_startreserves disk too.How was this verified?
historical_resource_scheduler_test: a command digest hint matches an action without metadata, an action digest hint matches only its action, classes resolve hints and the cold start, the cold start fills only absent properties, a record with a target and a digest is found by either, a mnemonic alone does not outrank a digest hint, an all-zero hint falls to the cold start, and a rule naming no class is refused while the default class stands in. Older hint files still load, since every new field is optional. The config reference is regenerated and the snippet lint passes.Risk
Nothing changes for a scheduler without
classesorcold_start: the target keys resolve as before and the digest keys only add matches. It readsladder_kbfrom #2829, which is merged.AI assistance
An agent drafted the change and I reviewed every line.
This change is