Repository navigation
feat(task): 'spawn task status' + 'task run --wait' completion poller (spawn#386) - #405
Merged
Merged
Conversation
scttfrdmn
force-pushed
the
feat/386-task-status
branch
3 times, most recently
from
July 19, 2026 20:43
ae14486 to
aeb876b
Compare
…ller (spawn#386) The read side of the task-execution protocol. 'spawn task status <task-id>' fetches the durable completion record from s3://spawn-results-<acct>-<region>/tasks/<id>/completion.json and prints it (-o json for raw); absent record = still running; --check-complete mirrors spawn status exit codes (0/1/2/3) for scripting. 'task run --wait' polls that record (every --poll-interval, default 15s) until it appears or the TTL elapses, prints it, and exits with the task's own exit code — a synchronous run for callers who don't want to poll. Adds aws.Client.GetS3Object with an ErrS3NoSuchKey sentinel so pollers distinguish 'not there yet' from a real error. Refs #386 (increment 2; container execution + adapter migration remain later increments)
scttfrdmn
force-pushed
the
feat/386-task-status
branch
from
July 19, 2026 20:46
aeb876b to
4b725de
Compare
Codecov Report❌ Patch coverage is
📢 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.
Summary
Second of two stacked PRs for spawn#386 increment 2 — the read side of the task protocol. Stacked on #404 (review/merge that first; this diff is against that branch).
spawn task status <task-id>Fetches the durable completion record from
s3://spawn-results-<account>-<region>/tasks/<task-id>/completion.jsonand prints it (-o jsonfor the raw record). If the record isn't there yet, the task is still running.--check-completemirrorsspawn statusexit codes (0=completed, 1=failed, 2=running, 3=error) for scripting/adapters.spawn task run --waitBlocks until the completion record appears (polling every
--poll-interval, default 15s, until the TTL elapses), prints it, and exits with the task's own exit code — a synchronous run for callers who don't want to poll themselves.aws.Client.GetS3ObjectNew exported S3 GetObject helper with an
ErrS3NoSuchKeysentinel, so pollers distinguish "not there yet" (task running) from a real error viaerrors.Is.Testing
cmd:TestWaitDeadline(TTL+slack, fallback cap); thefetchCompletion/poller paths need S3 (gated e2e).TestFlagConventions/TestTier0pass (taskclassified; new leaf sub-command fine, no--json).TestCatalogValidfails incmd(unrelated, fails on main too).Refs #386 (increment 2; container execution + adapter migration remain later increments)