feat(ci): add wait flag to run status - #604
Merged
Merged
Conversation
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.


Add
--waitto wait for a CI run and return its final status.--wait.Closes https://linear.app/depot/issue/DEP-4013
Note
Low Risk
CLI-only polling and exit-code behavior around existing status API calls; no auth or server changes.
Overview
Adds
--waittodepot ci statusso scripts can block until a run reaches a terminal state.While the run is still in progress, the command polls
ciGetRunStatusevery five seconds, printsRun: <id> (<status>)progress lines to stderr, then emits the usual human or JSON result on stdout. With--wait, a finished run exits 0; failed or cancelled runs still print output but return a non-zero error (exit 1). Polling respects command context (cancel during sleep or the next request) and stops on API errors. Runs that are already terminal never sleep or re-fetch.Tests use
testing/synctestto assert interval timing, stderr vs stdout split, JSON final payload, immediate return without--waitor on terminal status, cancellation, and poll failure.Reviewed by Cursor Bugbot for commit 21e02db. Bugbot is set up for automated code reviews on this repo. Configure here.