-
Notifications
You must be signed in to change notification settings - Fork 195
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
headlamp-plugin: Make update check asynchronous #1941
Conversation
431b6aa
to
8739392
Compare
8739392
to
2286cf2
Compare
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.
Besides the comments about the logic. I think this PR is doing 2 things: replacing the function that checks for the latest pkg version + limiting the checks.
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.
From this comment in the issue: #1899 (comment)
It could be made async, so it doesn't block the user getting work done.
If the check is done async, then it can show the message some moments later. This avoids having state, and has the benefit that it isn't slow once a day. The user is never slowed down in their work.
Currently doing npm start
with this branch will do the check in an async fashion never block the user. So I think all of the last check stuff is not necessary.
The main goal of not blocking the user is achieved with the code:
informIfOutdated().catch(error => {
console.error('Failed to check for updates:', error);
});
So please keep that informIfOutdated()
call, and remove all the lastCheckTime
code and the force-check
code.
8b7c61a
to
69cb257
Compare
b9f62bb
to
ceba257
Compare
b7eedee
to
02359a3
Compare
@illume I see, thanks for the fix! I think this makes sense since I noticed issues with performing the |
02359a3
to
4f9cdbe
Compare
This change makes the update check for headlamp-plugin asynchronous to avoid slowing down and blocking the user on start. Fixes: #1899 Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
4f9cdbe
to
948c4b8
Compare
This change makes the update check for headlamp-plugin asynchronous to avoid slowing down and blocking the user on start.
Fixes: #1899