feat: Consult the standard engine replica version.#10840
feat: Consult the standard engine replica version.#10840daniel-wong-dfinity-org-twin merged 4 commits into
Conversation
…ws about the new standard engine replica_version. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
✅ No security or compliance issues detected. Reviewed everything up to 72f3292. Security Overview
Detected Code Changes
|
Does not affect canister behavior.
There was a problem hiding this comment.
Pull request overview
This PR updates the registry helper logic for determining a subnet’s effective replica version so that CloudEngine subnets with an empty replica_version_id follow the registry-wide StandardEngineReplicaVersionRecord (instead of returning None), enabling standard engine rollouts with deterministic per-subnet selection.
Changes:
- Extend
get_replica_version()to resolve blankreplica_version_idforCloudEnginesubnets viaStandardEngineReplicaVersionRecordand a deterministic upgrade priority. - Add hashing-based rollout priority computation and comprehensive unit tests for selection behavior and error cases.
- Wire the new SHA-256 dependency into Cargo and Bazel build definitions.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rs/registry/helpers/src/subnet.rs | Resolve CloudEngine replica version via standard engine record + deterministic rollout priority; add tests. |
| rs/registry/helpers/Cargo.toml | Add ic-crypto-sha2 dependency for upgrade priority hashing. |
| rs/registry/helpers/BUILD.bazel | Add //rs/crypto/sha2 to Bazel deps for library/tests. |
| Cargo.lock | Record new dependency in lockfile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The branch name contains |
Yes, I'm working on a follow up now. Hope to send it out today. |
|
Could you add a line to the description noting the remaining steps in this stack (e.g. the orchestrator reader follow-up)? This PR is clear on its own, but a quick "what's still coming" would save future readers from walking the whole prev/next chain to see where it sits. Non-blocking. |
Originally, problems were swept under the rug: if ReplicaVersion::try_from returned Err, it would be treated the same as if there were no SubnetRecord at all. Since replica_version_id is validated, this wouldn't change behavior. This just makes the code more defensive. [👈 Previous PR][prev] [prev]: dfinity#10840 --------- Co-authored-by: Daniel Wong <daniel.wong@dfinity.org>
…a thin wrapper... (dfinity#10857) ... around the `get_replica_version` (same name) method of `RegistryClient`. This builds on [PR 10840], where we started to become aware of `StandardEngineReplicaVersionRecord`. [PR 10840]: dfinity#10840 [👈 Previous PR][prev] [prev]: dfinity#10851 --------- Co-authored-by: Daniel Wong <daniel.wong@dfinity.org> Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
When determining what replica version an engine is supposed to run (and it doesn't explicitly specify one).
Future Work
Orchestrator does not use this. That will be fixed in an imminent PR.
References
👈 Previous PR | Next PR 👉