Skip to content
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

Make UpdateManager a PeriodicRunner #13050

Merged
merged 2 commits into from
May 27, 2024

Conversation

turbolay
Copy link
Collaborator

Period = 1 day according to #13027 (comment)

Copy link
Collaborator

@Szpoti Szpoti left a comment

Choose a reason for hiding this comment

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

utACK.

Do you think it makes sense to register UpdateManager as a Hosted Service now it's a periodic runner?

@turbolay
Copy link
Collaborator Author

Do you think it makes sense to register UpdateManager as a Hosted Service now it's a periodic runner?

I thought about it while making this PR but I don't think so. If we need it somewhere or to stop it or whatever in the future well we can register it. If someone thinks differently, I will update this PR.

Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

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

LGTM. It makes sense to have this because some users are just running the software without restart. They might not even look at the screen but if they do at least they will see the update message.

Regarding the disposal... UpdateManager is IDisposable - so you need to do that somewhere. Right now it is missing.

There are two options:

  • Add it to HostedServices.
  • Add the disposal to Global.DisposeAsync.

@turbolay
Copy link
Collaborator Author

@lontivero I can see you forced push here, what happened to this PR?

@kiminuo
Copy link
Collaborator

kiminuo commented May 27, 2024

Code looks good to me but this line fails for me:

https://github.com/zkSNACKs/WalletWasabi/blob/97032bc4711bddd2eddf81c9633216767d0cc35c/WalletWasabi/WebClients/Wasabi/WasabiClient.cs#L173

and I get always "Not Found":

2024-05-27 10:20:47.581 [ 14] ERROR Getting new update failed with error. Exception: System.Net.Http.HttpRequestException: Not Found
   at WalletWasabi.Tor.Http.Extensions.HttpResponseMessageExtensions.ThrowRequestExceptionFromContentAsync(HttpResponseMessage me, CancellationToken cancellationToken) in D:\work\WasabiWallet\WalletWasabi.review\WalletWasabi\Tor\Http\Extensions\HttpResponseMessageExtensions.cs:line 120
   at WalletWasabi.WebClients.Wasabi.WasabiClient.GetBackendMajorVersionAsync(CancellationToken cancel) in D:\work\WasabiWallet\WalletWasabi.review\WalletWasabi\WebClients\Wasabi\WasabiClient.cs:line 177
   at WalletWasabi.WebClients.Wasabi.WasabiClient.CheckUpdatesAsync(CancellationToken cancel) in D:\work\WasabiWallet\WalletWasabi.review\WalletWasabi\WebClients\Wasabi\WasabiClient.cs:line 188
   at WalletWasabi.Services.UpdateManager.ActionAsync(CancellationToken cancellationToken) in D:\work\WasabiWallet\WalletWasabi.review\WalletWasabi\Services\UpdateManager.cs:line 53

This makes me think that the endpoint got changed by a Lucas PR (there was a PR changing API endpoints). But I don't know for sure.

@turbolay
Copy link
Collaborator Author

@kiminuo The endpoint was changed on this branch, and it's not deployed yet, which explains why it doesn't reach. I would like to merge this PR so I can make a new PR to merge to master. I will take care to change the endpoint back to Software.

Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

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

Cannot test it, becasue the endpoint is missing. But the code LGTM.

@turbolay turbolay merged commit 8ccba53 into WalletWasabi:Downsize+FOSS May 27, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants