Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update runner to handle Dotcom/runner-admin based registration flow #2487

Merged
merged 15 commits into from
Mar 21, 2023

Conversation

takost
Copy link
Contributor

@takost takost commented Mar 13, 2023

Resolves: https://github.com/github/actions-runner-admin/issues/120

Add to runner settings property to identify if we register this runner via runner-admin and not Actions Service. Value of this property comes from dotcom side, where it is defined as feature flag. This value can't be provided via configuration argument. In future this will define behaviour of whole runner flow (assignment, deletion, etc.)

Add class to make call to dotcom. Add there functions to get runnergroups, list runners and add new runner. Right now we don't implement update of runner (replacement of runner if runner with provided name already exists during runner registration).

src/Runner.Listener/Configuration/ConfigurationManager.cs Outdated Show resolved Hide resolved
src/Runner.Listener/Configuration/ConfigurationManager.cs Outdated Show resolved Hide resolved
src/Runner.Listener/Configuration/ConfigurationManager.cs Outdated Show resolved Hide resolved
src/Runner.Listener/Configuration/ConfigurationManager.cs Outdated Show resolved Hide resolved
src/Sdk/DTWebApi/WebApi/TaskRunner.cs Outdated Show resolved Hide resolved
src/Sdk/DTWebApi/WebApi/TaskRunnerPool.cs Outdated Show resolved Hide resolved
src/Sdk/DTWebApi/WebApi/TaskRunnerPool.cs Outdated Show resolved Hide resolved
src/Sdk/DTWebApi/WebApi/TaskRunnerPool.cs Outdated Show resolved Hide resolved
src/Runner.Common/RunnerDotcomServer.cs Outdated Show resolved Hide resolved
src/Runner.Common/RunnerDotcomServer.cs Outdated Show resolved Hide resolved
src/Sdk/DTWebApi/WebApi/RunnerPool.cs Outdated Show resolved Hide resolved
Delete
}

public class RunnerDotcomServer : RunnerService, IRunnerDotcomServer
Copy link
Contributor

Choose a reason for hiding this comment

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

nice! I like the refactor to it's own class

@takost takost changed the title [WIP] Update runner to handle Dotcom/runner-admin based registration flow Update runner to handle Dotcom/runner-admin based registration flow Mar 16, 2023
@takost takost marked this pull request as ready for review March 16, 2023 16:01
@takost takost requested a review from a team as a code owner March 16, 2023 16:01

public List<TaskAgent> ToTaskAgents()
{
List<TaskAgent> taskAgents = new List<TaskAgent>();
Copy link
Contributor

Choose a reason for hiding this comment

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

is this used?

luketomlinson
luketomlinson previously approved these changes Mar 16, 2023
Copy link
Contributor

@luketomlinson luketomlinson left a comment

Choose a reason for hiding this comment

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

🚀

@takost takost merged commit bb7b1e8 into main Mar 21, 2023
@takost takost deleted the takost/runner-admin-flow branch March 21, 2023 15:05
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