-
Notifications
You must be signed in to change notification settings - Fork 902
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
reckless update: enable install @ commit and add python virtual environments #7018
reckless update: enable install @ commit and add python virtual environments #7018
Conversation
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.
I left a comment, let me know if I am missing something
bd8d730
to
51da432
Compare
I removed timeouts on the pip and poetry install (grpcio took a very long time to build) and reenabled streaming output. Expanded test coverage of the installed poetry environment and forced poetry installation into a new virtual environment by removing the VIRTUAL_ENV environment variable. Without this Poetry was preferring the already active (CI) venv and merely updating it. |
ba7a37d
to
0e0c3b5
Compare
Fixes a bug introduced in 6163138 which avoided gratuitous rewrites of the lightningd config
This creates a separate staging directory from the one used to clone the source. A symlink is then added to the plugin's entrypoint which is now in the source directory.
e9b07e0
to
ece7b2d
Compare
The metadata includes an original retrieval source, timestamp, and commit hash. This will allow a future update command to more easily evaluate the status of the existing installation.
... using the syntax reckless install <plugin_name>@<commit hash>
ece7b2d
to
26af072
Compare
This uses pip to install to a venv when the dependencies are specified with requirements.txt and poetry when it's present on the system and the plugin has a pyproject.toml. The directory structure will be: reckless/ source/ (original plugin code here) plugin_entrypoint (original entrypoint) plugin_name (symlink or wrapper to activate venv) .metadata (installation information) .venv/ (python virtual environment) The wrapper matches the naming of the original plugin entrypoint. The shebang is modified to use the virtual environment's python binary, then the original plugin is imported as a module and executed as though it was run directly. Changelog-Changed: reckless installs python plugins in virtual environments
Also test checkout of a git tag on installation.
26af072
to
1251743
Compare
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.
ACK 1251743
assert n.rpc.testmethod() == 'I live.' | ||
|
||
|
||
@unittest.skipIf(VALGRIND, "virtual environment triggers memleak detection") |
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.
Are all these skipped if VALGRIND is set? If yes there is a way to disable tests in the entire file with the following anywhere before the first test:
if VALGRIND:
pytest.skip(allow_module_level=True)
This PR contains several reckless updates:
fixes an issue with removing sources from the reckless source list
refactors the installation process staging individual plugins in a separate directory from their cloned source
adds metadata to the installation directory - this will be used in a future 'update' command
adds the ability to install a specific commit or tag with @<tag/commit> syntax
creates individual python virtual environments using pip (requirements.txt) or poetry (pyproject.toml)