Skip to content

Show no progress for a queued run, and its whole estimate as the ETA [patch] - #369

Merged
matt-edmondson merged 1 commit into
mainfrom
fix/pending-run-progress
Oct 14, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
fix/pending-run-progress

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #364

What changed

RenderBuildBranchRowColumns measured every ongoing run from Started, and that included Pending ones. A run that was still waiting in the queue showed a growing progress ring, a percentage and a shrinking ETA before any build work had started.

The row's duration, ETA and progress now come from a new BuildMonitor.MeasureRun(Run, TimeSpan estimate):

  • Pending: zero elapsed, so no progress and the whole estimate as the ETA. This is the second option the issue suggested.
  • Running: Clock.UtcNow - Started, the same as before.
  • Finished: Run.Duration, the same as before.

The providers' Started

The issue asked me to check what each provider puts in Started:

  • GitHub uses RunStartedAt, which is set when the run attempt is created, while it is still queued.
  • Azure DevOps uses StartTime ?? QueueTime, so a run that hasn't started gets its queue time.

Either way, Started on a pending run means queue time. This fix doesn't depend on which provider set it.

Deliberately not changed

Run.IsOngoing still includes Pending, and Run.CalculateETA (which RunSync uses to pick the poll interval) is unchanged. So queued runs are still polled at the same rate and their start is picked up as quickly as before. Running the queue-aware ETA through polling as well would have stretched a pending run's poll interval to the 60 s maximum.

Tests

  • New RunProgressTests, using Clock.UtcNowOverride: pending, running and finished cases.
  • I confirmed the pending test fails when pending is measured from Started the old way, and passes with the fix.
  • BuildMonitor.Test: 141/141 pass. tests/BuildMonitor.UITests: 6/6 pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GKJwMybTmY6x4mJfMM9RKv


Generated by Claude Code

…[patch]

A pending run counted the time since Started as build time, so a run
sitting in the queue drew a growing progress ring, percentage and a
shrinking ETA before it had begun. The row's duration, ETA and progress
now come from MeasureRun, which treats a pending run as zero elapsed:
no progress, and the full estimate as its ETA. Running and finished runs
are measured as before. Run.IsOngoing still includes Pending, so polling
of queued runs is unchanged.

Fixes #364

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKJwMybTmY6x4mJfMM9RKv
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 77459e7 into main Oct 14, 2026
16 checks passed
@matt-edmondson
matt-edmondson deleted the fix/pending-run-progress branch October 14, 2026 09:02
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.

Pending runs show progress and an ETA, counting queue time as build time

2 participants