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

Support reinstalling canisters (SNS) #228

Merged
merged 2 commits into from
May 29, 2024

Conversation

anchpop
Copy link
Collaborator

@anchpop anchpop commented May 22, 2024

Description

Previously there was no way to send a UpgradeSnsControlledCanister proposal that reinstalls a canister with quill. This MR adds a --mode flag that can be used for this purpose. The flag is required.

Fixes NNS1-3063

How Has This Been Tested?

Automated tests have been adjusted to test all 3 cases

Checklist

  • I have made corresponding changes to the documentation in docs/cli-reference.

@anchpop anchpop requested a review from a team as a code owner May 22, 2024 01:12
@anchpop anchpop force-pushed the @anchpop/support-reinstall branch 4 times, most recently from b72649f to b004c02 Compare May 22, 2024 16:47
Copy link
Contributor

@sesi200 sesi200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Can you also add a changelog entry and update the PR description please?

src/commands/sns/make_upgrade_canister_proposal.rs Outdated Show resolved Hide resolved
@anchpop anchpop force-pushed the @anchpop/support-reinstall branch from b004c02 to c751dcf Compare May 23, 2024 17:39
sesi200
sesi200 previously approved these changes May 24, 2024
@sesi200 sesi200 dismissed their stale review May 24, 2024 09:32

Didn't notice changed default behaviour

@@ -62,6 +63,11 @@ pub struct MakeUpgradeCanisterProposalOpts {
/// Path to the binary file containing argument to post-upgrade method of the new canister WASM.
#[arg(long, conflicts_with = "canister_upgrade_arg")]
canister_upgrade_arg_path: Option<String>,

/// The install mode.
#[arg(long, short, default_value("install"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This disagrees with If the flag is not passed, the canister is upgraded instead (the old behavior). from the PR description. Also, it changes the default behaviour. IMO we need a very good reason to change what it does by default

@anchpop anchpop force-pushed the @anchpop/support-reinstall branch from c751dcf to 1649509 Compare May 24, 2024 16:45
@anchpop anchpop force-pushed the @anchpop/support-reinstall branch from 1649509 to ed77290 Compare May 24, 2024 16:47
@sesi200 sesi200 merged commit d649fb5 into dfinity:master May 29, 2024
33 checks passed
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.

3 participants