You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A GitHub run waiting for environment approval logs an "Unhandled workflow status: waiting" warning on every poll, flooding the 1000-entry log #306
MapWorkflowRunStatus (BuildMonitor/Providers/GitHub.cs:470-497) maps only Requested, Queued and InProgress explicitly. Octokit's WorkflowRunStatus also has Waiting and Pending. Waiting means a job targets a deployment environment with required reviewers and is waiting for approval. Both fall through to _ => RunStatus.Pending, which is the correct result. But the guard right after the switch then logs a Warning for any Pending result whose status isn't Requested or Queued:
A waiting run counts as ongoing, so RunSync polls it every 10-60 s, and a deployment can wait for approval for hours. Each poll adds another identical warning. Log keeps only MaxEntries = 1000 (Log.cs:33), so after roughly a few hours of one pending approval, the genuine warnings and errors (auth failures, rate limits) have been pushed out. They are gone by the time someone opens the log to see what went wrong.
Repro
Build an uninitialized WorkflowRun with Status = new StringEnum<WorkflowRunStatus>(WorkflowRunStatus.Waiting), call MapWorkflowRunStatus (via reflection), and inspect Log.GetEntries().
Observed: returns Pending, and one Warning entry is added per call.
Expected: returns Pending with no warning, since this is a known, normal state.
Suggested fix
Add explicit arms WorkflowRunStatus.Waiting => RunStatus.Pending and WorkflowRunStatus.Pending => RunStatus.Pending, and exclude both from the warning guard. The cleanest way is to make the guard fire only when the default arm was actually taken.
If a warning is still wanted for a truly unknown status, log it once per distinct status value rather than once per poll.
Add a test that Waiting and Pending map to Pending without adding a log entry.
Priority: Medium. The status mapping is correct, but one run waiting on environment approval logs a warning on every poll. The 1000-entry log then pushes out real auth or rate-limit errors within a few hours, which defeats the purpose of the log.
Area / suggested assignee:Providers/GitHub.csMapWorkflowRunStatus (lines 470–497) and its warning guard. Owner: @matt-edmondson
Next step: add explicit Waiting/Pending arms, fire the warning only from the default arm (ideally once per distinct unknown status), and add a test that asserts no log entry for Waiting/Pending.
Activity
matt-edmondson commentedon Sep 27, 2026
Triage
Providers/GitHub.csMapWorkflowRunStatus(lines 470–497) and its warning guard. Owner: @matt-edmondsonWaiting/Pendingarms, fire the warning only from the default arm (ideally once per distinct unknown status), and add a test that asserts no log entry forWaiting/Pending.Generated by Claude Code