Skip to content

Conversation

TingluoHuang
Copy link
Member

RunnerSetting will have the following 3 stages during migration.

  1. {"ServerURL": "https://pipelines.xxxxx"}
  • Create session and start long-poll with actions-dotnet
  • Depends on job type, renew request with run-service or actions-dotnet. When renew with actions-dotnet, the same connection during creation session is re-used.

2 {"ServerURL": "https://pipelines.xxxxx", "ServerUrlV2":"https://broker.xxxx", "UseV2Flow": true}

  • Create session and start long-poll with broker-listener
  • Depends on job type, renew request with run-service or actions-dotnet. The runner is failing for jobs that come from actions-dotnet.

3 {"ServerUrlV2":"https://broker.xxxx", "UseV2Flow": true}

  • Create session and start long-poll with broker-listener
  • Renew request with run-service

This PR make sure Case 2 works by always creating an VssConnection for actions-dotnet even we create session with broker-listener.

Without this change, when runner start renew request with actions-dotnet, the runner will throw exception about:

[2025-03-14 15:35:44Z ERR  JobDispatcher] Catch exception during renew runner jobrequest 1114883.
[2025-03-14 15:35:44Z ERR  JobDispatcher] System.InvalidOperationException: SetConnection JobRequest
   at GitHub.Runner.Common.RunnerServer.CheckConnection(RunnerConnectionType connectionType) in /Users/tingluohuang/repo/runner/src/Runner.Common/RunnerServer.cs:line 195
   at GitHub.Runner.Common.RunnerServer.RenewAgentRequestAsync(Int32 poolId, Int64 requestId, Guid lockToken, String orchestrationId, CancellationToken cancellationToken) in /Users/tingluohuang/repo/runner/src/Runner.Common/RunnerServer.cs:line 287
   at GitHub.Runner.Listener.JobDispatcher.RenewJobRequestAsync(IRunnerServer runnerServer, Int32 poolId, Int64 requestId, Guid lockToken, String orchestrationId, TaskCompletionSource`1 firstJobRequestRenewed, CancellationToken token) in /Users/tingluohuang/repo/runner/src/Runner.Listener/JobDispatcher.cs:line 856

@TingluoHuang TingluoHuang requested a review from a team as a code owner March 14, 2025 16:22
@TingluoHuang TingluoHuang merged commit 07310ca into main Mar 14, 2025
9 checks passed
@TingluoHuang TingluoHuang deleted the users/tihuang/trace branch March 14, 2025 17:55
sirredbeard pushed a commit to sirredbeard/runner that referenced this pull request Jun 11, 2025
sirredbeard pushed a commit to sirredbeard/runner that referenced this pull request Jun 11, 2025
AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jun 17, 2025
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.

2 participants