Skip to content

feat(exec): List and read canister snapshots according to new visibility settings#9227

Merged
gregorydemay merged 29 commits intomasterfrom
gdemay/DEFI-2667-snapshot-visibility-logic
Mar 16, 2026
Merged

feat(exec): List and read canister snapshots according to new visibility settings#9227
gregorydemay merged 29 commits intomasterfrom
gdemay/DEFI-2667-snapshot-visibility-logic

Conversation

@gregorydemay
Copy link
Copy Markdown
Contributor

@gregorydemay gregorydemay commented Mar 6, 2026

Allow access to the endpoints

  • read_canister_snapshot_metadata
  • read_canister_snapshot_data
  • list_canister_snapshots

according the canister snapshot visibility settings.

Sequence of PRs to implement canister snapshot visibility settings as specified in dfinity/portal#6195:

  1. refactor(exec): General-purpose visibility settings #9155
  2. feat: Add types for canister snapshot visibility settings #9158
  3. feat(exec): List and read canister snapshots according to new visibility settings #9227 (this)

@github-actions github-actions Bot added the feat label Mar 6, 2026
@gregorydemay gregorydemay changed the title feat(exec): Honor canister snapshot visibility settings feat(exec): List and read canister snapshots according to new visibility settings Mar 6, 2026
@gregorydemay gregorydemay added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Mar 6, 2026
Comment thread rs/execution_environment/src/canister_manager.rs Outdated
Comment thread rs/execution_environment/src/canister_manager.rs Outdated
Comment thread rs/execution_environment/tests/canister_snapshots.rs
Comment thread rs/state_machine_tests/src/lib.rs Outdated
Comment thread rs/state_machine_tests/src/lib.rs Outdated
Comment thread rs/state_machine_tests/src/lib.rs Outdated
gregorydemay and others added 3 commits March 9, 2026 15:23
Co-authored-by: mraszyk <31483726+mraszyk@users.noreply.github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Mar 9, 2026
Extract logic to authorize access to some canister data (e.g., logs,
snapshots) based on some visibility settings.

Sequence of PRs to implement canister snapshot visibility settings as
specified in dfinity/portal#6195:
1. #9155 (this)
2. #9158
3.  #9227

---------

Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
shilingwang pushed a commit that referenced this pull request Mar 10, 2026
Extract logic to authorize access to some canister data (e.g., logs,
snapshots) based on some visibility settings.

Sequence of PRs to implement canister snapshot visibility settings as
specified in dfinity/portal#6195:
1. #9155 (this)
2. #9158
3.  #9227

---------

Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
github-merge-queue Bot pushed a commit that referenced this pull request Mar 11, 2026
Add the types needed for canisters' snapshot visibility settings, to
allow principals other than the canister's controllers to be able to
list and read canister's snaphots. In short this is like log visibility
settings but for canister's snapshots. This PR only adds the needed
types and does not change any existing logic.

Support for snapshot visibility settings for NNS-owned canisters will be
done in #9257. Note that the changes regarding the CMC are needed in
this PR because the CMC exposes
`ic_management_canister_types_private::CanisterSettingsArgs` via the
type `CreateCanister` which is an argument of the `create_canister`
endpoint and the test `test_candid_interface_compatibility` ensures that
the exposed Canister API is equal to the one declared in `cmc.did`.

Sequence of PRs to implement canister snapshot visibility settings as
specified in dfinity/portal#6195:
1. #9155 
2. #9158 (this)
3.  #9227

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
Base automatically changed from gdemay/DEFI-2667-snapshot-visibility-settings to master March 11, 2026 19:39
# Conflicts:
#	rs/cycles_account_manager/src/lib.rs
#	rs/nns/cmc/cmc.did
#	rs/types/management_canister_types/src/lib.rs
@gregorydemay gregorydemay marked this pull request as ready for review March 12, 2026 17:47
@gregorydemay gregorydemay requested a review from a team as a code owner March 12, 2026 17:47
@gregorydemay gregorydemay requested a review from mraszyk March 12, 2026 17:47
Comment thread rs/execution_environment/src/canister_manager.rs Outdated
Co-authored-by: mraszyk <31483726+mraszyk@users.noreply.github.com>
@gregorydemay gregorydemay enabled auto-merge March 13, 2026 15:11
@gregorydemay gregorydemay added this pull request to the merge queue Mar 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Mar 13, 2026
# Conflicts:
#	rs/execution_environment/src/canister_manager.rs
#	rs/execution_environment/src/execution_environment.rs
…lity-logic' into gdemay/DEFI-2667-snapshot-visibility-logic

# Conflicts:
#	rs/execution_environment/src/canister_manager.rs
#	rs/execution_environment/src/execution_environment.rs
@gregorydemay gregorydemay enabled auto-merge March 16, 2026 10:07
@gregorydemay gregorydemay added this pull request to the merge queue Mar 16, 2026
Merged via the queue into master with commit 1ad2363 Mar 16, 2026
38 checks passed
@gregorydemay gregorydemay deleted the gdemay/DEFI-2667-snapshot-visibility-logic branch March 16, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants