Repository navigation
fix(task): quiet S3 staging, millisecond phase markers, Docker install overlaps stage-in (#1072) - #1239
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…l overlaps stage-in (#1072) - Every wrapper/flush aws s3 cp passes --no-progress (one line per file and errors stay; the progress meter goes). - spawn_phase stamps with date -u +%Y-%m-%dT%H:%M:%S.%3NZ (GNU date on AL2023); started_at/ended_at keep their form. - A container task starts dnf install docker in the background before stage-in and waits for it before the daemon, pull or run. A failed install is still instance_health; a failed stage-in still waits for it. Refs #1072
scttfrdmn
force-pushed
the
fix/1072-task-log-noise
branch
from
October 20, 2026 17:02
c97c020 to
941bc00
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.
Refs #1072. This fixes items 1 and 3 and does the low-risk part of item 2. The issue stays open for the task-host AMI decision, which needs the owner; see the comment on #1072.
What
aws s3 cpin the wrapper, the pooled job script and the flush script now starts withaws s3 cp --no-progress. That covers stage-in, stage-out (including the provenance fallback), and the command.log, completion.json and .exitcode uploads. I chose--no-progressover--only-show-errorsso the onedownload:/upload:line per file stays alongside the errors.spawn_phasestamps withtaskproto.PhaseTimestampFormat=+%Y-%m-%dT%H:%M:%S.%3NZ(GNU date, which AL2023 ships).started_at/ended_atin completion.json are left as they are, since adapters and the cost estimate parse them.command -v docker || sudo dnf install -y dockersubshell starts in the background right after the env exports and before stage-in. Its output goes to a file.writeContainerRunthen doeswait "$DOCKER_INSTALL_PID" || RUNTIME_RC=$?, prints the install log as one block, and only after that starts the daemon, sets up the GPU toolkit, pulls and runs. The task run: a container task at default sizing fails, because Docker's install is OOM-killed on t4g.nano (and is classified app_error) #1180 classification is unchanged: a failed install isinstance_health. The stage-in failure branch also waits, so a background dnf is never left running. That matters for a pooled worker's next job, which would hit the dnf lock, and for test children.Expected effect, reasoned from E1 numbers and not measured: the install is ~66 s on every launch and staging is usually shorter, so time before
docker pullgoes from install plus staging to roughly the longer of the two. Risk: dnf andaws s3 cpnow share memory. At the 2 GiB container floor that should fit but hasn't been measured. If dnf is OOM-killed, the result isinstance_health(retryable), the same as before.Gates (each watched failing against a revert that compiles)
TestWrapperS3CopiesAreQuiet: discoversaws s3 cp|syncinvocations in the host, container, pooled and flush scripts. The regex is anchored at command position, so the words in the'uploading untagged with aws s3 cp'message don't count. Each invocation must carry the flag, and the test fails if discovery finds nothing or misses the stage-in or stage-out copies. Fails whens3Cpis reverted toaws s3 cp.TestWrapperPhaseTimestampsHaveMilliseconds: runs the wrapper under bash and parses everyspawn: [...]stamp with2006-01-02T15:04:05.000Z. Fails when the format is reverted. The stand-indate(installStandInDate) is the real date when it's GNU (Linux CI),gdateotherwise, and failing both a shim that fills%3Nwith000.TestWrapperDockerInstallOverlapsStageIn: fake aws, dnf, docker and systemctl append to one event log. The stage-in copy waits (bounded) fordnf-begin, and dnf waits (bounded) forstage-in, so only a parallel install producesdnf-begin < stage-in < dnf-end. dnf then holds for up to 1 s and finishes early only if the wrapper touches Docker. It has three cases: install succeeds, install killed (137), and stage-in fails. Failures seen against each revert:waitremoved:systemctl ran before the Docker install finished;wait || true(exit status dropped):the daemon was started after the install failed. Note that without this assertion the revert still came outinstance_health, because the later docker-info check catches it;waitremoved:missing events(nodnf-end).TestGenerateWrapper_ContainerRuntimeFailureIsNotAppError,...CommandFailureStaysAppError) pass unchanged.Checks
make check: everything passes exceptcheck-build-tags, which fails the same way on unmodified main on this machine (/private/tmppaths).make lintreports 0 issues.make check-docsis clean, since no help text changed.semgrep scan --config=auto --error .is clean (two bare// nosemgrepon test exec calls).api/public-surface.txthasPhaseTimestampFormatadded. No AWS calls were made.