-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: periodic version check and json config #10438
Conversation
b4a5919
to
73f5b36
Compare
Hey, thanks for triggering the CI. I've synced Is there an easy way to run workflows locally( |
Thank you @Matrix89, I'll try to review and squeeze this into 0.30, the sooner we ship the notice the better. If you want to run tests locally, you get 90% of them by running To expedite this PR I'll look into this later today, but will timebox and let you know if I've run out of time. TODO for self
Preview$ ipfs daemon
[..]
WebUI: http://127.0.0.1:5021/webui
Gateway server listening on /ip4/127.0.0.1/tcp/8580
Daemon is ready
2024-06-19T23:27:54.111+0200 ERROR cmd/ipfs kubo/daemon.go:1076
⚠️ A NEW VERSION OF KUBO DETECTED
This Kubo node is running an outdated version (0.21.0).
63% of the sampled Kubo peers are running a higher version.
Visit https://github.com/ipfs/kubo/releases or https://dist.ipfs.tech/#kubo and update to version 0.29.0 or later.
|
This refactor applies changes listed in ipfs#10438 (comment) namely - removes surface for panics on custom routing configurations - avoids running the check until one minute after node start, to allow for peerbook to populate - allow disabling version check via env. variable (because there will be ask for this anyway) - make RPC command JSON more useful by including information about the size of sampled kubo nodes - make message more friendly to less technical users
73f5b36
to
e29ffe8
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.
Lgtm.
Had to moved some things around and fix panics with custom routers. Listed issues are no longer happening, and it's more future-proof. Added docs and changelog.
Looking at https://github.com/probe-lab/network-measurements/blob/main/reports/2024/calendar-week-23/ipfs/README.md#kubo made me adjust min-fraction to 5% to start showing notification bit faster.
In this form it should be a low risk quality of life improvement, so planning to include it in 0.30 (#10436).
Will keep PR open for a few more days, just in case someone wants to drop feedback.
TODO from reviews
configuratbility
- replace env variable with
Version.RunSwarmCheck
(Flag) - while at it, add
Version.Suffix
(optionalString)
replacing env variable with proper configuration flag that allows user to enable/disable checks on init etc.
wire up json config at Version.AgentSuffix to be applied when present, otherwise use --agent-version-suffix from ipfs daemon as before
Pushed:
Merging to include in 0.30.0-rc1 (#10436) and gather feedback. |
This PR builds on top of @schomatis work from #8839, it moves his version checking logic to its own file and adds a ticker which runs it every hour.
Closes #6487