feat: Add types for canister snapshot visibility settings#9158
feat: Add types for canister snapshot visibility settings#9158gregorydemay wants to merge 20 commits intomasterfrom
Conversation
… without PR is already 2_097_610.
These changes are moved to a separate PR on branch gdemay/DEFI-2667-snapshot-visibility-governance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
# Conflicts: # rs/cycles_account_manager/src/lib.rs # rs/execution_environment/src/canister_settings.rs
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
Updated CMC unreleased_changelog.md.
mraszyk
left a comment
There was a problem hiding this comment.
DSM changes look good to me. The NNS changes are likely accidental here and should be moved to the separate PR.
@mraszyk The changes regarding the CMC are not accidental: they must be part of that PR because the CMC exposes |
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>
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::CanisterSettingsArgsvia the typeCreateCanisterwhich is an argument of thecreate_canisterendpoint and the testtest_candid_interface_compatibilityensures that the exposed Canister API is equal to the one declared incmc.did.Sequence of PRs to implement canister snapshot visibility settings as specified in dfinity/portal#6195: