Skip to content

Commit c818ce0

Browse files
authored
Merge branch 'master' into guilt/fix-flakes12
2 parents f205def + 0c6aa38 commit c818ce0

File tree

5 files changed

+123
-32
lines changed

5 files changed

+123
-32
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
> [!IMPORTANT]
2-
> 24.11 FREEZE NOVEMBER 7TH: Non-bugfix PRs not ready by this date will wait for 25.02.
2+
> 25.02 FREEZE JANUARY 31ST: Non-bugfix PRs not ready by this date will wait for 25.05.
33
44
## Checklist
55
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

.github/workflows/repro.yml

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,48 @@ jobs:
1919
- name: Git checkout
2020
uses: actions/checkout@v4
2121

22-
- name: Build environment setup
22+
- name: Build environment setup - ${{ matrix.version }}
2323
run: |
2424
echo "Building base image for ${{ matrix.version }}"
25+
echo "STEP=Build environment setup" >> "$GITHUB_ENV"
2526
sudo docker run --rm -v $(pwd):/build ubuntu:${{ matrix.version }} bash -c "\
26-
apt-get update && \
27-
apt-get install -y debootstrap && \
28-
debootstrap ${{ matrix.version }} /build/${{ matrix.version }}"
27+
apt-get update && \
28+
apt-get install -y debootstrap && \
29+
debootstrap ${{ matrix.version }} /build/${{ matrix.version }}"
2930
sudo tar -C ${{ matrix.version }} -c . | docker import - ${{ matrix.version }}
3031
31-
- name: Builder image setup
32-
run: docker build -t cl-repro-${{ matrix.version }} - < contrib/reprobuild/Dockerfile.${{ matrix.version }}
32+
- name: Builder image setup - ${{ matrix.version }}
33+
run: |
34+
echo "STEP=Builder image setup" >> "$GITHUB_ENV"
35+
docker build -t cl-repro-${{ matrix.version }} - < contrib/reprobuild/Dockerfile.${{ matrix.version }}
3336
34-
- name: Build using the builder image and store Git state
37+
- name: Build reproducible image and store Git state - ${{ matrix.version }}
3538
run: |
39+
echo "STEP=Build reproducible image and store Git state" >> "$GITHUB_ENV"
40+
3641
# Create release directory.
3742
mkdir $GITHUB_WORKSPACE/release
3843
3944
# Perform the repro build.
4045
docker run --name cl-build -v $GITHUB_WORKSPACE:/repo -e FORCE_MTIME=$(date +%F) -t cl-repro-${{ matrix.version }}
4146
4247
# Commit the image in order to inspect the build later.
43-
docker commit cl-build cl-release
48+
docker commit cl-build cl-repro
4449
4550
# Inspect the version.
46-
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-release bash -c "make version > /repo/release/version.txt"
51+
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-repro bash -c "make version > /repo/release/version.txt"
4752
4853
# Inspect the Git tree state.
49-
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-release bash -c "\
54+
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-repro bash -c "\
5055
git --no-pager status > /repo/release/git.log && \
5156
git --no-pager diff >> /repo/release/git.log"
5257
5358
# Change permissions on the release files for access by the runner environment.
5459
sudo chown -R runner $GITHUB_WORKSPACE/release
5560
56-
- name: Assert clean version and release
61+
- name: Assert clean version - ${{ matrix.version }}
5762
run: |
63+
echo "STEP=Assert clean version" >> "$GITHUB_ENV"
5864
echo 'Version:'
5965
cat release/version.txt
6066
echo -e
@@ -63,16 +69,45 @@ jobs:
6369
echo 'Release file:'
6470
ls -al release/clightning-*
6571
echo -e
66-
6772
if [ -n "$(cat release/version.txt | sed -n '/-modded/p')" ] || \
68-
[ -n "$(echo $releasefile | sed -n '/-modded/p')" ]
69-
then
73+
[ -n "$(echo $releasefile | sed -n '/-modded/p')" ]; then
7074
echo "Git Status and Diff:"
7175
cat release/git.log
7276
echo -e
73-
7477
echo 'Error: release modded / dirty tree.'
7578
exit 1
7679
else
7780
echo 'Success! Clean release.'
7881
fi
82+
83+
- name: Upload release artifact - ${{ matrix.version }}
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: release-${{ matrix.version }}
87+
path: release
88+
retention-days: 3 # Automatically delete after 3 days
89+
90+
- name: Send email on failure
91+
if: ${{ failure() }}
92+
uses: dawidd6/action-send-mail@v3
93+
with:
94+
server_address: smtp.gmail.com
95+
server_port: 587
96+
username: ${{ secrets.EMAIL_USERNAME }}
97+
password: ${{ secrets.EMAIL_PASSWORD }}
98+
from: ${{ secrets.EMAIL_USERNAME }}
99+
to: ${{ vars.DISTRIBUTION_LIST }}
100+
subject: "CI Failure: Step ${{ env.STEP }} failed for distro ${{ matrix.version }}"
101+
convert_markdown: true
102+
html_body: |
103+
<html>
104+
<body>
105+
<p>GitHub Workflow ${{ github.workflow }} Failed! For more details, click on the action below.</p>
106+
<strong>Failure Details:</strong><br/>
107+
<strong>Event: </strong>${{ github.event_name }}<br/>
108+
<strong>Job: </strong>${{ github.job }}<br/>
109+
<strong>Distro: </strong>${{ matrix.version }}<br/>
110+
<strong>Step: </strong>${{ env.STEP }}<br/>
111+
<strong>Action: </strong><a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}</a><br/>
112+
</body>
113+
</html>

contrib/keys/cln.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
-----BEGIN PGP PUBLIC KEY BLOCK-----
2+
3+
mQINBGdhz1QBEADLRZWvhey6GDkcn/VyKTB+v7d8hn/ElwQXlCA7sU0xodwHtUDE
4+
W3jsjWhLPiIgd/QIPfFQF6NKIXNTgNgTs0je5n0rgK1VaFf19aIRa6nY5qIDGWKS
5+
DONkdi8UoGcBygq2aBIz+uDcsBD9z9iyQ239Pnj0eAcKf9M0fvCXT5LPkI8Nzx35
6+
gX9cpkA97tjfMSNeRcXkqXNoYWNx3UGCM5vMf6MUAz8OHpvIxXYVBp8yV+SZrF0n
7+
zLcqYDMvl9U1R6NqSnCScEkIwDzFB3PjQXRAIhlOmfuyl5Q7RWEv9rg2YeKiOUgX
8+
m1I+HdvEHEpqwqr4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P/09drXoIA2i8vblntJwr
40+
SNYjdw16tU1uE1WvYXX1fbTH8+6+p+h8lc4hAtM3FyEINQ37uQ3gz49PusNG3lNT
41+
L/jcpEskmQCWTsgJlv5b03O7y+vRb5aEuc9Vn4iCA4N7487ICvJsPDp7cGBxthX0
42+
YkDDZ9+bOs3dym1MVZQo4tJiQuPvux2M3dk6WUHOUnKu0G/fHCB/a4q5DW/G6q22
43+
mndUTrsUrEe0xdmfDiNbuh2xHNNzQCaNlh0yzWLm6uREaOnzv3Ys/F/+2IhCehmg
44+
0jUl1BIZBJYR0ZXRK2pBY4d+pkUoOV/6oqgadwgP1VT3pBrC/Uo1bZXrxfFwgzgj
45+
rQJt2C9vJoz+VZLAQeZcgamlzlgE+L7QbfbJ9xjPlY9YE2Tifj5QfVxy70pfHnOY
46+
+4QEa8QSXIew6dEzpAWX8OGZ/F42EgkS3Ogypct19ob0g4n4NuVQ264NsuxvTqaV
47+
cT2vX4OkHie82v5N/b7py4/GuxRCc5+Mz015LWYkxUbpD+wAAU0H/ZPIrL24wUW+
48+
aFr+3oTb8YOCz58NUzClFDvZPCu9jDUzYBcJH0HSEe5BTh2eaM9HaUJ5Q6Xs4/Iv
49+
GiPFL/CaqgMQHDis5WjGZwhmIwbxyuL9EWxbK8kZob1iVTL5fD4YZgsqjWrDSbed
50+
Uv36UtFhm/IcjGXnG72mhq1W
51+
=jLDp
52+
-----END PGP PUBLIC KEY BLOCK-----

doc/contribute-to-core-lightning/coding-style-guidelines/writing-json-schemas.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ preventing accidental overwrites from unrelated tests.
9494
where `n` can be any number of repetitions. OR by manually running the test multiple times with:
9595

9696
```bash
97-
rm -rf /tmp/ltests* && make -s && VALGRIND=0 TIMEOUT=40 TEST_DEBUG=1 GENERATE_EXAMPLES=1 pytest -vvv tests/autogenerate-rpc-examples.py
97+
rm -rf /tmp/ltests* && make -s && VALGRIND=0 TIMEOUT=40 TEST_DEBUG=1 GENERATE_EXAMPLES=1 pytest -vvv -s tests/autogenerate-rpc-examples.py
9898
```
9999

100100
- Identify changing values, and add them to `REPLACE_RESPONSE_VALUES`:
@@ -117,7 +117,7 @@ environment variable with a comma-separated list of method names. Eg. `REGENERAT
117117
only regenerate examples for the `getinfo` and `connect` RPCs.
118118
2. To regenerate specific examples, set the REGENERATE environment variable:
119119
```bash
120-
REGENERATE='getinfo,connect' VALGRIND=0 TIMEOUT=10 TEST_DEBUG=1 GENERATE_EXAMPLES=1 pytest -vvv tests/autogenerate-rpc-examples.py
120+
REGENERATE='getinfo,connect' VALGRIND=0 TIMEOUT=10 TEST_DEBUG=1 GENERATE_EXAMPLES=1 pytest -vvv -s tests/autogenerate-rpc-examples.py
121121
```
122122
3. Logs are saved in `tests/autogenerate-examples-status.log`, and JSON data is in `tests/autogenerate-examples.json`.
123123
4. Run `make` after the script completes to ensure schema updates are applied in other places too, such as `...msggen/schema.json`.
@@ -127,4 +127,4 @@ REGENERATE='getinfo,connect' VALGRIND=0 TIMEOUT=10 TEST_DEBUG=1 GENERATE_EXAMPLE
127127

128128
1. Sip whenever you have an additional comma at the end of a sequence.
129129
2. Sip whenever you omit a comma in a sequence because you cut & paste.
130-
3. Skull whenever you wish JSON had comments.
130+
3. Skull whenever you wish JSON had comments.

tests/autogenerate-rpc-examples.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,6 @@
297297

298298
if os.path.exists(LOG_FILE):
299299
open(LOG_FILE, 'w').close()
300-
301-
logging.basicConfig(level=logging.INFO,
302-
format='%(asctime)s - %(levelname)s - %(message)s',
303-
datefmt='%H:%M:%S',
304-
handlers=[
305-
logging.FileHandler(LOG_FILE),
306-
logging.StreamHandler()
307-
])
308-
309300
logger = logging.getLogger(__name__)
310301

311302

@@ -2035,6 +2026,19 @@ def generate_list_examples(l1, l2, l3, c12, c23_2, inv_l31, inv_l32, offer_l23,
20352026
raise
20362027

20372028

2029+
@pytest.fixture(autouse=True)
2030+
def setup_logging():
2031+
global logger
2032+
logger.setLevel(logging.DEBUG)
2033+
formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s", "%H:%M:%S")
2034+
stream_handler = logging.StreamHandler()
2035+
stream_handler.setFormatter(formatter)
2036+
logger.addHandler(stream_handler)
2037+
file_handler = logging.FileHandler(LOG_FILE)
2038+
file_handler.setFormatter(formatter)
2039+
logger.addHandler(file_handler)
2040+
2041+
20382042
@unittest.skipIf(not GENERATE_EXAMPLES, 'Generates examples for doc/schema/lightning-*.json files.')
20392043
def test_generate_examples(node_factory, bitcoind, executor):
20402044
"""Re-generates examples for doc/schema/lightning-*.json files"""
@@ -2055,9 +2059,9 @@ def list_all_examples():
20552059
for node in ast.walk(tree):
20562060
if isinstance(node, ast.Call) and isinstance(node.func, ast.Name) and node.func.id == 'update_example':
20572061
for keyword in node.keywords:
2058-
if (keyword.arg == 'method' and isinstance(keyword.value, ast.Str)):
2059-
if keyword.value.s not in methods:
2060-
methods.append(keyword.value.s)
2062+
if (keyword.arg == 'method' and isinstance(keyword.value, ast.Constant)):
2063+
if keyword.value.value not in methods:
2064+
methods.append(keyword.value.value)
20612065
return methods
20622066
except Exception as e:
20632067
logger.error(f'Error in listing all examples: {e}')
@@ -2105,5 +2109,5 @@ def list_missing_examples():
21052109
update_examples_in_schema_files()
21062110
logger.info('All Done!!!')
21072111
except Exception as e:
2108-
logger.error(e)
2112+
logger.error(e, exc_info=True)
21092113
sys.exit(1)

0 commit comments

Comments
 (0)