Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a V2 flow for runner deletion by adding methods to handle runner deletion through the monolith rather than directly. The changes introduce a new deletion API method and refactor URL construction logic for better code reuse.
- Adds
DeleteRunnerAsyncmethod to support V2 runner deletion flow - Refactors URL construction logic into a reusable
GetEntityUrlhelper method - Updates existing methods to use the new helper for consistent URL generation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Runner.Listener/Configuration/ConfigurationManager.cs | Adds V2 flow logic for runner configuration with conditional branching |
| src/Runner.Common/RunnerDotcomServer.cs | Implements DeleteRunnerAsync method and refactors URL construction into GetEntityUrl helper |
Samirat
commented
Jul 29, 2025
| { | ||
| var deletionToken = await GetRunnerTokenAsync(command, settings.GitHubUrl, "remove"); | ||
| GitHubAuthResult authResult = await GetTenantCredential(settings.GitHubUrl, deletionToken, Constants.RunnerEvent.Remove); | ||
| authResult = await GetTenantCredential(settings.GitHubUrl, deletionToken, Constants.RunnerEvent.Remove); |
Contributor
Author
There was a problem hiding this comment.
Instead of using settings.UseV2Flow, I'm using the UseV2Flow returned by the monolith as part of auth. Not sure if this is the correct logic
boxofyellow
previously approved these changes
Aug 6, 2025
boxofyellow
left a comment
There was a problem hiding this comment.
Look good sorry I missed that too.
TingluoHuang
previously approved these changes
Aug 6, 2025
Samirat
commented
Aug 7, 2025
| _messageListener.Verify(x => x.DeleteMessageAsync(It.IsAny<TaskAgentMessage>()), Times.AtLeast(2)); | ||
| _messageListener.Verify(x => x.DeleteSessionAsync(), Times.Once()); | ||
| _credentialManager.Verify(x => x.LoadCredentials(true), Times.Exactly(2)); | ||
| _credentialManager.Verify(x => x.LoadCredentials(true), Times.AtLeast(2)); |
Contributor
Author
There was a problem hiding this comment.
Not sure why, but the osx-x64 test run was calling this 3 times
TingluoHuang
approved these changes
Aug 7, 2025
This was referenced Aug 14, 2025
fmartinez255
pushed a commit
to TiVo/actions-runner
that referenced
this pull request
Oct 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR implements the V2 flow for runner deletion (going through the monolith)
https://github.com/github/actions-runner-admin/issues/1657