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
Fix potential parse error in UpdateManager
#12685
Fix potential parse error in UpdateManager
#12685
Conversation
UpdateManager
Why do we check if there is a new version every 5 seconds? https://github.com/zkSNACKs/WalletWasabi/blame/master/WalletWasabi.Daemon/Global.cs#L80 ? |
So if I understand correctly, then this is a workaround basically. If people who release the software know that they are not suppose to create tags with, eg, letters, then there is no issue and this fix is not necessary. If people who release the software make a mistake and release |
No particular reason to do it every 5 seconds, just to know when there is a new update. We can increase this timespan, decreasing resource usage.
Let's say the client is on Because we only get data from our api Now if we are already on a |
Well, are you aware that Github can ban you for this, right? And funnily my IP got banned but we keep ignoring this error so it's hidden and does not surface to user in any way. So if I'm right about this, then you attempt to download every 5s, get banned for some short period of time and then got unbanned, so then it effectively works as if you were checking every 1 hour or so. But how could 5s checking be approved is mind boggling to me. I mean is this an oversight or was this deliberate decision? |
Sounds good. So do we actually want to support releasing |
Oh no, those fast requests only goes towards our backend. |
Ok, still it's a lot of requests. 17280 requests per day by a single user. |
Not true sadly/not sadly. |
I'm not aware of that, no. This PR just makes sure if it does happen - by accident or for a reason - we can still auto-update.
You're right with that, I'll create a PR to increase. Does 3 minutes sounds reasonable? |
Opinions will differ on this one but I think that 1 hour sounds like a reasonable minimum and more than a day is too much. I would just create a PR and David will comment on that. |
Although our backend can handle this with ease, agree that there is no need to do this more often than once per hour. With websockets in future we could push this info from server to client, instead of polling. |
I declare it to be a minefield then :) I would say that it would be great to modify a release document and mention these things there ("Do not release versions that differ only by suffix"). |
Will do both. Nevertheless these are out of scope for the current PR. I still think this PR makes sense and should be merged, do you agree? |
It doesn't need to be done with any frequency, it should be part of the websocket handshake, that's enough. |
Fixes #12048
This small change ensures that, in the event the sanity checks fail, we convert the correct version string into a
Version
object without encountering an exception.