refactor: print deploy canister-phase line per state#654
Merged
Conversation
Follow-up to #652. Instead of an always-printed phase header, print a line that reflects what actually happens: "All canisters already exist" when there is nothing to create, or "Creating canisters:" only in the branch that creates. This drops the awkward "Ensuring canisters exist:" on a normal deploy, and avoids "Creating canisters:" ever sitting in front of "All canisters already exist" or the `--no-create` error. Output now follows the state, not the flag: `deploy` and `deploy --no-create` print the same thing whenever they do the same thing (all canisters exist), and differ only when the behavior differs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refines deploy-phase logging so messages reflect whether canisters already exist, must be created, or cannot be created due to --no-create.
Changes:
- Removes the unconditional phase header.
- Prints
Creating canisters:only when creation occurs. - Preserves the existing all-canisters-exist message.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses a Copilot review comment: the existing --no-create tests only checked success/failure, so a regression that printed "Creating canisters:" before the --no-create error (or dropped "All canisters already exist") would pass silently. - missing + --no-create: error prints with no "Creating canisters:" header. - creating deploy: prints "Creating canisters:". - all-exist + --no-create: prints "All canisters already exist", no header. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
adamspofford-dfinity
approved these changes
Jul 16, 2026
lwshang
marked this pull request as ready for review
July 16, 2026 18:27
lwshang
enabled auto-merge (squash)
July 16, 2026 18:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #652, from the discussion on the phase-header wording.
Instead of an always-printed header, the canister phase now prints a line that reflects what actually happens:
icp deployAll canisters already existicp deployCreating canisters:→Created canister …icp deploy --no-createAll canisters already existicp deploy --no-createWhy
Ensuring canisters exist:on a normal deploy.Creating canisters:only appears in the branch that actually creates, so it never sits in front ofAll canisters already existor the--no-createerror.deployanddeploy --no-createprint the same thing whenever they do the same thing (all canisters exist), and differ only when the behavior genuinely differs.No behavior change beyond the log wording; no arg/help changes, so CLI docs are unaffected.
🤖 Generated with Claude Code