-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support local manifest to be pinned and released #81
Support local manifest to be pinned and released #81
Conversation
9757cdf
to
cecaf2d
Compare
After investigating a bit further, I believe that the issue with adding coverage is that we'll need to set up a local chain to test the |
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.
Thanks for the pr! Just a couple adjustments I'd like to happen. And you're right about testing. I've always just been testing release
by locally running commands - which is obviously a horrible way to test 😬 . I'm not sure it's the highest priority, but if you're up for a challenge - adding tests for release
would be wonderful! The pm
module in web3
would be a good place to get an idea on how to get the chain up & running.
Over the next few days I'm going to take on setting up that testing environment, thank you for the guidance! |
ef23121
to
cecaf2d
Compare
I made a minor update to web3 - which broke some tests here 😬 - so you'll have to rebase off master again to fix the failing tests in circle. |
250b9ee
to
3ff3320
Compare
3ff3320
to
c176265
Compare
Running into issues for end-to-end testing the release cmd. Getting a bit of a cryptic error about it not being able to locate the |
@corydickson Hmm - it's probably that the cli is looking for a keyfile - but one hasn't been set. To sign any txs when you use |
I think it might have something to do with my environment: inside the import pexpect
from ethpm_cli._utils.ipfs import pin_local_manifest
from ethpm_cli.main import ENTRY_DESCRIPTION
from ethpm_cli.commands.auth import (
get_authorized_private_key,
get_keyfile_path,
import_keyfile,
)
# from ethpm_cli.commands.release import release_package
def test_release_local_manifest(test_assets_dir, keyfile_auth, keyfile):
# Release a package from a local manifest
child_keyfile = pexpect.spawn(f"ethpm auth --keyfile-path {keyfile}", timeout=15)
# Anytime you expect from child_keyfile here it fails with EOF
local_manifest_path = test_assets_dir / "owned" / "1.0.0.json"
(package_name, package_version, manifest_uri) = pin_local_manifest(local_manifest_path)
_, _, password = keyfile_auth
child = pexpect.spawn(f"ethpm release --manifest-path {local_manifest_path} --keyfile-password {password}", timeout=15)
child.expect(ENTRY_DESCRIPTION)
child.expect("\r\n")
# EOF error here
child.expect(f"Retrieving manifest info from local file @ {local_manifest_path} ")
child.expect(f"{package_name} v{package_version} @ {manifest_uri} ") This looks like the keyfile path is malformed from the POSIX path given see the line
|
I'll try creating a new keyfile and writing it in the xdg test directory |
Fixed had to import the keyfile in the test working through the rest now |
@njgheorghita May I get a final pass on the PR as it stands? I'm having trouble with managing the web3 backends. Modified the snippet above with a new deployed registry like in the
Assuming this is because the You mentioned this wasn't high priority but if you have any suggestions on how to move forward I can continue working on it 🙏 |
@corydickson Hmm, hard to tell exactly what might be the problem, though your explanation seems plausible - if you want to push your code into a draft pr I'd be happy to take a closer look at it. In the meantime #88 should be a more exciting and definitely more useful challenge if you're up for it. |
What was wrong?
Issue #60
How was it fixed?
--manifest_path
cli optionNeed a bit of guidance on where to add tests for this new feature, had trouble finding the tests that cover the default use case. 99% sure this works as intended :)
Also should I add errors/checks if the
manifest_json
file is malformed in some way? It looks like guards are already in place that ensure it's an existing file.Cute Animal Picture