Skip to content

Fix CI Automerge button, and another flake#8277

Merged
rustyrussell merged 5 commits intoElementsProject:masterfrom
rustyrussell:guilt/fix-ci-automerge
May 11, 2025
Merged

Fix CI Automerge button, and another flake#8277
rustyrussell merged 5 commits intoElementsProject:masterfrom
rustyrussell:guilt/fix-ci-automerge

Conversation

@rustyrussell
Copy link
Contributor

Changelog-None

@rustyrussell rustyrussell added this to the v25.05 milestone May 8, 2025
@rustyrussell rustyrussell force-pushed the guilt/fix-ci-automerge branch 3 times, most recently from b618225 to bc41da3 Compare May 8, 2025 06:46
@rustyrussell rustyrussell requested a review from cdecker as a code owner May 9, 2025 00:04
@rustyrussell rustyrussell force-pushed the guilt/fix-ci-automerge branch 2 times, most recently from 8a39c7b to cd18cf1 Compare May 9, 2025 03:07
@rustyrussell rustyrussell enabled auto-merge (rebase) May 9, 2025 03:07
@rustyrussell rustyrussell force-pushed the guilt/fix-ci-automerge branch 3 times, most recently from 0d02db1 to 90364f8 Compare May 10, 2025 07:18
I've been bitten by this several times: skipping the test seems to make it OK
for GH!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We need to make sure the close tx is generated where we expect, so the following code
doesn't wait foreverL

```
2025-05-08T04:31:31.1071194Z >       assert l2.rpc.wait('htlcs', 'deleted', 3)['deleted'] == 5
2025-05-08T04:31:31.1071518Z 
2025-05-08T04:31:31.1071645Z tests/test_misc.py:3398: 
...
2025-05-08T04:31:31.1079841Z E       Failed: Timeout >1800.0s
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We cannot add new parameters in the middle, since we accept parameters by JSON
array as well as by dicts.  In fact, this broke tests, but due to unrelated
breakage in the GitHub "Automerge" functionality, it got applied as
556e38c ("askrene-bias-channel: bias call add
up.").

Also add tests, and a better Changelog line.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `askrene-bias-channel` now has a `relative` option to add, rather than replace, a channel bias.
We can fail the fundchannel because of a reconnect race: funder tells
us to reconnect so fast that we are still cleaning up from last time.

We deliberately defer clean up, to give the subds a chance to process any
final messages.  However, on reconnection we force them to exit immediately:
but this causes new `connect` commands to see the exit and fail.

The workaround is to do this cleanup when a `connect` command is
issued (as well as the current case, which covers an automatic
reconnection or an incoming reconnection)

```
2025-05-09T00:40:37.1769508Z     def test_reconnect_signed(node_factory):
2025-05-09T00:40:37.1770273Z         # This will fail *after* both sides consider channel opening.
2025-05-09T00:40:37.1770850Z         disconnects = ['<WIRE_FUNDING_SIGNED']
2025-05-09T00:40:37.1771298Z         if EXPERIMENTAL_DUAL_FUND:
2025-05-09T00:40:37.1771735Z             disconnects = ['<WIRE_COMMITMENT_SIGNED']
2025-05-09T00:40:37.1772155Z     
2025-05-09T00:40:37.1772598Z         l1 = node_factory.get_node(may_reconnect=True, disconnect=disconnects)
2025-05-09T00:40:37.1773210Z         l2 = node_factory.get_node(may_reconnect=True)
2025-05-09T00:40:37.1773632Z     
2025-05-09T00:40:37.1773917Z         l1.fundwallet(2000000)
2025-05-09T00:40:37.1774268Z     
2025-05-09T00:40:37.1774611Z         l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
2025-05-09T00:40:37.1775151Z >       l1.rpc.fundchannel(l2.info['id'], CHANNEL_SIZE)
2025-05-09T00:40:37.1775388Z 
2025-05-09T00:40:37.1775485Z tests/test_connection.py:667:
...
2025-05-09T00:40:37.1799527Z >           raise RpcError(method, payload, resp['error'])
2025-05-09T00:40:37.1800993Z E           pyln.client.lightning.RpcError: RPC call failed: method: fundchannel, payload: {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'amount': 50000, 'announce': True}, error: {'code': -1, 'message': 'Disconnected', 'data': {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'method': 'openchannel_update'}}
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Make sure all nodes see all channels:

```
2025-05-09T06:07:42.6214730Z >       route = l1.rpc.getroute(l3.info['id'], amt, 1)['route']
2025-05-09T06:07:42.6215091Z 
2025-05-09T06:07:42.6215239Z tests/test_closing.py:4199: 
...
2025-05-09T06:07:42.6241237Z E           pyln.client.lightning.RpcError: RPC call failed: method: getroute, payload: {'id': '035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d', 'amount_msat': 100000000, 'riskfactor': 1, 'cltv': 9}, error: {'code': -32602, 'message': '035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d: unknown destination node_id (no public channels?)'}
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the guilt/fix-ci-automerge branch from 90364f8 to 84abaf9 Compare May 10, 2025 10:41
@rustyrussell rustyrussell merged commit e76a7a9 into ElementsProject:master May 11, 2025
40 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.

1 participant