Skip to content

Use gh api for workflow watch - #5719

Merged
bfops merged 3 commits into
masterfrom
bot/use-gh-api-workflow-watch
Aug 12, 2026
Merged

Use gh api for workflow watch#5719
bfops merged 3 commits into
masterfrom
bot/use-gh-api-workflow-watch

Conversation

@clockwork-labs-bot

@clockwork-labs-bot clockwork-labs-bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Updates cargo ci other-workflows watch to poll workflow runs with:

gh api --include "repos/$OWNER/$REPO/actions/runs/$id"

instead of gh run view.

This should reduce API calls by 3x, since apparently gh run view currently does 3 API calls per call.

This also adds some diagnostic info in case we hit rate limits again. If gh api fails, the watcher now prints the complete captured stdout and stderr before returning an error. Because the call uses --include, stdout includes the HTTP status line and response headers, including GitHub rate-limit headers, plus the JSON error body.

API and ABI breaking changes

None.

Expected complexity level and risk

  1. Narrow CI helper change.

Testing

  • cargo fmt --manifest-path tools/ci/Cargo.toml --all -- --check
  • cargo check -p ci
  • cargo clippy -p ci -- -D warnings
  • cargo run -p ci -- other-workflows watch --repo clockworklabs/SpacetimeDB --run-id 31536451346 --interval-seconds 1 --max-attempts 1
  • cargo run -p ci -- other-workflows watch --repo clockworklabs/SpacetimeDB --run-id 0 --interval-seconds 1 --max-attempts 1 prints HTTP headers, rate-limit headers, JSON error body, and gh stderr for the expected 404
  • git diff --check

@bfops
bfops force-pushed the bot/use-gh-api-workflow-watch branch 2 times, most recently from af4a8e5 to 91f5e74 Compare August 11, 2026 21:21
@bfops bfops changed the title Use gh api for workflow watch Use gh api for workflow watch Aug 11, 2026

@jdetter jdetter left a comment

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.

Seems fine, not manually tested by me

@bfops
bfops added this pull request to the merge queue Aug 12, 2026
Merged via the queue into master with commit 4e84622 Aug 12, 2026
75 of 83 checks passed
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.

3 participants