Add chunk task status and chunk task watch for pipeline observability#435
Open
hidetaka-cci wants to merge 1 commit into
Open
Add chunk task status and chunk task watch for pipeline observability#435hidetaka-cci wants to merge 1 commit into
chunk task status and chunk task watch for pipeline observability#435hidetaka-cci wants to merge 1 commit into
Conversation
Users can now check pipeline progress from the CLI after task run, without opening the CircleCI web UI or calling the API manually. Co-authored-by: Cursor <cursoragent@cursor.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.
chunk task status <pipeline-id>to fetch and display pipeline/workflow/job state once.chunk task watch <pipeline-id>to poll until workflows complete (--interval,--timeout).chunk task runwhen pipeline metadata is available.GetPipeline,ListPipelineWorkflows, andListWorkflowJobs.Closes #
Motivation
Friction report 5-1 (task-run-status-observability.md): after
chunk task run, users and agents had no CLI path to observe progress. The trigger path already authenticated to CircleCI; only status APIs and commands were missing.Example
Changes
internal/circleci/client.go,types.goGetPipeline,ListPipelineWorkflows,ListWorkflowJobsinternal/task/status.goFetchStatus,WatchStatus,RunWebURL, terminal detectioninternal/cmd/task.gotask status,task watch; URL line ontask runinternal/testing/fakes/circleci.godocs/CLI.mdinternal/circleci/pipeline_test.go,internal/task/status_test.go,acceptance/task_test.goOut of scope
chunk task logsTest plan
go test -race ./internal/task/... ./internal/circleci/... ./acceptance/ -run 'TestFetchStatus|TestWatchStatus|TestPipelineWebURL|TestWorkflowTerminal|TestGetPipeline|TestListPipeline|TestTaskStatus|TestTaskWatch|TestTaskRunIncludesURL'TestFetchStatus,TestFetchStatusNoWorkflows,TestWatchStatusSuccess,TestWatchStatusFailed,TestWatchStatusTimeoutTestGetPipeline,TestListPipelineWorkflows,TestListWorkflowJobsTestTaskStatus,TestTaskStatusJSON,TestTaskStatusMissingToken,TestTaskWatchSuccess,TestTaskWatchFailure,TestTaskRunIncludesURL