Repository navigation
Worker: a disk soft limit, and peak_disk_kb from the files an action writes - #2825
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ect the sample to catch the write in progress
corcillo
reviewed
Sep 29, 2026
corcillo
reviewed
Sep 29, 2026
corcillo
reviewed
Sep 29, 2026
corcillo
reviewed
Sep 29, 2026
corcillo
reviewed
Sep 29, 2026
…a polled task, periodic walks only for the soft limit, the disk figure counts as sampled
corcillo
approved these changes
Sep 29, 2026
corcillo
previously approved these changes
Sep 29, 2026
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 disk guard refuses an action whose reservation does not fit before its inputs are fetched, but nothing watched what the action then wrote: one that filled the work volume took every action on the worker down with it, and the sizing loop had no disk figure to learn from.
disk: softis the guard plus a kill. Every ten seconds the worker adds up the files under the action's own directory that the action itself wrote (those modified since its command started; inputs were materialized before that, and a hard link count would lie once the store evicts a blob), and an action past itsdisk_kbreservation bydisk_headroom_percent(default 20) is killed and fails withFAILED_PRECONDITIONnaming the numbers, its outcomeKILLED_DISK. With either disk mode the usage report carriespeak_disk_kb, what the action wrote. The sampler that measures memory now carries both ceilings, and the first one breached ends the action. The walk runs as its own task on the blocking pool and is polled from the sampler, so memory sampling never waits on it;guardpays one walk at completion and no periodic one.peak_disk_kbis reported and exported for now; the scheduler's sizing consumer comes with the size ladder.How was this verified?
running_actions_manager_test: an action that writes 30 MiB against a 1 MiB reservation is killed at the ten-second sample, fails naming the disk reservation, and reportsKILLED_DISKwith the bytes it wrote (Linux only, like the sampler); the directory walk counts an action's own files and not a hard-linked input, a symlink or the directories themselves. The enforcement config test coversdisk: softalone.Risk
Off unless
disk: softis configured;guardgains one walk of the action directory at completion for the measurement,nonebehaves as before. The walk runs on the blocking pool every ten seconds over the action directory only. An action that writes large temporary files and removes them again within ten seconds is never seen over the limit; one that keeps them past it is.AI assistance
An agent drafted the change and I reviewed every line.
This change is