-
Notifications
You must be signed in to change notification settings - Fork 77
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
SLVS-1400 Add migration mechanism to separate connections from bindings #5696
SLVS-1400 Add migration mechanism to separate connections from bindings #5696
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.
Just a small ordering comment, the other is up to your preference. 👍
@@ -112,6 +114,15 @@ private async Task InitAsync() | |||
logger?.WriteLine(Strings.Daemon_InitializationComplete); | |||
} | |||
|
|||
/// <summary> | |||
/// This migration should be performed before initializing other services, independent if a solution or a folder is opened. |
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.
I feel that this comment should be above the method usage as it's a warning about the order.
} | ||
|
||
private async Task InitAsync() | ||
{ | ||
try | ||
{ | ||
await MigrateBindingsToServerConnectionsIfNeededAsync(); |
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.
This should be below the logger initialization and the initialization message.
[ThreadId 58] [Connection Migration] Start migrating connections from existing bindings
[ThreadId 58] [Connection Migration] The server connection with the id duncanp-sonar-test was not migrated as it already exists.
[ThreadId 58] Initializing the daemon package...
to
[ThreadId 58] Initializing the daemon package...
[ThreadId 58] [Connection Migration] Start migrating connections from existing bindings
[ThreadId 58] [Connection Migration] The server connection with the id duncanp-sonar-test was not migrated as it already exists.
Quality Gate passedIssues Measures |
6ce73f1
into
feature/new-connected-mode
Implemented the migration and called it in the SonarLintDaemonPackage at the very beginning, because it should be performed as early as possible. This package is also called if solutions or folders are opened, or even none of them, which is desirable.
When the migration is performed for the first time, if you open a solution super fast, it might not actually be bound. But if you re-open the solution, then everything works as expected.
I did not find a workaround for this issue (even triggering the binding manually did not help, I guess because it was too early). But I don't think I should invest too much effort into this, as it will only happen once: when the migration is performed, after the first update.