Repository navigation
chore: bump ic-management-canister-types to 0.8.0 and agent-rs to 0.49.0 - #10756
Conversation
Bump `ic-management-canister-types` 0.7.1 -> 0.8.0 and the agent-rs crates (`ic-agent`, `ic-utils`, `ic-transport-types`, `ic-identity-hsm`) 0.47.3 -> 0.48.1, and fix the resulting build breakages: - ic-pub-key: `ic-vetkeys` 0.7.0 is still built against `ic-management-canister-types` 0.7.1, so `for_mainnet_key` expects the 0.7.1 `VetKDKeyId`. Bridge the two by rebuilding the key id from its fields via `ic-cdk-management-canister` (added as an optional dependency gated behind the `vetkeys` feature). - canister_test: add the new `snapshot_visibility` field to `CanisterSettings`. - system-test driver: add the new `permissions` field to `ic_agent::identity::Delegation`. - consensus upgrade test: `ic_utils` still depends on the older `ic-management-canister-types`, so call the management canister directly via the agent instead of its typed `take_canister_snapshot` helper. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…aces The ic-management-canister-types 0.8.0 bump added a new snapshot_visibility field to CanisterSettings and DefiniteCanisterSettings. Sync the affected .did files to fix the candid interface compatibility tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ister directly The previous comment said `ic_utils` depends on an *older* `ic-management-canister-types`. It actually depends on the same 0.8.0 version from crates.io, which Cargo treats as a distinct crate from this workspace's local path copy, so the `TakeCanisterSnapshotArgs` types don't unify. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…nister-types-and-agent-rs # Conflicts: # Cargo.Bazel.json.lock # Cargo.lock
There was a problem hiding this comment.
Pull request overview
Updates core IC/agent dependencies (ic-management-canister-types and agent-rs crates) and adapts system tests, canister interfaces, and helper utilities to the updated APIs/types to restore successful builds.
Changes:
- Bump
ic-management-canister-typesto0.8.0and agent-rs crates (ic-agent,ic-utils,ic-transport-types,ic-identity-hsm) to0.49.0, updating Cargo + Bazel lockfiles accordingly. - Update management canister call sites to the newer
ic_utilscalling style (notablycanister_statusvia.as_update().call()). - Add/propagate newly introduced fields/types (
snapshot_visibilityin settings,permissionsin delegations) and bridge VetKD key-id type incompatibilities inic-pub-key.
Reviewed changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rs/tests/query_stats/lib/src/aggregation.rs | Updates management canister status call to new ic_utils call style. |
| rs/tests/execution/general_execution_tests/canister_lifecycle.rs | Adjusts canister status calls and rejection assertions for updated agent/utils behavior. |
| rs/tests/execution/canister_migration_test.rs | Updates canister_status invocation to new update-call pattern. |
| rs/tests/driver/src/util/delegations.rs | Populates new Delegation.permissions field (set to None). |
| rs/tests/driver/src/util.rs | Updates canister_status usage and removes now-unneeded AsyncCall import in this file. |
| rs/tests/consensus/upgrade/common.rs | Calls management canister snapshot API directly via ic-agent to avoid type-crate mismatch. |
| rs/tests/ckbtc/src/adapter.rs | Updates management canister status call to explicit update + call pattern. |
| rs/rust_canisters/canister_test/src/canister.rs | Adds new snapshot_visibility field to settings construction. |
| rs/pocket_ic_server/tests/test.rs | Updates canister status calls to explicit update + call pattern. |
| rs/nns/cmc/cmc.did | Adds snapshot_visibility type and field to CanisterSettings. |
| rs/dogecoin/ckdoge/minter/ckdoge_minter.did | Adds snapshot_visibility type and field to canister settings record. |
| packages/ic-pub-key/src/lib.rs | Bridges incompatible VetKDKeyId types by rebuilding via ic-cdk-management-canister. |
| packages/ic-pub-key/Cargo.toml | Adds optional ic-cdk-management-canister dependency under vetkeys feature. |
| packages/ic-pub-key/BUILD.bazel | Adds Bazel dependency for ic-cdk-management-canister. |
| Cargo.toml | Bumps workspace dependency versions; adds ic-cdk-management-canister. |
| Cargo.lock | Updates resolved versions/graphs for bumped crates. |
| Cargo.Bazel.toml.lock | Updates Bazel Cargo lock metadata for bumped crates. |
| Cargo.Bazel.json.lock | Updates Bazel JSON lock content for bumped crates. |
| bazel/rust.MODULE.bazel | Updates Bazel crate specs to bumped versions and adds ic-cdk-management-canister. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nister-types-and-agent-rs # Conflicts: # Cargo.Bazel.json.lock
…nister-types-and-agent-rs # Conflicts: # Cargo.Bazel.json.lock
…nister-types-and-agent-rs # Conflicts: # Cargo.Bazel.json.lock
There was a problem hiding this comment.
This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):
-
Update
unreleased_changelog.md(if there are behavior changes, even if they are
non-breaking). -
Are there BREAKING changes?
-
Is a data migration needed?
-
Security review?
How to Satisfy This Automatic Review
-
Go to the bottom of the pull request page.
-
Look for where it says this bot is requesting changes.
-
Click the three dots to the right.
-
Select "Dismiss review".
-
In the text entry box, respond to each of the numbered items in the previous
section, declare one of the following:
-
Done.
-
$REASON_WHY_NO_NEED. E.g. for
unreleased_changelog.md, "No
canister behavior changes.", or for item 2, "Existing APIs
behave as before.".
Brief Guide to "Externally Visible" Changes
"Externally visible behavior change" is very often due to some NEW canister API.
Changes to EXISTING APIs are more likely to be "breaking".
If these changes are breaking, make sure that clients know how to migrate, how to
maintain their continuity of operations.
If your changes are behind a feature flag, then, do NOT add entrie(s) to
unreleased_changelog.md in this PR! But rather, add entrie(s) later, in the PR
that enables these changes in production.
Reference(s)
For a more comprehensive checklist, see here.
GOVERNANCE_CHECKLIST_REMINDER_DEDUP
No canister behavior changes.
|
✅ No security or compliance issues detected. Reviewed everything up to b407e39. Security OverviewDetected Code Changes
|
|
✅ No security or compliance issues detected. Reviewed everything up to b407e39. Security OverviewDetected Code Changes
|
daniel-wong-dfinity-org-twin
left a comment
There was a problem hiding this comment.
Governance-owned files LG.
However, I think there is one more missing thing in cmc.did before we can upgrade the canister. Please, compare to cmc.did to what the canister currently offers. E.g.
dfx canister metadata --ic rkp4c-7iaaa-aaaaa-aaaca-cai 'candid:service'
Alternatively, I'm pretty sure it's running code at git commit ID e114e3d7f4efef3dc9876b619e71deb79868640e.
I'm getting the following on this branch: while the |
Bump the workspace dependency `ic-management-canister-types` from 0.8.0 to 0.11.0. This is needed for dfinity#11894 (offline derivation of secp256r1 keys in `ic-pub-key`). Between 0.8.0 and 0.11.0 nothing was removed or renamed. The additions still break Rust code in places, because none of these types is `#[non_exhaustive]`: - `CanisterSettings` and `DefiniteCanisterSettings` gained the fields `minimum_incoming_canister_call_cycles` and `status_visibility`, along with the new `StatusVisibility` type. - `HttpRequestArgs` gained `pricing_version`, and `HttpMethod` gained `PATCH`. - New types for flexible HTTP outcalls and subnet metrics. - `EcdsaCurve` gained `Secp256r1`. Changes that follow from the bump: - `canister_test`: one struct literal lists every `CanisterSettings` field, so it now sets the two new fields as well. - CMC: `cmc.did` declares the two new `CanisterSettings` fields, because `test_candid_interface_compatibility` requires it. The CMC now forwards these two settings in `create_canister` and `notify_create_canister`. Before, it dropped them. `unreleased_changelog.md` records this. dfinity#10756 did the same for `snapshot_visibility`. - ckDOGE minter: `ckdoge_minter.did` declares the two new `DefiniteCanisterSettings` fields, which `get_canister_status` now returns. The replica returns both fields unconditionally since dfinity#10398 and dfinity#10667, and all mainnet GuestOS versions in `mainnet-icos-revisions.json` contain both PRs. So decoding `canister_status` with the new types also works on mainnet. - Changelogs: `pocket-ic` and `ic-pub-key` re-export these types, so both record the bump. The older copies left in `Cargo.lock` come from `ic-utils` and `evm_rpc_types`, which have no newer release, and from the cdk, which a follow-up PR bumps. This does not yet remove the secp256r1 workarounds in the system tests (`cast_ecdsa_key_id`, the signer canister) and in the PocketIC test canister. Those are cdk canisters, and the workspace's `ic-cdk-management-canister` 0.1.1 re-exports the 0.7.1 types. Its 0.3.0 requires `ic-management-canister-types` ^0.11, so this bump comes first. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Bump
ic-management-canister-types0.7.1 -> 0.8.0 and the agent-rs crates (ic-agent,ic-utils,ic-transport-types,ic-identity-hsm) 0.47.3 -> 0.49.0, and fix the resulting build breakages:ic-vetkeys0.7.0 is still built againstic-management-canister-types0.7.1, sofor_mainnet_keyexpectsVetKDKeyIdfromic-management-canister-types0.7.1. Bridge the two by rebuilding the key id from its fields viaic-cdk-management-canister(added as an optional dependency gated behind thevetkeysfeature).snapshot_visibilityfield toCanisterSettingsand/orDefiniteCanisterSettings.permissionsfield toic_agent::identity::Delegation.ic_utilsstill depends on the olderic-management-canister-types, so call the management canister directly via the agent instead of its typedtake_canister_snapshothelper.