Skip to content

feat(jobs): fetch GitHub Actions job resource metrics - #638

Merged
ImLunaHey merged 2 commits into
mainfrom
t3/fetch-gha-runner-metrics
Oct 19, 2026
Merged

ImLunaHey merged 2 commits into
mainfrom
t3/fetch-gha-runner-metrics

Conversation

@ImLunaHey

@ImLunaHey ImLunaHey commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Fetch CPU and memory metrics for an individual GitHub Actions job execution.

depot jobs metrics 123456789 --repo acme/api --output json
  • Return samples, statistics, availability, snapshot time, and downsampling metadata in JSON; show summaries in table output.
  • Preserve missing measurements separately from zero utilization and use server statistics before downsampling.
  • Update the published API bindings and document the command. Cover RPC requests, output, partial telemetry, and failures with behavior tests.

Closes DEP-6177.


Note

Low Risk
Read-only CLI and API client additions with no auth or data-mutation paths; risk is limited to correct presentation of telemetry and dependency on the updated API bindings.

Overview
Adds depot jobs metrics so users can pull per-job GitHub Actions CPU and memory telemetry (completed runs or live snapshots) by job ID and a single --repo, alongside existing aggregate jobs analytics.

The CLI calls a new GetGithubActionsJobMetrics API wrapper, bumps the generated Depot API modules, and renders either full protobuf JSON (samples, stats, availability, downsampling cap) or a summary table that shows n/a for missing measurements instead of conflating them with zero. depot jobs help and the README document limits (7-day window, 5k samples) and behavior; tests cover RPC wiring, validation, partial/unavailable telemetry, API errors, and output modes.

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

@linear-code

linear-code Bot commented Oct 19, 2026

Copy link
Copy Markdown

DEP-6177

@ImLunaHey
ImLunaHey marked this pull request as ready for review October 19, 2026 14:11

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fe55176. Configure here.

Comment thread pkg/cmd/jobs/metrics_test.go

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale comment

Risk: medium. Left a non-blocking comment because Cursor Bugbot reported one unresolved medium-severity finding about --output auto in the metrics tests. Human review is needed, and no reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: medium. Approved because Cursor Bugbot completed successfully on the current head and the prior finding is resolved.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@ImLunaHey
ImLunaHey merged commit 5b2280b into main Oct 19, 2026
13 of 14 checks passed
@ImLunaHey
ImLunaHey deleted the t3/fetch-gha-runner-metrics branch October 19, 2026 14:40
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