Conversation
- Add `json` and `stream` features to reqwest (required for `.json()` and `.bytes_stream()` on responses in reqwest 0.12) - Update snapshot management calls: canister_id is now embedded in the args structs, removing the separate &canister_id parameter - Add new required fields to TakeCanisterSnapshotArgs (uninstall_code, sender_canister_version) - Replace removed `with_optional_*` builder methods on UpdateSettingsBuilder with conditional `with_*` calls - Add log filter support in canister logs command using new FetchCanisterLogsArgs and CanisterLogFilter from ic-utils 0.46 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…--since-index When only --until or --until-index is provided, default the start to 0 so users can filter logs up to a given point without specifying a start. Also add missing conflicts_with for --follow on all filter flags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the log_memory_limit field to the Settings model, canister settings update command, settings sync operation, and canister status display. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
aws-lc-sys (OpenSSL licensed) was pulled in via: aws-lc-sys -> aws-lc-rs -> rustls -> hyper-rustls -> reqwest -> ic-agent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds support for the Internet Computer “Canister Logs Extensions” feature across icp-cli, including new log filtering flags and the new log_memory_limit canister setting, alongside dependency upgrades needed for the updated management canister APIs.
Changes:
- Upgrades
ic-agent/ic-utilsand adjusts call sites for updated management canister method signatures. - Extends
icp canister logswith timestamp/index filtering (--since/--until/--since-index/--until-index) and follow-mode lookback behavior. - Adds
log_memory_limitsupport to settings update/sync, schemas, and CLI reference docs.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/schemas/icp-yaml-schema.json | Adds log_memory_limit to the ICP YAML schema. |
| docs/schemas/environment-yaml-schema.json | Adds log_memory_limit to environment YAML schema. |
| docs/schemas/canister-yaml-schema.json | Adds log_memory_limit to canister YAML schema and defaults. |
| docs/reference/cli.md | Documents new canister logs filters and --log-memory-limit flag. |
| deny.toml | Allows OpenSSL license for new/updated transitive deps. |
| crates/icp/src/canister/mod.rs | Adds log_memory_limit to canister Settings. |
| crates/icp-cli/src/operations/snapshot_transfer.rs | Updates snapshot transfer calls to new mgmt canister arg-based APIs. |
| crates/icp-cli/src/operations/settings.rs | Syncs log_memory_limit and adapts update-settings builder usage. |
| crates/icp-cli/src/commands/canister/status.rs | Displays log_memory_limit in status output. |
| crates/icp-cli/src/commands/canister/snapshot/create.rs | Updates snapshot creation args/calls for new API fields/signatures. |
| crates/icp-cli/src/commands/canister/snapshot/restore.rs | Updates restore call signature for new API. |
| crates/icp-cli/src/commands/canister/snapshot/delete.rs | Updates delete call signature for new API. |
| crates/icp-cli/src/commands/canister/settings/update.rs | Adds --log-memory-limit and wires it into settings updates. |
| crates/icp-cli/src/commands/canister/logs.rs | Adds filtering flags, filter construction, timestamp parsing, and tests. |
| Cargo.toml | Bumps IC crates and enables additional reqwest features. |
| Cargo.lock | Locks updated dependency graph for new crate versions. |
| CHANGELOG.md | Notes new logs filtering and log_memory_limit support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… logs - Use unix_timestamp_nanos() instead of manual arithmetic in parse_timestamp to prevent silent overflow/wrapping for pre-epoch or far-future timestamps - Validate that --since/--until and --since-index/--until-index ranges are not inverted, returning a clear error instead of empty or confusing results Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add unit tests for build_filter and parse_timestamp edge cases, integration tests for --since-index/--until-index and --since/--until filtering, unit tests for log_memory_limit suffix parsing, and a comment explaining why log_memory_limit is not covered in canister_settings_tests (PocketIC does not yet support it). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use 0-based message names to match 0-based log indices - Fix --since timestamp to use valid u64 value (was overflowing) - Document expected --until-index inclusive behavior vs current PocketIC exclusive implementation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `--until` and `--until-index` flags use exclusive upper bounds, not inclusive. Update help text, error messages, validation (reject equal bounds), and tests to reflect this. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
A purely numeric timestamp exceeding u64 range now gets a clear "overflows the nanosecond timestamp range" error instead of the misleading "not a valid … or RFC3339 datetime" message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uncation Replace `as u64` cast with `u64::try_from().ok()` when computing now_nanos in follow mode, falling back to 0 on overflow. Also applies rustfmt formatting fixes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update reqwest to 0.13.2 and rename the `rustls-tls` feature to `rustls` to match the new API. This also removes unused transitive dependencies (webpki-roots, wasm-streams 0.4, ring). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When only --until-index 0 or --until 0 is passed, the previous error misleadingly showed both start and end as 0. Now these cases get a dedicated message explaining the exclusive end bound. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Include log_memory_limit in the miscellaneous settings update test so that when PocketIC gains support for the field, the now-expected 0 will fail and remind us to update the assertion to the correct value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
adamspofford-dfinity
approved these changes
Mar 9, 2026
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.
Summary
ic-agent/ic-utils0.46 and add reqwest features--since,--until,--since-index,--until-indexfilter flags toicp canister logslog_memory_limitcanister setting inicp canister settings update,icp canister settings sync, andicp canister statusTest plan
cargo checkpassescargo test -p icp-cli --bin icp)🤖 Generated with Claude Code