From 4cca5666877a569792ca1535b30c1c70ef178a41 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Mon, 6 Jan 2025 13:51:21 -0800 Subject: [PATCH 1/4] ci: Lock Ubuntu version on 22.04 These workflows are failing due to `ubuntu-latest` being updated from version `22.04` to `24.04`. Reference: https://github.com/actions/runner-images/issues/10636 Changelog-None. --- .github/workflows/bsd.yml | 2 +- .github/workflows/crate-io.yml | 2 +- .github/workflows/docker-release.yml | 2 +- .github/workflows/rdme-docs-sync.yml | 2 +- .github/workflows/readme-rpc-sync.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml index 206acd11f384..ed8411896f79 100644 --- a/.github/workflows/bsd.yml +++ b/.github/workflows/bsd.yml @@ -8,7 +8,7 @@ on: jobs: testfreebsd: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 name: Build and test on FreeBSD timeout-minutes: 120 strategy: diff --git a/.github/workflows/crate-io.yml b/.github/workflows/crate-io.yml index b7552698de72..47e90cb482ce 100644 --- a/.github/workflows/crate-io.yml +++ b/.github/workflows/crate-io.yml @@ -8,7 +8,7 @@ on: jobs: release_rust: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 227a4a2c0636..9d696256ac4c 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -29,7 +29,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout repository diff --git a/.github/workflows/rdme-docs-sync.yml b/.github/workflows/rdme-docs-sync.yml index 69fff4d8ea8b..bf796122900e 100644 --- a/.github/workflows/rdme-docs-sync.yml +++ b/.github/workflows/rdme-docs-sync.yml @@ -10,7 +10,7 @@ on: jobs: rdme-docs-sync: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Check out repo 📚 uses: actions/checkout@v4 diff --git a/.github/workflows/readme-rpc-sync.yml b/.github/workflows/readme-rpc-sync.yml index a955566f5b81..f98055f9b7e8 100644 --- a/.github/workflows/readme-rpc-sync.yml +++ b/.github/workflows/readme-rpc-sync.yml @@ -15,7 +15,7 @@ on: jobs: rdme-rpc-sync: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v4 From c1271fc1cb8e92c9535a7c5c06c29dbf505c2be9 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Tue, 7 Jan 2025 15:05:25 -0800 Subject: [PATCH 2/4] ci: Lock MacOS and poetry versions --- .github/workflows/macos.yaml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 95561ec57393..37543b064a6e 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -5,7 +5,7 @@ on: jobs: smoke-test: name: Smoke Test macOS - runs-on: macos-latest + runs-on: macos-14 timeout-minutes: 120 strategy: fail-fast: true @@ -27,17 +27,13 @@ jobs: - name: Install dependencies run: | - export PATH="/usr/local/opt:/Users/runner/.local/bin:/Users/runner/Library/Python/3.10/bin:$PATH" + export PATH="/usr/local/opt:/Users/runner/.local/bin:/opt/homebrew/bin/python3.10/bin:$PATH" - brew install wget autoconf automake libtool python@3.10 gnu-sed gettext libsodium protobuf - - python3.10 -m pip install -U --user poetry wheel pip + brew install gnu-sed python@3.10 autoconf automake libtool protobuf + python3.10 -m pip install -U --user poetry==1.8.0 wheel pip mako python3.10 -m poetry install - python3.10 -m pip install -U --user mako - - sudo ln -s /usr/local/Cellar/gettext/0.20.1/bin/xgettext /usr/local/opt - - name: Build and install + - name: Build and install CLN run: | export CPATH=/opt/homebrew/include export LIBRARY_PATH=/opt/homebrew/lib @@ -45,8 +41,6 @@ jobs: python3.10 -m poetry run ./configure --disable-valgrind --disable-compat python3.10 -m poetry run make - # sudo PATH="/usr/local/opt:$PATH" LIBRARY_PATH=/opt/homebrew/lib CPATH=/opt/homebrew/include make install - - name: Start bitcoind in regtest mode run: | bitcoind -regtest -daemon @@ -58,11 +52,11 @@ jobs: bitcoin-cli -regtest generatetoaddress 1 $(bitcoin-cli -regtest getnewaddress) sleep 2 - - name: Start lightningd in regtest mode + - name: Start CLN in regtest mode run: | lightningd/lightningd --network=regtest --log-file=/tmp/l1.log --daemon sleep 5 - - name: Verify lightningd is running + - name: Verify CLN is running run: | cli/lightning-cli --regtest getinfo From 59ebff54dc1d533a07f2851b2b6c3adcfe9d8963 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Tue, 7 Jan 2025 15:10:15 -0800 Subject: [PATCH 3/4] ci: Install poetry-plugin-export for poetry export command Poetry will no longer include the `poetry-plugin-export` plugin by default, which is essential for exporting dependencies. So, we now need to install it explicitly. --- .github/workflows/ci.yaml | 4 ++++ Dockerfile | 2 ++ contrib/docker/Dockerfile.builder.fedora | 1 + contrib/reprobuild/Dockerfile.focal | 3 ++- contrib/reprobuild/Dockerfile.jammy | 3 ++- contrib/reprobuild/Dockerfile.noble | 3 ++- 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f5a48bedf8d1..a8f0df1ccf78 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -77,6 +77,7 @@ jobs: run: | bash -x .github/scripts/setup.sh pip install -U pip wheel poetry + poetry self add poetry-plugin-export # Export and then use pip to install into the current env poetry export -o /tmp/requirements.txt --without-hashes --with dev pip install -r /tmp/requirements.txt @@ -145,6 +146,7 @@ jobs: run: | set -e pip3 install --user pip wheel poetry + poetry self add poetry-plugin-export poetry export -o requirements.txt --with dev --without-hashes python3 -m pip install -r requirements.txt ./configure --enable-debugbuild CC="$COMPILER" ${{ matrix.COPTFLAGS_VAR }} @@ -193,6 +195,7 @@ jobs: sudo apt-get update -qq sudo apt-get install -y -qq lowdown pip install -U pip wheel poetry + poetry self add poetry-plugin-export # Export and then use pip to install into the current env poetry export -o /tmp/requirements.txt --without-hashes --with dev pip install -r /tmp/requirements.txt @@ -227,6 +230,7 @@ jobs: run: | bash -x .github/scripts/setup.sh pip install -U pip wheel poetry + poetry self add poetry-plugin-export # Export and then use pip to install into the current env poetry export -o /tmp/requirements.txt --without-hashes --with dev pip install -r /tmp/requirements.txt diff --git a/Dockerfile b/Dockerfile index 8c3acd8bcbf4..735069842a75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,6 +92,7 @@ ENV PYTHON_VERSION=3 RUN curl -sSL https://install.python-poetry.org | python3 - RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 RUN pip3 install --upgrade pip setuptools wheel +RUN poetry self add poetry-plugin-export RUN wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz -O zlib.tar.gz && \ wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip -O sqlite.zip @@ -198,6 +199,7 @@ RUN ( ! [ "${target_host}" = "arm-linux-gnueabihf" ] ) || \ # Ensure that the desired grpcio-tools & protobuf versions are installed # https://github.com/ElementsProject/lightning/pull/7376#issuecomment-2161102381 RUN poetry lock --no-update && poetry install +RUN poetry self add poetry-plugin-export # Ensure that git differences are removed before making bineries, to avoid `-modded` suffix # poetry.lock changed due to pyln-client, pyln-proto and pyln-testing version updates diff --git a/contrib/docker/Dockerfile.builder.fedora b/contrib/docker/Dockerfile.builder.fedora index e6b2637f8494..b49775f0a14c 100644 --- a/contrib/docker/Dockerfile.builder.fedora +++ b/contrib/docker/Dockerfile.builder.fedora @@ -37,3 +37,4 @@ ENV PATH=/opt/venv/bin:${PATH} RUN python3 -m pip install pip wheel && \ python3 -m virtualenv /opt/venv && \ /opt/venv/bin/python3 -m pip install --force-reinstall -U pip poetry wheel +RUN poetry self add poetry-plugin-export diff --git a/contrib/reprobuild/Dockerfile.focal b/contrib/reprobuild/Dockerfile.focal index 5e951a88a726..8a860f0c254c 100644 --- a/contrib/reprobuild/Dockerfile.focal +++ b/contrib/reprobuild/Dockerfile.focal @@ -49,7 +49,8 @@ RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv && \ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \ && rm /tmp/get-pip.py \ - && pip install poetry mako grpcio-tools==1.62.2 + && pip install poetry mako grpcio-tools==1.62.2 && \ + poetry self add poetry-plugin-export RUN wget https://sh.rustup.rs -O rustup-install.sh && \ bash rustup-install.sh --default-toolchain none --quiet -y && \ diff --git a/contrib/reprobuild/Dockerfile.jammy b/contrib/reprobuild/Dockerfile.jammy index 4f38b480b655..5cd808ce855f 100644 --- a/contrib/reprobuild/Dockerfile.jammy +++ b/contrib/reprobuild/Dockerfile.jammy @@ -47,7 +47,8 @@ RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv && \ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \ && rm /tmp/get-pip.py \ - && pip install poetry mako grpcio-tools + && pip install poetry mako grpcio-tools && \ + poetry self add poetry-plugin-export RUN wget https://sh.rustup.rs -O rustup-install.sh && \ bash rustup-install.sh --default-toolchain none --quiet -y && \ diff --git a/contrib/reprobuild/Dockerfile.noble b/contrib/reprobuild/Dockerfile.noble index 2636aef4890a..686b7f3f0a9f 100644 --- a/contrib/reprobuild/Dockerfile.noble +++ b/contrib/reprobuild/Dockerfile.noble @@ -45,7 +45,8 @@ RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv && \ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \ && rm /tmp/get-pip.py \ - && pip install poetry mako grpcio-tools + && pip install poetry mako grpcio-tools && \ + poetry self add poetry-plugin-export RUN wget https://sh.rustup.rs -O rustup-install.sh && \ bash rustup-install.sh --default-toolchain none --quiet -y && \ From 23fee9074178e31b410d527afe7cd1f826ae6114 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Tue, 7 Jan 2025 15:11:19 -0800 Subject: [PATCH 4/4] tests: Reckless test fix for project must contain name Fix for `The Poetry configuration is invalid: - project must contain ['name'] properties` --- .../data/recklessrepo/lightningd/testplugpyproj/pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/data/recklessrepo/lightningd/testplugpyproj/pyproject.toml b/tests/data/recklessrepo/lightningd/testplugpyproj/pyproject.toml index 738c943c0878..467c791beaf7 100644 --- a/tests/data/recklessrepo/lightningd/testplugpyproj/pyproject.toml +++ b/tests/data/recklessrepo/lightningd/testplugpyproj/pyproject.toml @@ -1,6 +1,3 @@ -[project] -dependencies = ["pyln-client"] - [tool.poetry] name = "testplugpyproj" version = "0.1.0"