Commit Graph

9442 Commits

Author SHA1 Message Date
Christian Decker
2834aaced0 gci: Stabilize test_forward_event_notification 2021-01-29 10:29:09 +10:30
Christian Decker
04df500f8e gci: Add the JSON report plugin to the ci configuration 2021-01-29 10:29:09 +10:30
Christian Decker
ea67710e01 pyln: Pretty print RPC calls in the testing framework
We are printing `repr(obj)` which is not pretty-printed, hard to read,
and can't even be copied and inspected to JSON tools. We now print the
JSONified and indented calls and responses for easier debugging based
on solely the logs (useful for CI!).

Changelog-Added: pyln-testing: The RPC client will now pretty-print requests and responses to facilitate log-based debugging.
2021-01-29 10:29:09 +10:30
Christian Decker
3ff82216c5 gci: Give each configuration an CFG value to identify them later
We don't have a good way of referring to the configuration that
failed, so let's give them a numberic ID. Particularly useful for the
artifacts that'd be overwritten otherwise.
2021-01-29 10:29:09 +10:30
Christian Decker
80ef684d25 gci: Pin mypy to version 0.790 since 0.800 gives strange errors 2021-01-29 10:29:09 +10:30
Christian Decker
bb15d7f042 gci: Upload the junit.xml report
Can be used in a second stage to generate stats and detect flaky
tests.
2021-01-29 10:29:09 +10:30
Christian Decker
14b64ecc7e gci: Switch to the flaky plugin
rerunfailures keeps not working.
2021-01-29 10:29:09 +10:30
Christian Decker
62cb1c3fbc pytest: Stabilize test_forward_stats 2021-01-29 10:29:09 +10:30
Christian Decker
da2e956538 pytest: Stabilize test_routing_gossip
openchannel internally generates blocks, which may cause nodes to be
out of sync and ignore "future" channel announcements, resulting in
bad gossip.
2021-01-29 10:29:09 +10:30
Christian Decker
5ecaff65ee pytest: Give each run of the hsmtool its own pty 2021-01-29 10:29:09 +10:30
Christian Decker
1463797c61 pytest: Stabilize test_funding_close_upfront
Reconnections and unsynchronized states where causing us some issues.
2021-01-29 10:29:09 +10:30
Christian Decker
bbdf35c6fe pytest: Stabilize test_closing_negotiation_reconnect
The test was not considering that concurrent sendrawtx of the same tx
is not stable, and either endpoint will submit it first. Now just
checking state transitions and the mempool.
2021-01-29 10:29:09 +10:30
Christian Decker
52e82b76b6 pytest: Stabilize test_bad_onion 2021-01-29 10:29:09 +10:30
Christian Decker
3d4c111721 pytest: Stabilize test_multiple_channels
If we're quick (or the node is slow) we end up reconnecting before our
counterparty has realized the state transition, resulting in an
unexpected re-establish.
2021-01-29 10:29:09 +10:30
Christian Decker
8c94d1a358 make: Remove hardcoded timeout to pytest
This should really be set by the environment by creating either a
pytest.ini or setting PYTEST_OPTS envvar.
2021-01-29 10:29:09 +10:30
Christian Decker
1ea0dd6af2 gci: Add pytest.ini in order to randomize the groups
We have a couple of very heavy tests bunched together, randomization
could potentially lessen the peak load.
2021-01-29 10:29:09 +10:30
Christian Decker
6119f1f5fb gci: Format the build script
We were using a lot of docker conventions, which are not necessary in
the script itself.
2021-01-29 10:29:09 +10:30
Christian Decker
cd9aa267b4 pyln: Adjust maximum load allowed by the throttler 2021-01-29 10:29:09 +10:30
Christian Decker
542f3225e3 pytest: Parameterize process waits for hsmtool calls
We were sometimes waiting only 5 seconds, which is way too short on a
heavily loaded machine such as CI. Making it 30 seconds and collecting
it in a single place so we can adjust more easily.
2021-01-29 10:29:09 +10:30
Christian Decker
4c3ee04bb7 pyln: Use a fair FS lock to throttle node startups
We were getting a couple of starvations, so we need a fair filelock. I
also wasn't too happy with the lock as is, so I hand-coded it quickly.

Should be correct, but the overall timeout will tell us how well we
are doing on CI.
2021-01-29 10:29:09 +10:30
Christian Decker
8cc62d76e4 pytest: Stabilize test_channel_{spendable,receivable}
They were using TIMEOUT / 2 which may be way too long (hit against
test timeout), so we use a still ludicrous 30 seconds instead.
2021-01-29 10:29:09 +10:30
Christian Decker
6384cadd69 pytest: Stabilize the negotiation tests
We also make the logic a bit nicer to read. The failure was due to
more than one status message being present if we look at the wrong
time:

```
arr = ['CLOSINGD_SIGEXCHANGE:We agreed on a closing fee of 20334 satoshi for tx:17f1e9d377840edf79d8b6f1ed0faba59bb307463461...9b98', 'CLOSINGD_SIGEXCHANGE:Waiting for another closing fee offer: ours was 20334 satoshi, theirs was 20332 satoshi,']                                                                                                   │

     def only_one(arr):
         """Many JSON RPC calls return an array; often we only expect a single entry
         """
 >       assert len(arr) == 1
 E       AssertionError
```
2021-01-29 10:29:09 +10:30
Christian Decker
04ed93f5f8 pytest: Stabilize test_funding_external_wallet_corners 2021-01-29 10:29:09 +10:30
Christian Decker
18483ca582 pytest: Disable test_v2_open if not developer
It requires `--dev-force-features` which isn't available without
`DEVELOPER=1`
2021-01-29 10:29:09 +10:30
Christian Decker
7962db821c pytest: Stabilize test_channel_state_changed_bilateral 2021-01-29 10:29:09 +10:30
Christian Decker
07f5054700 pytest: Stabilize test_setchannelfee_state
Synching with the blockchain was slower than our timeout...
2021-01-29 10:29:09 +10:30
Christian Decker
03449e3cf0 pytest: Stabilize test_gossip_persistence
We weren't waiting for the `dev_fail` transaction to hit the mempool,
throwing the results off.
2021-01-29 10:29:09 +10:30
Christian Decker
ae40c10bcb pytest: Stabilize test_onchain_timeout
The timeout on the pay future was too short under valgrind.
2021-01-29 10:29:09 +10:30
Christian Decker
fc677e331a pyln: Update dependencies for all pyln packages
We were getting a number of incompatibility warning due to the
dependencies being expressed too rigidly. This losens the requirement
definitions to being compatible with a known good version, and while
we're at it we also bump all outdated requirements.
2021-01-29 10:29:09 +10:30
Christian Decker
c564f165fa pytest: Stabilize test_penalty_htlc_tx_timeout
We weren't waiting for the transactions to enter the mempool which
could cause all of our fine-tuned block counts to be off. Now just
waiting for the expected number of txs.
2021-01-29 10:29:09 +10:30
Christian Decker
c0f06f2779 pytest: Simplify and stabilize test_reconnect_no_update 2021-01-29 10:29:09 +10:30
Christian Decker
2b12cac31e pytest: Skip hsm encryption test if we don't have a TTY 2021-01-29 10:29:09 +10:30
Christian Decker
be77cd7669 gci: Expand matrix to include all CI configurations 2021-01-29 10:29:09 +10:30
Christian Decker
b447944285 gci: Add a tester Dockerfile 2021-01-29 10:29:09 +10:30
Christian Decker
6934f71bf8 gci: Add basic configuration for Github Actions as CI 2021-01-29 10:29:09 +10:30
Christian Decker
6bed85bac2 pyln: Bump pyln version to 0.9.3 before publishing on PyPI
Let's just keep pyln synched up with the c-lightning version
2021-01-27 11:29:56 +01:00
Christian Decker
483579f8b6 pyln: Pin the mypy dependency to 0.790 since 0.800 has a regression 2021-01-26 15:45:13 +01:00
Christian Decker
46af65d2e3 git: Ignore some more generated files and artifacts 2021-01-26 15:45:13 +01:00
Christian Decker
527cae0d4c doc: Make the release process a bit more readable 2021-01-26 15:45:13 +01:00
Christian Decker
f76a6b99e0 make: Explicitly set PYTHON_VERSION=3 for libwally
Otherwise it can end up complaining that it can't find python2, which
we don't have listed as a dependency and is deprecated anyway.

Also reformatted a bit to make the options more readable and minimize
future conflicts.
2021-01-26 15:45:13 +01:00
Christian Decker
f1962c1f4b tools: Pretty print the credits 2021-01-26 15:45:13 +01:00
Christian Decker
46cd5d8923 tools: Allow versions to either have a v prefix or not
Sometimes it's v0.9.3 and sometimes it's 0.9.3, and I always get it
wrong. This is painful when you have to create a signed tag after
committing to one of the two only to find out you chose wrong and have
to redo the tagging.
2021-01-26 15:45:13 +01:00
Christian Decker
25a7bf6aa3 doc: Update release process document 2021-01-26 15:45:13 +01:00
Christian Decker
25aa05d26e devtools: Make the raw changelog more readable
The links were rather annoying in the flowing text, so extract them
and add them to the footer of the release instead. This uses the
shorthand and footnote style of links.
2021-01-26 15:45:13 +01:00
nicolas.dorier
3105a7a204 Fix dockerfiles 2021-01-26 15:03:35 +01:00
niftynei
d1a59b6f0d nit df: correct spelling mistake 2021-01-25 10:05:17 +10:30
niftynei
8591f11188 wallet nit: consolidate stmt free into one line 2021-01-25 10:05:17 +10:30
niftynei
6778ea5d05 wallet: cleanup fee_states alloc on error 2021-01-25 10:05:17 +10:30
Christian Decker
015ac37d92 release: Update the changelog for v0.9.3 2021-01-20 12:00:52 +01:00
Antoine Poinsot
48595674fa hsmtool: don't streq() on NULL
This would cause a segfault on the default network parameter for
`dumponchaindescriptors`.

Introduced in 1513a2d07e

Changelog-Fixed: hsmtool: fix a segfault on `dumponchaindescriptors` without network parameter
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-20 10:22:31 +01:00