Skip to content

Conversation

TingluoHuang
Copy link
Member

To support runner auth migration from pipelines/token to runner-admin, we need a central place to track the state of migration in the runner.

HostContext is a singleton per runner process, so it's the prefect place to track the state of auth migration.

  • AllowAuthMigration // Boolean for checking if auth migration is allowed.
  • EnableAuthMigration() // Enable auth migration
  • DeferAuthMigration(TimeSpan) // Temporary disable auth migration for a period of time.
  • event AuthMigrationChanged // Event to notify the change of auth migration state

https://github.com/github/actions-runner-admin/issues/1656

@TingluoHuang TingluoHuang requested a review from a team as a code owner March 31, 2025 15:39
@TingluoHuang TingluoHuang force-pushed the users/tihuang/hostcontext branch from e4fa2af to 5405d47 Compare March 31, 2025 16:04
refreshIntervalInMS = int.Parse(Environment.GetEnvironmentVariable("_GITHUB_ACTION_AUTH_MIGRATION_REFRESH_INTERVAL"));
}
#endif
_authMigrationAutoReenableTask = AuthMigrationAuthReenableAsync(TimeSpan.FromMilliseconds(refreshIntervalInMS), _authMigrationAutoReenableTaskCancellationTokenSource.Token);
Copy link
Member Author

Choose a reason for hiding this comment

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

we only run the background task when someone calls EnableAuthMigration(), so we can make sure we don't run this extra code in GHES for now.

@TingluoHuang TingluoHuang merged commit cdeec01 into main Mar 31, 2025
9 checks passed
@TingluoHuang TingluoHuang deleted the users/tihuang/hostcontext branch March 31, 2025 19:26
marko-k0 pushed a commit to dfinity/runner that referenced this pull request May 13, 2025
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
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