Break UseV2Flow into UseV2Flow and UseRunnerAdminFlow.#4013
Break UseV2Flow into UseV2Flow and UseRunnerAdminFlow.#4013TingluoHuang merged 1 commit intomainfrom
Conversation
| throw new NotSupportedException("Message queue listen OAuth token."); | ||
| } | ||
|
|
||
| // allow the server to override the serverUrlV2 and useV2Flow |
There was a problem hiding this comment.
these got moved up since i want to check them in line 422
|
|
||
| [DataMember(Name = "use_v2_flow")] | ||
| public bool UseV2Flow { get; set; } | ||
| public bool UseRunnerAdminFlow { get; set; } |
There was a problem hiding this comment.
this is returned from dotcom to indicates whether we should use runner-admin flow.
There was a problem hiding this comment.
i keep the datamember name the same so we don't need to make a deployment to the service.
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a new property UseRunnerAdminFlow to distinguish between different authentication flows in the GitHub Actions runner. The change separates the runner admin flow from the existing V2 flow mechanism, allowing for more granular control over authentication methods.
Key changes:
- Added
UseRunnerAdminFlowproperty to configuration classes and data structures - Updated conditional logic to use the new property where appropriate for runner admin operations
- Relocated server property override logic to occur earlier in the configuration process
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/Runner.Listener/Configuration/CredentialManager.cs |
Renamed UseV2Flow property to UseRunnerAdminFlow in the GitHubAuthResult class |
src/Runner.Listener/Configuration/ConfigurationManager.cs |
Updated configuration logic to use UseRunnerAdminFlow for runner admin operations and moved server property override logic |
src/Runner.Common/ConfigurationStore.cs |
Added UseRunnerAdminFlow property to RunnerSettings class |
3047f5e to
b49d1f1
Compare
| TaskAgentPool agentPool = null; | ||
| List<TaskAgentPool> agentPools; | ||
| if (runnerSettings.UseV2Flow) | ||
| if (runnerSettings.UseRunnerAdminFlow) |
There was a problem hiding this comment.
check the UseRunnerAdminFlow before calling any _dotcomServer
https://github.com/github/actions-runner-admin/issues/1898