run/logs: tail single-job follow via resolog#14
Merged
Conversation
First step of the batchkoi -> resolog integration. The single-job --follow path (run, and logs --follow) now tails CloudWatch through resolog instead of the home-grown GetLogEvents loop: - waitAndTail uses resolog.Tail + resolver/batch + backend/poll, with a custom childSink that reuses childPrefix for byte-identical output (single job = no prefix). batchkoi keeps a parallel status poll (waitForTerminal) for the [STATUS] lines, final JobDetail and exit-on-FAILED — resolog owns tail shutdown via its Done signal + grace, so batchkoi never cancels the tail. - batchAPI gains ListJobs and logsAPI gains FilterLogEvents to satisfy resolog's narrow interfaces (real clients already have them; fakes get stubs). - CI gate fails the build if resolog's SFn/Lambda SDKs ever leak into go.mod. The array path (>32 paging) and the logs no-follow dump stay home-grown for now. Tests: single-job follow success + FAILED-exits; existing array-follow and logs tests unchanged and green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
First step of the batchkoi → resolog integration (PR-2 of the plan).
What changes
The single-job
--followpath (run, andlogs --follow) now tails CloudWatch through resolog@v0.1.1 instead of the home-grownGetLogEventsloop.waitAndTail→resolog.Tail+resolver/batch+backend/poll, with a customchildSinkthat reuseschildPrefixfor byte-identical output (single job = no prefix).waitForTerminal) for the[STATUS]lines, finalJobDetail, and exit-on-FAILED. resolog owns tail shutdown via itsDonesignal + grace window, so batchkoi never cancels the tail itself (only Ctrl-C does).batchAPIgainsListJobs,logsAPIgainsFilterLogEventsto satisfy resolog's narrow interfaces (real clients already have them; fakes get stubs).go.mod. Verified they don't (onlyservice/batch+service/cloudwatchlogscome in).configbumps v1.32.24 → v1.32.25 (benign MVS).What stays home-grown (by design, for now)
>32paging path (migrating it would lose the 25-TPS quota protection).logsno-follow one-shot dump (preserves its specific error messages).Tests
🤖 Generated with Claude Code