- Notifications
You must be signed in to change notification settings - Fork3
chore: check server version on sign-in and launch#43
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Updates CredentialModel to have an additional state "Unknown" duringstartup while credentials are validated in the background asynchronously(15s timeout).While loading credentials on startup, the tray app shows a loading message.While updating credentials, we now check that the server version fallsin our expected range.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@spikecurtis I pretty heavily reworked CredentialManager:
|
To protect things from concurrent access:
|
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 like the new CredentialManager overall, but still a bit concerned about invoking callbacks while holding the lock. A couple other small nits FYI.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
// with no cancellation, the method itself will impose a timeout on the | ||
// HTTP portion. | ||
var credentialManager = _services.GetRequiredService<ICredentialManager>(); | ||
_ = credentialManager.LoadCredentials(CancellationToken.None); |
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 to check my understanding here, because we are notawait
ing the task, it doesn't matter if the task throws some exception, like being canceled. And, we don't block for it to complete, right?
I ask because we want the rest of this function to still run and handle closing of the tray window.
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.
Yep, we run it in the background and ignore all errors. If the credentials fail to load, the state will transition to "invalid" which will show the "please sign in" screen.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
0fefe8a
intomainUh oh!
There was an error while loading.Please reload this page.
Updates CredentialModel to have an additional state
Unknown
during startup while credentials are validated in the background asynchronously (15s timeout).While loading credentials on startup, the tray app shows a loading message.
While updating credentials, we now check that the server version falls in our expected range.
The sign in page now uses a WinUI 3 Dialog to show errors.
Closes#42