-
Notifications
You must be signed in to change notification settings - Fork 913
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
RPC methods versioning for plugins #3400
Conversation
Marking WIP as I shoudl also expose the version in |
You can make a PR unmergeable if you use the "Create draft Pull request" button instead of the "Create Pull Request" button :-) |
Changed my mind just after :/ I should make use of the "think before clicking the green button" button, too |
We want this if 'lightningd' starts to rely on a plugin's RPC methods to avoid uncompatibility with a (third-party, mostly?) plugin.
Changelog-Added: JSONRPC: The 'listconfigs' "plugins" entry now also lists the RPC methods each plugin exposes, along with their version (if it was specified).
Changelog-Added: Plugins: A new optional field 'version' can be appended to the methods a plugin registers in the 'getmanifest'.
The value 'as_int' should not be added as a bool.
9ff7260
to
8233f4c
Compare
No problem, I thought I might as well point it out for the future (also because I myself only found out about this recently) :-) |
I think this is ready for review |
After mulling this over for a couple of days I am no longer convinced that It could also get rather confusing for plugin devs to distinguish which As long as we only add arguments or add more things to the returned results we Changing the name allows us to skip plugins that weren't updated with the TL;DR: Maybe we should wait for the versioning to really become an issue, and when we have more information about how things might break. I'm sorry I sent you down this rabbit hole by suggesting the versions in the |
Of course ! quickly adds a TODO line
That's what version numbers aimed to do, but I'm fine with names too.
I agree, and I'm also in favor of adding less things as the diff for this is becoming really big on my side and it would just make review more complicated for a (somewhat?) premature optimisation.
Absolutely. I'll PR the drive-by fixups commits and close this. |
/me looks guiltily around, then pretends nothing happened. |
Rationale described here: #3354 (comment).
Summary: We may be going to rely on plugin-exposed RPC methods for crucial operations (such as Bitcoin backend), a versioning is useful to avoid nasty corner cases.
Open questions: