Skip to content

Conversation

lokesh755
Copy link
Contributor

No description provided.

@Copilot Copilot AI review requested due to automatic review settings May 12, 2025 05:50
@lokesh755 lokesh755 requested a review from a team as a code owner May 12, 2025 05:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Introduces logic to prefer and handle migrated runner configuration on startup, falling back to the original settings if needed, and enables session restarts when configuration is updated.

  • Runner now attempts to load and use .runner_migrated settings first, with a fallback to the original settings.
  • IConfigurationManager/ConfigurationManager gained LoadMigratedSettings(), and ConfigurationStore can detect migrated config files.
  • BrokerMessageListener accepts migrated settings via a new constructor and limits retry attempts; a new L0 test covers the provided-settings constructor path.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Test/L0/Listener/BrokerMessageListenerL0.cs Added L0 test CreatesSessionWithProvidedSettings to verify constructor-based settings usage
src/Runner.Listener/Runner.cs Updated RunAsync to load migrated settings first and added logic to restart sessions on updates
src/Runner.Listener/Configuration/ConfigurationManager.cs Added LoadMigratedSettings() to load .runner_migrated configurations
src/Runner.Listener/BrokerMessageListener.cs Extended listener to accept isMigratedSettings, trace which settings are used, and cap retries
src/Runner.Common/ConfigurationStore.cs Introduced IsMigratedConfigured() to detect existence of migrated config file
Comments suppressed due to low confidence (3)

src/Test/L0/Listener/BrokerMessageListenerL0.cs:369

  • There’s no test covering the migrated-settings path (isMigratedSettings = true). Consider adding an L0 test to verify that BrokerMessageListener(settings, true) loads migrated settings and correctly falls back when session creation fails.
public async Task CreatesSessionWithProvidedSettings()

src/Runner.Listener/Configuration/ConfigurationManager.cs:80

  • _store.GetMigratedSettings() isn't defined on IConfigurationStore or implemented in ConfigurationStore. Add a GetMigratedSettings() method to the interface and implement it, or call an existing method that returns RunnerSettings.
RunnerSettings settings = _store.GetMigratedSettings();

src/Runner.Common/ConfigurationStore.cs:119

  • The code calls GetMigratedSettings() but the store interface only declares IsMigratedConfigured(). You need to declare RunnerSettings GetMigratedSettings() in IConfigurationStore and implement it in ConfigurationStore.
bool IsMigratedConfigured();


try
{
CreateSessionResult createSessionResult = await _listener.CreateSessionAsync(HostContext.RunnerShutdownToken);
Copy link
Member

Choose a reason for hiding this comment

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

do we want to report telemetry back to service in case of any failure, so we know customers are having issue with migration.

@TingluoHuang TingluoHuang merged commit ce4b7f4 into actions:main May 12, 2025
9 checks passed
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