r0gue-io / pop-cli

An all-in-one tool for Polkadot development.
GNU General Public License v3.0
59 stars 17 forks source link

add ability to spin up a node based on a branch #118

Open brunopgalvao opened 2 months ago

brunopgalvao commented 2 months ago
pop up parachain -f ./network.toml -p https://github.com/r0gue-io/pop-node

As a user, I would like to run pop up parachain command specifying a specific branch so that I can test pop-node features that are on a branch and not yet on main.

Background: Right now I have made some changes to the Pop API and I want to test my ink! smart contract against it. How do I do this with pop up parachain command?

brunopgalvao commented 2 months ago

Apparently this exists with the -p flag:

  -p, --parachain <PARACHAIN>
    The url of the git repository of a parachain to be used, with branch/release tag specified as #fragment (e.g. 'https://github.com/org/repository#tag'). 
    A specific binary name can also be optionally specified via query string parameter (e.g. 'https://github.com/org/repository?binaryname#tag'), defaulting to the name of the repository when not specified
brunopgalvao commented 2 months ago

Re-opening this as using -p specifying the branch did not work for me.

Can someone confirm that specifying https://github.com/org/repository#branch works and include the steps to reproduce.

https://github.com/r0gue-io/pop-cli/blob/15ce5fce2588e43255039e99b6c9b22b5235cef8/crates/pop-cli/src/commands/up/parachain.rs#L41

Seems like the logic is handled by zombienet-sdk

AlexD10S commented 2 months ago

This functionality exists, code is here https://github.com/r0gue-io/pop-cli/blob/main/crates/pop-parachains/src/utils/git.rs#L21

However what is probably happening is that you have the pop-nodecached already and don't clone it.

This issue raised by Frank letting user inspect and clean cache might be the best solution: https://github.com/r0gue-io/pop-cli/issues/78. What do you think?

brunopgalvao commented 1 month ago
cargo run up parachain -f ./tests/zombienet.toml -r v1.8.0 -p https://github.com/r0gue-io/pop-node#frank/feat-token

Running this command does not run the branch specified. Issue is still relevant.