Skip to content

feat(ci): use job selector for historical logs#510

Open
121watts wants to merge 1 commit into
mainfrom
watts/dep-4426-selector-rpcs
Open

feat(ci): use job selector for historical logs#510
121watts wants to merge 1 commit into
mainfrom
watts/dep-4426-selector-rpcs

Conversation

@121watts

@121watts 121watts commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the CLI CI API client for depot/api#3688 and lets depot ci logs <id> try a direct job selector after an attempt lookup returns not-found.

Details

  • regenerates the CLI CI proto copy with GetJobAttemptLogsRequest.job_id
  • adds CIGetJobAttemptLogsForTarget while preserving the existing attempt-ID wrapper
  • keeps direct attempt behavior and run-disambiguation flags unchanged
  • keeps unresolved-ID errors actionable across run, job, and attempt lookup attempts

This should be merged after https://github.com/depot/api/pull/3688 lands and the API supports the new selector.

Validation completed with generated client refresh, focused API/command tests, make test, and git diff --check.


Note

Medium Risk
Changes how depot ci logs <id> resolves historical logs by adding a new fallback path and relying on a regenerated proto field (job_id), which could alter behavior for ambiguous/invalid IDs and depends on server support.

Overview
Historical log fetching can now target a job’s latest attempt. The CI proto/client is regenerated to add GetJobAttemptLogsRequest.job_id, and CIGetJobAttemptLogsForTarget is introduced to fetch logs using either attempt_id or job_id (enforcing exactly one selector and preserving CIGetJobAttemptLogs as an attempt-only wrapper).

depot ci logs <id> now falls back to job lookup when attempt lookup returns NotFound (when not using run-disambiguation flags), with improved unresolved-ID error messaging that reports run/job/attempt resolution outcomes. Minor cleanup renames the artifact filter helper to the generic optionalString, and new unit tests cover selector behavior and the CLI fallback/error cases.

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

@linear-code

linear-code Bot commented May 14, 2026

Copy link
Copy Markdown

DEP-4426

@121watts 121watts force-pushed the watts/dep-4426-selector-rpcs branch 3 times, most recently from cf6c493 to ec2ba1b Compare May 14, 2026 18:23
@121watts 121watts force-pushed the watts/dep-4426-selector-rpcs branch from ec2ba1b to adc4fff Compare May 14, 2026 18:35
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.

1 participant