-
Notifications
You must be signed in to change notification settings - Fork 912
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 #6158
Reckless update #6158
Conversation
2d17d8f
to
902b1b1
Compare
902b1b1
to
c9b8d5a
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.
@endothermicdev The code has mostly been executed really well and I enjoyed testing it. Looking forward to use it soon in applications. Below are my testing results:
- Works well with symlink and the file both.
- "if LIGHTNING_CLI_CALL is None" did throw an error for me.
Changing the check to "if LIGHTNING_CLI_CALL == [None]" fixed the issue and found the cli. - tools/reckless -l "/.../.lightning" -c "/.../.lightning/config" --network "testnet" search "c-lightning-rest"
Error: Unable to locate source for plugin c-lightning-rest. Should add case sensitive message? - source rm/source rem/source remove/source add: These commands do not throw any error/info message if called without params.
- tools/reckless -l "/.../.lightning" -c "/.../.lightning/config" --network "testnet" source add https://github.com/Ride-The-Lightning/c-lightning-REST
Can we add a success message or return a list of sources once successful? - tools/reckless -l "/.../.lightning" -c "/.../.lightning/config" --network "testnet" source remove "https://github.com/Ride-The-Lightning/c-lightning-REST"
Error: File "/home/shahana/workspace/lightning/tools/reckless", line 208, in obtain_config
assert isinstance(config_path, str)
AssertionError
Remove is not working for all sources. - tools/reckless -l "/.../.lightning" -c "/.../.lightning/config" --network "testnet" source add dummy
Didn't throw any error but didn't add dummy in the sources list as well - Call enable before install: tools/reckless -l "/.../.lightning" -c "/.../.lightning/config" --network "testnet" enable c-lightning-REST
File "/home/shahana/workspace/lightning/tools/reckless", line 350, in init
raise Exception(f"Could not find a reckless directory for {name}")
Exception: Could not find a reckless directory for c-lightning-REST - Should
npm install
be executed with--omit=dev
option. - <Popen: returncode: None args: ['npm', 'install']> shows "dependencies installed successfully" message but <Popen: returncode: None args: ['pip', 'install', '-e', '.']>
shows "error encountered installing dependencies" - tools/reckless -l "/.../.lightning" -c "/.../.lightning/config" --network "testnet" -v install donations
Error: No file/folder found for package cln-plugins-donations - I was unable to install the c-lightning-REST plugin without commenting plugin test code from line 532 till 545. Install works as expected after that.
- Should
universal_newlines
be changed totext
as it is deprecated since Python 3.7.
Please note that I spent most of my time on testing the plugin rather than reviewing the code as @cdecker will do it much better than me :).
c9b8d5a
to
e530606
Compare
Did some cleanup and addressed several of these points @ShahanaFarooqui. I'll take another look at some of the failure responses (though these often only show up with the verbose flag.) "pip install -e ." installs from the pyproject.toml file, which I believe is generally geared toward developer usage (i.e., poetry install.) I debated whether I should include this method at all as it's only a fallback when a requirements.txt is missing. It works sometimes, but it less reliable outside of a separate virtual environment. Maybe it's best to not include this? Alternatively it could provide a warning and prompt the user to ask the developer for a requirement.txt. |
e530606
to
85e4317
Compare
8f815d8
to
67012ae
Compare
ACK 67012ae |
Also cleans up verbose logic
This abstracts the installation procedure to allow generic operations such as dependency installation to be performed for languages.
Also removes support for pip editable install using pyproject.toml `pip install -e .` This was a fallback method when a requirements file was not present, but was hacky and often failed anyway. reckless: remove installation via pyproject.toml This method relied on pip install in editable mode (hacky) and often failed to complete anyhow. We should instead encourage a requirements file to be created/used for user installation.
Also adds a timeout when testing a plugin. Previously the behavior of pyln-client was relied upon to exit if not communicating with lightningd, however, this behavior is not universal. Changlelog-Changed: reckless now installs node.js plugins
When enabling or disabling a plugin, the entrypoint is inferred from the user provided name. A canonical name should be used, which the installer entrypoint formats help to determine (this generally strips the file extension if one is provided.)
Adds a test to validate case matching.
67012ae
to
9daa6cb
Compare
Changelog-Changed: Added support for node.js plugin installation via reckless ACK 9daa6cb |
Removes an extraneous web request, and unnecessary config rewrites. Adds an installer class to support resolution/installation of dependencies and specification of necessary binaries for additional languages.
Based on #6110
Changelog-Changed: Added support for node.js plugin installation via reckless