Skip to content

Comments

fix: Save SNS canister IDs#2610

Merged
bitdivine merged 9 commits intochore-update-replica-10c0341032ac00c9728ecefa1e82e919f0f09022from
test-sns-canisters-saved
Oct 10, 2022
Merged

fix: Save SNS canister IDs#2610
bitdivine merged 9 commits intochore-update-replica-10c0341032ac00c9728ecefa1e82e919f0f09022from
test-sns-canisters-saved

Conversation

@bitdivine
Copy link
Contributor

@bitdivine bitdivine commented Sep 29, 2022

Description

This addresses two problems with the call to sns to create SNS canisters:

  • The sns command line tool is not always able to locate the did file, so fails to parse the sns deploy response.
  • The sns command line tool saves canister ids in canister_ids.json but this is incorrect when deploying to local. Given that the --network flag is not supported, all deployments are to local, at least now.

Changes

Use two new flags provided by the sns binary:

  • --candid provides the location of the candid file, so that the response is parsed reliably.
  • --save-to specifies to which canister_ids file to save the SNS canister IDs. This points to the file for local deployments and can be pointed at different locations once the --network flag is supported.

How Has This Been Tested?

This needs a more recent sns binary than the one currently in master, so this PR will fail in CI until we have upgraded. I believe the current protocol is to open a branch for an anticipated new blessed version of the ic, merge changes such as this into there, then merge that branch into master once the version has been blessed. We could bump just the sns binary; it is currently not used for anything other than this. Doing so would save a lot of time.

I have tested locally by installing dfx with a matching sns thus:

export PATH="$PWD/target/debug:$PATH"
dfx cache install
cp -f /home/max/dfn/ic-gitlab/rs/target/debug/sns "$(dfx cache show)/sns"

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.
    This is a noop

@bitdivine bitdivine changed the title Test sns canisters saved fix: Save SNS canister IDs Oct 3, 2022
@bitdivine bitdivine changed the base branch from master to chore-update-replica-10c0341032ac00c9728ecefa1e82e919f0f09022 October 10, 2022 11:59
@bitdivine bitdivine marked this pull request as ready for review October 10, 2022 12:01
@bitdivine bitdivine requested a review from a team as a code owner October 10, 2022 12:01
…c00c9728ecefa1e82e919f0f09022' into test-sns-canisters-saved
@bitdivine bitdivine force-pushed the test-sns-canisters-saved branch from 6f2dc4c to 9a8de9c Compare October 10, 2022 12:10
@mergify mergify bot mentioned this pull request Oct 10, 2022
3 tasks
@bitdivine bitdivine merged commit 1d8d4c7 into chore-update-replica-10c0341032ac00c9728ecefa1e82e919f0f09022 Oct 10, 2022
@bitdivine bitdivine deleted the test-sns-canisters-saved branch October 10, 2022 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant