-
Notifications
You must be signed in to change notification settings - Fork 871
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
New deprecation infrastructure #6936
New deprecation infrastructure #6936
Commits on Jan 24, 2024
-
lightningd: clean up notification infrastructure.
The `struct notification` lost type-safety, but avoided a redundant string. The string is better, I think. Since all notifications now contain an object of same name (some have deprecated fields outside that), we can add helpers to do that, too. Also, add some const (easy to do now we're typesafe!) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for e82bb32 - Browse repository at this point
Copy the full SHA e82bb32View commit details
Commits on Jan 25, 2024
-
lightningd: remove msatoshi alias for amount_msat.
Changelog-Removed: JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice`: `msatoshi` argument (deprecated 0.12.0). Use `amount_msat`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 46d426e - Browse repository at this point
Copy the full SHA 46d426eView commit details -
common: remove no-longer-required p_req_dup_ok hack.
This was for "msatoshi" and "amount_msat" in routes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for bf08247 - Browse repository at this point
Copy the full SHA bf08247View commit details -
common: remove parameter aliases.
We currently don't have any! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0247066 - Browse repository at this point
Copy the full SHA 0247066View commit details -
pyln-client: remove long-obsolete support for msatoshi arg.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 3b13f1f - Browse repository at this point
Copy the full SHA 3b13f1fView commit details -
Seriously, it's taproot time, let's get rid of p2sh wrapped segwit. Changelog-Removed: wallet: removal of p2sh-segwit addresses; newaddr won't issue them, we won't watch them for new funds (deprecated in *23.02*) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 138c302 - Browse repository at this point
Copy the full SHA 138c302View commit details -
funder: remove lease-fee-base-msat
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Experimental: Plugins: `funder` option "lease-fee-base-msat" removed (deprecated in v0.11, use "lease-fee-base-sat")
Configuration menu - View commit details
-
Copy full SHA for 5ad94d4 - Browse repository at this point
Copy the full SHA 5ad94d4View commit details -
config: remove disable-ip-discovery
Changelog-Removed: Config: `disable-ip-discovery` (deprecated in v23.02): use `announce-addr-discovered` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ec0bfe0 - Browse repository at this point
Copy the full SHA ec0bfe0View commit details -
lightningd: reuse code for "dynamic" getmanifest response parsing.
And clean up weird indent. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 681dec4 - Browse repository at this point
Copy the full SHA 681dec4View commit details -
Makefile: add CLN_NEXT_VERSION, functions encoding deprecation schedule.
Each feature has a name, and says when deprecation begins and ends. There's an API coming to allow you to re-enable on a per-feature basis even if it's ended (as long as it's not been removed from the code ofc!). Default end is 6 months after deprecation, i.e. we complain about it at that point, if we can detect its use. e.g, a standard deprecation in v24.05: v24.02: allowed v24.02 with mods: allowed master after v24.02: allowed unless deprecated APIs disabled. v24.05: allowed unless deprecated APIs disabled. v24.08: allowed unless deprecated APIs disabled. v24.11: allowed unless deprecated APIs disabled, but logs at BROKEN level. v25.02: allowed only if --i-promise-to-fix-broken-api-user=FEATURE. v25.05: code is actually removed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 7ed342b - Browse repository at this point
Copy the full SHA 7ed342bView commit details -
msggen: generalize version handling.
Updating this every release was just busywork, and it turns out we don't actually care: if something is marked deprecated we want to make it optional, whenever it is for, and the only real test is if it was added before our lowest-supported version we can consider it non-optional. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for a43dfe0 - Browse repository at this point
Copy the full SHA a43dfe0View commit details -
schemas: deprecated is now a range.
Don't assume removal is +6 months, but have a start deprecation/end support range. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f3c9c38 - Browse repository at this point
Copy the full SHA f3c9c38View commit details -
plugins/sql: make columns an array of pointers.
`struct column` has a dynamically allocated member, which is neater if it is a tal object itself (we allocated the member off the array, instead). We're about to add two new members, so clean this up first. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ee5a884 - Browse repository at this point
Copy the full SHA ee5a884View commit details -
plugins/sql: do deprecations at request time, not schema loading.
When we allow deprecation to be set per-connection, we need to generalize this approach. Instead of filtering out deprecated fields at schema loading, we need to load them, then refuse to serve deprecated fields on a per-request basis. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f0d622e - Browse repository at this point
Copy the full SHA f0d622eView commit details -
lightningd: i-promise-to-fix-broken-api-user option.
This allows the user to specify the feature *by name*, and hopefully complain to the developer to fix their code, knowing it will be removed entirely in the next release! Changelog-Added: config: `i-promise-to-fix-broken-api-user` allows for a one-release re-enablement of long-deprecated features. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 6dcfa8c - Browse repository at this point
Copy the full SHA 6dcfa8cView commit details -
doc: start a list of current deprecations.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for fef9b9d - Browse repository at this point
Copy the full SHA fef9b9dView commit details -
pytest: note where we use very deprecated features, so tests don't rb…
…eak. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 04e645d - Browse repository at this point
Copy the full SHA 04e645dView commit details -
common: add command_deprecated_param_ok() and command_deprecated_out_…
…ok() Generic helpers for libplugin and lightningd. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c9f7d23 - Browse repository at this point
Copy the full SHA c9f7d23View commit details -
plugins/sql: use per-command deprecations.
In this case the cmd is `sql` but the field we're talking about is from a different command, so we need a new libplugin API. Note: there are still no deprecations in any tables used by `sql`, so this is a bit moot for now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for b80276e - Browse repository at this point
Copy the full SHA b80276eView commit details -
jsonrpc: add deprecations command to locally set deprecated apis on/off.
This command allows more fine-grained testing, without having to change the config of the lightning node. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON-RPC: `deprecations` to enable/disable deprecated APIs from this caller.
Configuration menu - View commit details
-
Copy full SHA for a564beb - Browse repository at this point
Copy the full SHA a564bebView commit details -
common: allow JSON-RPC parameters to specify deprecation versions.
This infrastructure is use by both libplugin and lightningd. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 249e61f - Browse repository at this point
Copy the full SHA 249e61fView commit details -
plugins: allow
deprecated
for registered commands to be an array of…… versions. We still accept boolean: the plugin may not want to commit to a deprecation schedule. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Plugins: rpcmethods and options can set `deprecated` to a pair of version strings, not just a boolean.
Configuration menu - View commit details
-
Copy full SHA for bb84579 - Browse repository at this point
Copy the full SHA bb84579View commit details -
plugins: allow plugin options
deprecated
to be an array of strings.Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Plugin: options and commands can specify deprecation start (and optional end) versions.
Configuration menu - View commit details
-
Copy full SHA for 713c9e8 - Browse repository at this point
Copy the full SHA 713c9e8View commit details -
libplugin: support version strings for deprecations.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for fdcae6f - Browse repository at this point
Copy the full SHA fdcae6fView commit details -
pyln.plugin: Allow deprecated to be a string.
Type-checking in Python is so loose you could already do this, but this updates the mypy type annotations. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 32b6bed - Browse repository at this point
Copy the full SHA 32b6bedView commit details -
lightningd: mark all internal deprecations by version.
I did some CHANGELOG and git digging to see when these were deprecated, and some were very old (v0.8.2!). But since they didn't warn users loudly, I chose to do so this release only. I renamed ld's `deprecated_apis` to `deprecated_ok` to make sure I caught them all. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 976fed7 - Browse repository at this point
Copy the full SHA 976fed7View commit details -
libplugin: get
i-promise-to-fix-broken-api-user
list from lightningd.This means it now covers plugin parameters too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for e55a03e - Browse repository at this point
Copy the full SHA e55a03eView commit details -
plugins: allow plugins to get per-connection deprecated state.
Unfortunately, this is awkward: we just copy through most requests, so we can't easily add a "deprecation" field to each one. So we do a notification if the next command has a different deprecation status than the global one, but that requires opt-in from the plugin. We didn't previously document the subscriptions array, so do that now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Plugins: `deprecated_oneshot` notifiction subscription to change deprecated status for a single command.
Configuration menu - View commit details
-
Copy full SHA for 0470ef7 - Browse repository at this point
Copy the full SHA 0470ef7View commit details -
libplugin: handle
deprecated_oneshot
notification.Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 28bd63c - Browse repository at this point
Copy the full SHA 28bd63cView commit details -
plugins/bcli: use per-command deprecation flags.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f354795 - Browse repository at this point
Copy the full SHA f354795View commit details -
commando: use deprecation API for missing ids.
In this case we don't have a matching "command", so we need a special API. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 1c63b21 - Browse repository at this point
Copy the full SHA 1c63b21View commit details -
libplugin: remove global deprecated_apis flag.
And we don't need to handle 0.9 lightningd which didn't include allow-deprecated-apis in getmanifest call. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 31c081d - Browse repository at this point
Copy the full SHA 31c081dView commit details