Skip to content

fix: apply manifest settings when creating through the management canister - #744

Merged
raymondk merged 2 commits into
mainfrom
rk/create-mgmt-settings-fix
Aug 28, 2026
Merged

raymondk merged 2 commits into
mainfrom
rk/create-mgmt-settings-fix

Conversation

@raymondk

Copy link
Copy Markdown
Collaborator

Stacked on #743.

What

For non-provisional create_canister, ic-utils encodes the argument as a bare canister_settings record, but the interface spec defines it as record { settings : opt canister_settings; sender_canister_version : opt nat64 }. Encoding a CanisterSettings and decoding it as CreateCanisterArgs yields settings = None — verified empirically, and the same in 0.49.1, the version we resolve.

So the legacy management-canister creation path was never applying any manifest settings — controllers, compute allocation, all of it. icp deploy masked it by syncing settings afterwards; icp canister create does not, and left the canister unconfigured.

create_mgmt now issues the subnet-scoped call directly (a port of ic-utils' own subnet_call_and_wait), so the full settings are sent. Subnet-scoped routing is its own endpoint rather than an effective canister id, so it cannot go through update_or_proxy and ic-utils offers no way to send a different argument through that builder.

Testing

A unit test pins the argument shape, and asserts that the encoding this replaces decodes as "no settings".

This path is not reachable in CI or locally — it needs a CloudEngine subnet with no registered engine operator. The request construction is a faithful port and the encoding is covered by the test, but a manual pass against a real engine subnet is worth doing before merge.

Copilot AI balanced review requested due to automatic review settings August 28, 2026 17:00
@raymondk
raymondk force-pushed the rk/create-mgmt-settings-fix branch from 8ad0303 to 760124c Compare August 28, 2026 17:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes manifest settings being discarded during legacy management-canister creation.

Changes:

  • Sends correctly wrapped CreateCanisterArgs through subnet-scoped routing.
  • Adds encoding regression coverage.
  • Updates release notes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/icp/src/operations/create.rs Implements and tests direct subnet-scoped creation.
CHANGELOG.md Documents the fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CHANGELOG.md Resolved
Base automatically changed from rk/status-fallback-fix to main August 28, 2026 17:55
…ister

For non-provisional `create_canister`, `ic-utils` encodes the argument as
a bare `canister_settings` record, but the interface spec defines it as
`record { settings : opt canister_settings; sender_canister_version : opt
nat64 }`. Encoding a `CanisterSettings` and decoding it as
`CreateCanisterArgs` yields `settings = None`, so that path was never
applying any manifest settings — controllers, compute allocation, all of
it. `icp deploy` masked it by syncing settings afterwards; `icp canister
create` does not, and left the canister unconfigured.

`create_mgmt` now issues the subnet-scoped call directly (a port of
`ic-utils`' own `subnet_call_and_wait`), so the full settings are sent,
and a unit test pins the argument shape.

The path itself is not reachable in CI or locally — it needs a
CloudEngine subnet with no registered engine operator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01QooMLZ15EWRrknWtXfFZNp
@raymondk
raymondk force-pushed the rk/create-mgmt-settings-fix branch from 760124c to 2cff90b Compare August 28, 2026 17:55
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@raymondk
raymondk merged commit 2a9b1c3 into main Aug 28, 2026
103 checks passed
@raymondk
raymondk deleted the rk/create-mgmt-settings-fix branch August 28, 2026 18:45
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