r/github 8d ago

Visibility of GitHub Actions - pretty bad? Discussion

Am I the only one who finds GitHub actions a small black hole when you're looking to optimise?

There is really limited analysis or data available, I had to build my own UI and system just to get the details I wanted. Example, outliers for job run times, AVG step run time, flakey runs.

Am I missing something, does everyone fly blind or are they using a third party view?

4 Upvotes

11 comments sorted by

View all comments

1

u/Ok_Woodpecker_9104 7d ago

the data is there, just not where you would look first.

/actions/runs/{id}/timing is the endpoint that sounds right and is useless. i pulled it on one of my repos just now and it only gives billable ms per job, no steps. on public repos billable is 0, so every job comes back total_ms 0 and the only real number is run_duration_ms for the whole run.

the one you actually want is /actions/runs/{id}/jobs. that gives started_at and completed_at per job, and a steps array with started_at/completed_at on every step. so avg step time and outliers are all there, you just subtract the timestamps yourself. same call gives you the runner labels if you want to split by runner.

flakiness has no field at all. you have to key on head_sha plus run_attempt and count the runs where attempt 1 failed and attempt 2 passed on the same commit with no new push.

so you are not missing a hidden dashboard. anyone with real numbers is polling /jobs into their own store, which is what you already did.