Repository navigation
feat(taskproto): add phase-timestamp markers to the wrapper log (#571) - #574
Merged
Merged
Conversation
completion.json's started_at/ended_at were the only two timestamps a task had, so stage-in, the Docker install, the image pull, the user command, and stage-out were one opaque interval. Measured on a real task: a 94s command window contained 25s of actual work and ~69s unattributable to any of the three plausible causes. spawn_phase() now logs a 'spawn: [<timestamp>] <phase>' line at each real boundary, plain text on command.log's existing stdout rather than a new structured artifact (nothing parses that log today). The rc= on each 'done' marker also helps diagnose #566: it shows how far the wrapper got before a failure that produced no completion record at all. Patch contributed via the #571 issue report, verified byte-for-byte against the attached diff; this commit adds the three tests the report explicitly left out (host-path markers, container-path markers including Docker-specific phases, and the spawn_phase() define-before-use ordering).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Closes #571.
completion.json'sstarted_at/ended_atwere the only two timestamps a task had, so stage-in, the Docker install, the image pull, the user command, and stage-out were one opaque interval. Measured on a real task (cookbook-relion-postprocess-r1): a 94s command window contained 25s of actual work and ~69s unattributable to any of the three plausible causes.spawn_phase()now logs aspawn: [<timestamp>] <phase>line at each real boundary: wrapper start, stage-in start/done, (container tasks only) Docker install start/done and image pull start/done, command start/exit, stage-out start/done. Plain text oncommand.log's existing stdout rather than a new structured artifact — nothing parses that log today, so this can't break a consumer. Therc=on each "done" marker is also a diagnostic for #566: it shows how far the wrapper got before a failure that produced no completion record at all.This is the patch attached to #571 by the issue's own reporter — verified byte-for-byte identical to the diff in the issue, already reported as built/gofmt-clean/tested against v0.103.1. This PR adds the three tests the report explicitly left out:
TestGenerateWrapper_PhaseMarkersHostPath— every marker present (and Docker-specific ones absent) on the host path, in the correct orderTestGenerateWrapper_PhaseMarkersContainerPath— every marker present, including Docker-specific ones, in the correct orderTestGenerateWrapper_PhaseMarkersHelperDefinedBeforeFirstUse—spawn_phase()is defined before its first call siteAll three verified fail-without/pass-with (reverted
wrapper.goviagit stash, confirmed all three fail with clear "marker not found" messages, restored, confirmed pass). Fullpkg/taskprotosuite (41 tests) green,make checkclean, docs-gen unchanged (no flag/help text touched), no nested lambda module drift.