Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Runner.Listener/Configuration/ConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,12 @@ public async Task ConfigureAsync(CommandSettings command)
}
}

// Validate can connect.
await _runnerServer.ConnectAsync(new Uri(runnerSettings.ServerUrl), creds);
// Validate can connect using the obtained vss credentials.
// In Runner Admin flow there's nothing new to test connection to at this point as registerToken is already validated via GetTenantCredential.
if (!runnerSettings.UseRunnerAdminFlow)
{
await _runnerServer.ConnectAsync(new Uri(runnerSettings.ServerUrl), creds);
}
Comment on lines +181 to +186
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

When UseRunnerAdminFlow is true, this skips the connection check but still prints "Connected to GitHub" and logs "Test Connection complete." This makes the output/telemetry ambiguous because no runner-server connectivity was actually validated in this path. Consider adjusting the messaging/logging (or emitting an explicit "skipping connection test" trace) so operators can tell whether a real _runnerServer.ConnectAsync succeeded.

See below for a potential fix:


                        _term.WriteLine();
                        _term.WriteSuccessMessage("Connected to GitHub");

                        Trace.Info("Test Connection complete.");
                    }
                    else
                    {
                        Trace.Info("Skipping runner-server connection test because runner-admin flow has already validated the registration token.");

                        _term.WriteLine();
                        _term.WriteSuccessMessage("GitHub authentication succeeded (runner-admin flow; no additional connection test performed).");
                    }

Copilot uses AI. Check for mistakes.
Comment on lines +182 to +186
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

This change introduces a new branch where _runnerServer.ConnectAsync(...) is intentionally not called for runner-admin flow. There are existing L0 tests for ConfigurationManager.ConfigureAsync, but none assert this new behavior. Please add a unit test that exercises the runner-admin flow and verifies the connection test is skipped (and, if applicable, that the flow still proceeds to runner group discovery/registration).

Copilot generated this review using guidance from repository custom instructions.

_term.WriteLine();
_term.WriteSuccessMessage("Connected to GitHub");
Expand Down
Loading