Skip to content
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

fix: parachain artifact name conflict #201

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parachain/parachain.star
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def start_nodes(plan, chain_type, parachains, relay_chain_ip):
final_parachain_details = {}

for parachain in parachains:
para_id = register_para_slot.register_para_id(plan, relay_chain_ip)
para_id = register_para_slot.register_para_id(plan, relay_chain_ip, parachain["name"])
parachain_details = start_local_parachain_node(plan, chain_type, parachain, para_id)
register_para_slot.onboard_genesis_state_and_wasm(plan, para_id, parachain["name"], relay_chain_ip)
final_parachain_details.update(parachain_details)
Expand Down
6 changes: 3 additions & 3 deletions parachain/register-para-id.star
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build_spec = import_module("../package_io/build-spec.star")
constant = import_module("../package_io/constant.star")

def register_para_id(plan, alice_ip):
def register_para_id(plan, alice_ip, chain_name):
files = {
"/app": "configs",
"/build": "javascript",
Expand All @@ -11,14 +11,14 @@ def register_para_id(plan, alice_ip):
run = "cd /build && npm i && node register ws://{0}:9944 //Alice".format(alice_ip),
image = constant.NODE_IMAGE,
files = files,
store = [StoreSpec(src = "/tmp/para.json", name = "parathread_id")],
store = [StoreSpec(src = "/tmp/para.json", name = "parathread_id_{}".format(chain_name))],
)

id = plan.run_sh(
run = "cat /build/para.json | tr -d '\n\r'",
image = "badouralix/curl-jq",
files = {
"/build": "parathread_id",
"/build": "parathread_id_{}".format(chain_name),
},
)
return id.output
Expand Down
Loading