Skip to content

Commit 7e35fcf

Browse files
ShahanaFarooquicdecker
authored andcommitted
ci: Fixes for failing workflows
- Updated the `gl-testing` Dockerfile to use Poetry `1.8.2`, as Poetry `v2.x.x` installs the latest version of `pyln-grpc-proto` (`24.2.1`), which causes the `mypy glclient` check to fail. Poetry `1.8.2` installs `pyln-grpc-proto` version `0.1.3`, which works seamlessly with the CI. - Added a check to ensure the group exists before adding it in the Docker. - clnVersionManager: Locked Poetry version to `1.8.2` to allow for a coordinated upgrade in the future.
1 parent d9d39df commit 7e35fcf

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

.github/workflows/cln-version-manager-py.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55
types:
66
- synchronize
77
- opened
8-
workflow_dispatch:
9-
merge_group:
10-
push:
11-
branches:
12-
- master
8+
workflow_dispatch:
9+
merge_group:
10+
push:
11+
branches:
12+
- master
1313

1414
jobs:
1515
source:
@@ -41,18 +41,11 @@ jobs:
4141
- name: Install poetry
4242
if: steps.cached-poetry.outputs.cache-hit != 'true'
4343
uses: snok/install-poetry@v1
44+
with:
45+
version: 1.8.2
4446
- name: Install dependencies
4547
run: poetry update && poetry install --no-interaction
4648
- name: Run mypy
4749
run: poetry run mypy
4850
- name: Run tests
4951
run: poetry run pytest tests
50-
51-
52-
53-
54-
55-
56-
57-
58-

docker/gl-testing/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ RUN python3 -m venv /tmp/venv
4444
# This ensures poetry is always up-to-date.
4545
# This approach also ensures `poetry` and our environment don't overlap
4646
ENV POETRY_HOME=/tmp/poetry
47-
RUN curl -sSL https://install.python-poetry.org | python3 -
47+
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.2
4848
ENV PATH=$POETRY_HOME/bin:$PATH
49-
RUN poetry self add poetry-plugin-export
49+
50+
# Uncomment below line after poetry v2.x.x upgrade
51+
# RUN poetry self add poetry-plugin-export
5052

5153
# The pyproject.toml files describe our project
5254
# I purposefully ignore lock-files here
@@ -246,8 +248,10 @@ ENV VIRTUAL_ENV=/tmp/venv
246248
ARG GID=0
247249
ARG UID=0
248250
ARG DOCKER_USER=dev
249-
RUN groupadd -g $GID -o $DOCKER_USER &&\
250-
useradd -m -u $UID -g $GID -G sudo -o -s /bin/bash $DOCKER_USER && \
251+
252+
# Check if the group already exists before running groupadd
253+
RUN getent group $GID || groupadd -g $GID -o $DOCKER_USER && \
254+
id -u $UID || useradd -m -u $UID -g $GID -G sudo -o -s /bin/bash $DOCKER_USER && \
251255
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
252256

253257
# Create the required tmp-dicts

0 commit comments

Comments
 (0)