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

Removal of EOL deprecations for 23.05 #7094

Merged

Conversation

rustyrussell
Copy link
Contributor

This is our first set of removals under the new deprecation system: I've only removed things which were officially end-of-lifed in 2023. None of these are present in the current release unless someone manually enabled with i-promise-to-fix-broken-api-user, so hopefully they will have complained before this release if we decide to delay/reinstate APIs.

@rustyrussell rustyrussell added this to the v24.05 milestone Feb 20, 2024
@rustyrussell rustyrussell force-pushed the guilt/24.05-deprecations branch from 5945ec3 to 13af954 Compare March 19, 2024 04:43
@rustyrussell
Copy link
Contributor Author

Rebased on master with doc reorg!

Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

Concept-ACK 13af954

Thanks for this deprecation series, looks amazing, but something (assuming in listpeers) is dirty, the CI found the following one

=============================== warnings summary ===============================
../../../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cheroot/__init__.py:7
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cheroot/__init__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 1 passed, 3 warnings in 6.60s =========================
make[1]: Leaving directory '/home/runner/work/lightning/lightning/contrib/pyln-testing'
lightningd/peer_control.c:2321:9: error: Uninitialized variable: channel [uninitvar]
   if (!channel->scb)
        ^
lightningd/peer_control.c:3117:39: error: Uninitialized variable: channel [uninitvar]
    if (!channel_state_can_setchannel(channel->state))
                                      ^
lightningd/peer_control.c:1389:11: error: Uninitialized variable: channel [uninitvar]
          channel->error)));
          ^
make: *** [Makefile:548: check-cppcheck] Error 123
rm external/build-x86_64-linux-gnu/libwally-core-build/src/secp256k1/libsecp256k1.la

connectd/connectd.c Show resolved Hide resolved
@@ -397,8 +397,7 @@ static void try_command(struct commando *incoming STEALS)
}
filter = json_get_member(buf, toks, "filter");
id = json_get_member(buf, toks, "id");
if (!id && !command_deprecated_in_nocmd_ok(plugin, "commando.missing-id",
"v23.02", "v24.02")) {
if (!id) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

uh! I should update my proxy for next time :) thanks for reminding me

@rustyrussell
Copy link
Contributor Author

Concept-ACK 13af954

Thanks for this deprecation series, looks amazing, but something (assuming in listpeers) is dirty, the CI found the following one

=============================== warnings summary ===============================
../../../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cheroot/__init__.py:7
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cheroot/__init__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 1 passed, 3 warnings in 6.60s =========================
make[1]: Leaving directory '/home/runner/work/lightning/lightning/contrib/pyln-testing'
lightningd/peer_control.c:2321:9: error: Uninitialized variable: channel [uninitvar]
   if (!channel->scb)
        ^
lightningd/peer_control.c:3117:39: error: Uninitialized variable: channel [uninitvar]
    if (!channel_state_can_setchannel(channel->state))
                                      ^
lightningd/peer_control.c:1389:11: error: Uninitialized variable: channel [uninitvar]
          channel->error)));
          ^
make: *** [Makefile:548: check-cppcheck] Error 123
rm external/build-x86_64-linux-gnu/libwally-core-build/src/secp256k1/libsecp256k1.la

Yes, cppcheck is broken. It cannot handle our macros, so we try to suppress some and it's not reliable. It's been quite a while since it has actually found any bugs, so I will remove it.

@rustyrussell rustyrussell force-pushed the guilt/24.05-deprecations branch from 13af954 to 2feba62 Compare March 19, 2024 22:39
@rustyrussell
Copy link
Contributor Author

lightningd/peer_control.c:2321:9: error: Uninitialized variable: channel [uninitvar]
if (!channel->scb)
^
lightningd/peer_control.c:3117:39: error: Uninitialized variable: channel [uninitvar]
if (!channel_state_can_setchannel(channel->state))
^
lightningd/peer_control.c:1389:11: error: Uninitialized variable: channel [uninitvar]
channel->error)));
^
make: *** [Makefile:548: check-cppcheck] Error 123
rm external/build-x86_64-linux-gnu/libwally-core-build/src/secp256k1/libsecp256k1.la

Yes, cppcheck is broken. It cannot handle our macros, so we try to suppress some and it's not reliable. It's been quite a while since it has actually found any bugs, so I will remove it.

OK, I'll try adding suppressions first...

@rustyrussell rustyrussell force-pushed the guilt/24.05-deprecations branch 8 times, most recently from d451217 to 5a3e77f Compare March 24, 2024 22:48
…igs when --i-promise-to-fix-broken-api-user is used.

We were duplicating the command name (e.g. "autocleaninvoice.autocleaninvoice"), and also not
handling listconfigs if they specified the (currently unused!) i-promise-to-fix-broken-api-user
option, which we are going to use next patch.

Signed-off-by: Rusty Russell <[email protected]>
Indeed, we now need to adjust our tests to use --i-promise-to-fix-broken-api-user
for the specific APIs past end-of-life.

Signed-off-by: Rusty Russell <[email protected]>
…ook.

These were deprecated in v22.08 (invoice hook) and v0.8 (htlc_accepted hook), and
marked EOL in v23.02.

*PLEASE* complain if this breaks things for you: it's kind of a test canary of
the deprecation system!

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Plugins: `invoice_payment` and `htlc_accepted` hook `failure_code` response (derepcated v22.08 and v0.8, EOL v23.02)
Changelog-Removed: JSON-RPC feerates by internal names ("opening", "mutual_close", "delayed_to_us", "htlc_resolution", "penalty", "min_acceptable", "max_acceptable") (deprecated v23.05, EOL v24.02).
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: JSON-RPC: `delexpiredinvoice` (deprecated v22.11, EOL v24.02)
Signed-off-by: Rusty Russell <[email protected]>
We also remove manpages, since they're no longer in git anyway.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Config: `autocleaninvoice-cycle` and `autocleaninvoice-expired-by` (deprecated v22.11, EOL v24.02)
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: JSON-RPC: `feerates` output fields `delayed_to_us` and `htlc_resolution`.
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Plugins: `funding_locked` from channel_opened notification (deprecated v22.11, EOL v24.02)
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Config `experimental-websocket-port` (deprecated 23.08, EOL 24.02)
Changelog-Removed: JSON-RPC: `sendpay` ignoring first channel (deprecated v0.12, EOL v24.02)
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: JSON-RPC: `listpeers` `channels` (deprecated v23.02, EOL v24.02)
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: JSON-RPC: `createrune` restrictions as raw strings (use arrays) (deprecated v23.05, EOL 24.02).
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Plugins: no longer allow missing `id` field in commando requests (deprecated v23.02, EOL v24.02)
Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the guilt/24.05-deprecations branch from 5a3e77f to fae2f9f Compare March 25, 2024 00:38
@rustyrussell rustyrussell merged commit 22b713d into ElementsProject:master Mar 25, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants