Skip to content

Add CI workflow show#496

Merged
121watts merged 1 commit intomainfrom
dep-4314-workflow-show
Apr 30, 2026
Merged

Add CI workflow show#496
121watts merged 1 commit intomainfrom
dep-4314-workflow-show

Conversation

@121watts
Copy link
Copy Markdown
Contributor

@121watts 121watts commented Apr 30, 2026

Summary

Workflow IDs now have a readable landing page in the CLI. depot ci workflow show <workflow-id> gives humans and agents the shape of a workflow without pretending workflow-wide logs are a good idea.

What was happening

workflow list could find workflows, but once a user had an ID there was no CLI command to inspect it.

What happens now

Adds depot ci workflow show with get as an alias, plus human and JSON output. Human output names run and workflow metadata, executions, jobs, latest attempts, durations, sandbox/session IDs, and the exact attempt log command. JSON output preserves the same data for agents.

Example

Org: org_123
Repo: depot/api
Run: run_9f3x2k (failed)
Workflow: wf_7q2n1p (failed)
Name: CI
Path: .depot/workflows/ci.yml
Error: job failed
Ref: refs/heads/dep-4314-getworkflow
SHA: 8f4c2d1a9b
Trigger: push

Executions:
  #1 failed 8m42s  2026-04-30T18:41:02Z -> 2026-04-30T18:49:44Z
  #2 running  2026-04-30T18:53:11Z -> -

Jobs:
  lint [finished] 42s
    Job ID: job_lint_123
    Latest attempt: #1 att_lint_1 (finished) 42s
    Sandbox: sbx_lint_1
    Session: ses_lint_1
    Logs: depot ci logs att_lint_1

  test [failed] 4m18s
    Job ID: job_test_456
    Latest attempt: #2 att_test_2 (failed) 2m9s
    Sandbox: sbx_test_2
    Session: ses_test_2
    Attempts:
      #1 att_test_1 (failed) 1m51s
      #2 att_test_2 (failed) 2m9s
    Logs: depot ci logs att_test_2

Anything else?

Linear: https://linear.app/depot/issue/DEP-4314/m3-unit-2-add-rich-getworkflow

Requires API PR: https://github.com/depot/api/pull/3603


Note

Medium Risk
Adds a new GetWorkflow RPC and CLI surface area with custom formatting/JSON serialization; risk is mainly around API compatibility and correctness of the new protobuf/generator wiring rather than security-sensitive logic.

Overview
Adds a new CIService.GetWorkflow API (protobuf + Connect client/server stubs) and a Go wrapper api.CIGetWorkflow for fetching a single workflow’s run/workflow/execution/job/attempt metadata.

Extends the CLI with depot ci workflow show (alias get) to display workflow details in human-readable form (including durations and log command hints) or as stable snake_case JSON, with accompanying unit tests for request wiring and output.

Reviewed by Cursor Bugbot for commit 05752f4. Bugbot is set up for automated code reviews on this repo. Configure here.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 30, 2026

Comment thread proto/depot/ci/v1/ci.proto Outdated
repeated GetWorkflowAttempt attempts = 6;
}

message GetWorkflowAttempt {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same naming nit: should this be a JobAttempt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I’m going to mirror the API rename to GetWorkflowJobAttempt in the CLI generated proto and command code so the names stay consistent across repos. — watts[bot]

Comment thread pkg/cmd/ci/workflow.go Outdated
Comment on lines +160 to +162
orgFlag := ""
if cmd.Flags().Changed("org") {
orgFlag = " --org " + orgID
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this be closer to the orgid check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that’s a cleaner placement. I’ll move orgFlag construction next to org resolution so the derived CLI context is grouped before auth and API work. — watts[bot]

@121watts 121watts force-pushed the dep-4314-workflow-show branch from 53ebbed to 05752f4 Compare April 30, 2026 22:27
@121watts 121watts merged commit 01134e3 into main Apr 30, 2026
10 checks passed
@121watts 121watts deleted the dep-4314-workflow-show branch April 30, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants