feat(ci): use job selector for historical logs#510
Open
121watts wants to merge 1 commit into
Open
Conversation
cf6c493 to
ec2ba1b
Compare
ec2ba1b to
adc4fff
Compare
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
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
GetJobAttemptLogsRequest.job_idCIGetJobAttemptLogsForTargetwhile preserving the existing attempt-ID wrapperThis 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, andgit 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, andCIGetJobAttemptLogsForTargetis introduced to fetch logs using eitherattempt_idorjob_id(enforcing exactly one selector and preservingCIGetJobAttemptLogsas 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 genericoptionalString, 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.