chore: bump ic-agent and related dependencies#10278
Draft
lwshang wants to merge 7 commits into
Draft
Conversation
Upgrade ic-agent, ic-identity-hsm, ic-transport-types, and ic-utils to the latest git revision from agent-rs, reqwest to 0.13.3, ic_principal to 0.1.2, and dfx-core to a git revision. Adjust call sites to account for API changes introduced by the new versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename `UpdateCanisterBuilder` → `UpdateSettingsBuilder` - Replace `with_optional_freezing_threshold(Some(v))` → `with_freezing_threshold(v)` - Replace `with_optional_wasm_memory_limit(Some(v))` → `with_wasm_memory_limit(v)` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Rust agent stack and related HTTP dependencies (ic-agent/ic-utils/ic-transport-types/ic-identity-hsm, reqwest, ic_principal, and dfx-core) and updates impacted call sites across system tests and services to match the new APIs (notably new request fields and changed builder method shapes).
Changes:
- Bump agent-rs crates to a pinned git revision, update reqwest to 0.13.3, and update dfx-core to a pinned git revision.
- Update code to accommodate API changes (e.g.,
sender_infofield additions, management canister builder renames,fetch_canister_logsargs struct, andread_state_raweffective canister id typing). - Update Bazel crate specs/lockfiles to reflect the new dependency sources and features (with follow-up alignment needed per review comments).
Reviewed changes
Copilot reviewed 24 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| rs/tests/networking/nns_delegation_test.rs | Adapts state-read/call/query envelope construction to new agent types and sender_info field. |
| rs/tests/execution/general_execution_tests/canister_lifecycle.rs | Updates management canister settings builder usage to the new UpdateSettingsBuilder API. |
| rs/tests/execution/general_execution_tests/big_stable_memory.rs | Updates create-canister builder call for the new wasm memory limit API. |
| rs/tests/driver/src/util.rs | Updates management canister create-canister flow for optional compute allocation; adapts log fetching and request signing to new APIs. |
| rs/tests/dre/utils/steps/workload.rs | Switches reqwest imports to use the workspace reqwest crate instead of ic-agent’s internal re-export. |
| rs/tests/crypto/request_signature_test.rs | Updates envelope content signing to include sender_info. |
| rs/tests/consensus/utils/src/rw_message.rs | Adjusts read_state_raw call to match updated effective canister id handling. |
| rs/tests/consensus/upgrade/common.rs | Updates snapshot-taking call signature and argument struct fields to match updated management canister types. |
| rs/tests/consensus/upgrade/Cargo.toml | Pins ic-management-canister-types to 0.7.1 for compatibility with updated ic-utils APIs. |
| rs/tests/consensus/upgrade/BUILD.bazel | Updates Bazel deps to pull the correct ic-management-canister-types version. |
| rs/tests/boundary_nodes/rate_limit_canister_test.rs | Updates reqwest client import path after dependency re-org. |
| rs/tests/boundary_nodes/Cargo.toml | Adds explicit reqwest dependency for boundary node system tests. |
| rs/tests/boundary_nodes/BUILD.bazel | Adds reqwest to Bazel deps for the updated test code. |
| rs/tests/boundary_nodes/api_bn_decentralization_test.rs | Switches reqwest imports to the workspace reqwest crate. |
| rs/rosetta-api/icrc1/src/construction_api/utils.rs | Updates HttpCallContent creation to include sender_info. |
| rs/pocket_ic_server/src/state_api/state.rs | Adapts embedded ic-gateway integration to updated client types and setup_router signature; introduces ArcSwapOption usage. |
| rs/pocket_ic_server/Cargo.toml | Adds direct arc-swap dependency required by the updated state API module. |
| rs/migration_canister/tests/tests.rs | Updates envelope content creation to include sender_info. |
| rs/boundary_node/ic_boundary/src/test_utils.rs | Switches test HTTP client trait impl to use ic_bn_lib’s reqwest types. |
| rs/boundary_node/ic_boundary/src/dns.rs | Switches DNS resolver integration to use ic_bn_lib’s reqwest DNS types. |
| rs/boundary_node/ic_boundary/src/check.rs | Switches health-check request/response types to use ic_bn_lib’s reqwest types. |
| packages/pocket-ic/tests/tests.rs | Updates envelope content creation to include sender_info. |
| Cargo.toml | Bumps top-level workspace deps (ic-agent family to git rev, reqwest 0.13.3, ic_principal 0.1.2, dfx-core to git rev, ic-gateway rev). |
| Cargo.lock | Refreshes lockfile for the updated dependency set. |
| Cargo.Bazel.toml.lock | Refreshes Bazel/Cargo lockfile for crate_universe resolution (alignment issues noted in review). |
| bazel/rust.MODULE.bazel | Updates crate_universe specs for git-pinned deps and reqwest feature changes (additional alignment needed per review). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The Bazel crate spec in rust.MODULE.bazel was still pointing to the old ic-gateway rev (f33afac2) which has a 13-arg setup_router, while Cargo.toml and pocket_ic_server already use the new rev (49424ec2) with a 14-arg setup_router requiring the subnets_info parameter. Also bump axum spec from ^0.8.4 to ^0.8.9 (matching Cargo.lock) to satisfy ic-gateway's transitive axum requirement, and add arc-swap as an explicit Bazel dep for pocket_ic_server which uses ArcSwapOption directly. Regenerate Cargo.Bazel.*.lock accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ic-bn-lib-common was pinned to 0.1.4 (reqwest 0.12.24) in the Bazel lock while Cargo.lock had 0.1.8 (reqwest 0.13.3), causing type conflicts when building pocket-ic-server. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ring 0.17.x enables getrandom/js via feature unification, causing cargo-bazel to add wasm-bindgen imports to all wasm32-unknown-unknown getrandom 0.2.x builds. This broke memory_matrix_test (and likely other canister builds) with an InvalidImportSection error at validation time. Adds a getrandom_no_wasm_bindgen Bazel library target with only ["custom", "std"] features and overrides the default lib target to point to it, bypassing lock-file feature resolution entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Upgrade ic-agent, ic-identity-hsm, ic-transport-types, and ic-utils to the latest git revision from agent-rs, reqwest to 0.13.3, ic_principal to 0.1.2, and dfx-core to a git revision. Adjust call sites to account for API changes introduced by the new versions.