Repository navigation
fix: apply manifest settings when creating through the management canister - #744
Merged
Merged
Conversation
lwshang
approved these changes
Aug 28, 2026
raymondk
force-pushed
the
rk/create-mgmt-settings-fix
branch
from
August 28, 2026 17:00
8ad0303 to
760124c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes manifest settings being discarded during legacy management-canister creation.
Changes:
- Sends correctly wrapped
CreateCanisterArgsthrough 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.
…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
force-pushed
the
rk/create-mgmt-settings-fix
branch
from
August 28, 2026 17:55
760124c to
2cff90b
Compare
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
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.
What
For non-provisional
create_canister,ic-utilsencodes the argument as a barecanister_settingsrecord, but the interface spec defines it asrecord { settings : opt canister_settings; sender_canister_version : opt nat64 }. Encoding aCanisterSettingsand decoding it asCreateCanisterArgsyieldssettings = 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 deploymasked it by syncing settings afterwards;icp canister createdoes not, and left the canister unconfigured.create_mgmtnow issues the subnet-scoped call directly (a port ofic-utils' ownsubnet_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 throughupdate_or_proxyandic-utilsoffers 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.