-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Prefer _migrated config on startup #3853
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
Prefer _migrated config on startup #3853
Conversation
There was a problem hiding this 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
gainedLoadMigratedSettings()
, andConfigurationStore
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 thatBrokerMessageListener(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 onIConfigurationStore
or implemented inConfigurationStore
. Add aGetMigratedSettings()
method to the interface and implement it, or call an existing method that returnsRunnerSettings
.
RunnerSettings settings = _store.GetMigratedSettings();
src/Runner.Common/ConfigurationStore.cs:119
- The code calls
GetMigratedSettings()
but the store interface only declaresIsMigratedConfigured()
. You need to declareRunnerSettings GetMigratedSettings()
inIConfigurationStore
and implement it inConfigurationStore
.
bool IsMigratedConfigured();
|
||
try | ||
{ | ||
CreateSessionResult createSessionResult = await _listener.CreateSessionAsync(HostContext.RunnerShutdownToken); |
There was a problem hiding this comment.
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.
No description provided.