-
Notifications
You must be signed in to change notification settings - Fork 35
Fix Docker Build Failure Caused by System-Installed Blinker #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
docker/Dockerfile.clightning
Outdated
RUN cd lnprototest && \ | ||
poetry config virtualenvs.create false && \ | ||
poetry install | ||
poetry install --no-interaction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably this can be removed and rust poetry install && poetry run .....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We deliberately keep install and runtime separate—since virtualenvs.create=false
drops deps into system Python, the entrypoint runs make check
directly, so there’s no need to chain poetry run
in the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh not sure, I think if you remove the virtualenvs.create=false
and use poetry run
the error will be solved without the need of the hack that you are adding inside the docker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works — I’ve implemented the changes now.
Initially, I removed packages like python3-blinker
because I assumed there was a specific reason for keeping virtualenvs.create=false
, so I tried to work around the issue instead of changing that setting. Thanks for the clarification and your help!
The Docker build that was failing earlier now completes successfully—our Poetry and dependency issues are fully resolved. The current CI failure: I tried reproducing this locally, and the test passes—the node correctly disconnects: ![]() This suggests the issue might not lie in the implementation or test logic, but rather in the CI environment. It’s quite similar to the LDK test failure we encountered recently, which passed on a subsequent run. It may be worth exploring whether this is a timing-related or environment-specific flake. Since I’m still learning and rely on Google/ChatGPT quite a bit, my understanding of the internals is fairly surface-level at the moment. I’d really appreciate any guidance on how to go about investigating this further. If you could point me to any relevant resources, documentation, or areas in the codebase to start digging into, that would be super helpful — I’m keen to understand this better and contribute meaningfully. @vincenzopalazzo Thanks! |
No need to put here what Chat GPT is telling you, we have a google group for the summer of bitcoin, let's keep issues and PR clean https://groups.google.com/u/1/g/lnprototest-sob-2025/c/YHXGBue6UVg
Not sure :) Probably AI is lying, see the issue tracker please! |
I originally created this PR in response to #140 (comment), and thought of a potential bug in the CI environment based on #140 (comment). And well, that's the tricky thing with LLMs—they tend to validate whatever line of reasoning one starts with. I completely understand your point about keeping the PR history clean—I'll stick to the issue tracker and Google group for further discussions. Really appreciate the guidance and your quick responses, and apologies for the noise in the thread |
add poetry run
9ae18b5
to
845b61e
Compare
poetry install | ||
RUN cd lnprototest && ls -lha | ||
|
||
CMD ["./lnprototest/docker/entrypoint.sh"] | ||
CMD ["poetry", "run", "./docker/entrypoint.sh"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong place! You need to change the entrypoint.sh
and use poetry run
only in the command that needs it
This PR addresses a critical issue where
poetry install
fails during Docker builds due to conflicts with the system-installedpython3-blinker
package.Changes Made:
python3-blinker
(installed viadistutils
) to preventpip uninstall
failures during Poetry dependency resolution.--no-interaction
flag to ensure non-blocking installation in CI/CD or Docker environments.Rationale:
When
python3-blinker
is installed viaapt
, it usesdistutils
, which does not track installed files in a way that allowspip
(and therefore Poetry) to safely uninstall or upgrade it. This causes the following error duringpoetry install
:Removing the conflicting system package allows Poetry to cleanly install its managed version from PyPI, resolving the failure and ensuring dependency reproducibility.
Testing
The updated Docker configuration was tested locally. The
docker build
now completes successfully with all Poetry dependencies installed as expected.