fix(registry): Handle ReplicaVersion conversion errors.#10851
Merged
daniel-wong-dfinity-org-twin merged 2 commits intoJul 21, 2026
Merged
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 09ba52a. Security Overview
Detected Code Changes
|
daniel-wong-dfinity-org-twin
force-pushed
the
do-not-ignore-ReplicaVersion-conversion-error-daniel-wong
branch
from
July 21, 2026 13:09
4d5a24f to
8ccaebc
Compare
Copilot started reviewing on behalf of
daniel-wong-dfinity-org-twin
July 21, 2026 13:10
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes SubnetRegistry::get_replica_version fail loudly (with DecodeError) when a replica_version_id string cannot be converted into a ReplicaVersion, instead of silently treating the subnet as if it had no record.
Changes:
- Document an additional
DecodeErrorcase for invalid replica version IDs. - Replace
ReplicaVersion::try_from(...).ok()with explicit error propagation and contextual error messages for invalidreplica_version_idvalues.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daniel-wong-dfinity-org-twin
force-pushed
the
do-not-ignore-ReplicaVersion-conversion-error-daniel-wong
branch
from
July 21, 2026 13:16
8ccaebc to
d971419
Compare
eichhorl
approved these changes
Jul 21, 2026
Base automatically changed from
update-replica_version_id-readers-daniel-wong
to
master
July 21, 2026 14:58
daniel-wong-dfinity-org-twin
force-pushed
the
do-not-ignore-ReplicaVersion-conversion-error-daniel-wong
branch
from
July 21, 2026 18:02
6a33c38 to
09ba52a
Compare
daniel-wong-dfinity-org-twin
dismissed
github-actions[bot]’s stale review
July 21, 2026 18:03
No canister behavior change.
daniel-wong-dfinity-org-twin
enabled auto-merge
July 21, 2026 18:03
pull Bot
pushed a commit
to mikeyhodl/ic
that referenced
this pull request
Jul 21, 2026
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][prev] | [Next PR 👉][next] [prev]: dfinity#10787 [next]: dfinity#10851 --------- Co-authored-by: Daniel Wong <daniel.wong@dfinity.org> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
daniel-wong-dfinity-org-twin
deleted the
do-not-ignore-ReplicaVersion-conversion-error-daniel-wong
branch
July 21, 2026 19:25
pull Bot
pushed a commit
to bit-cook/ic
that referenced
this pull request
Jul 22, 2026
…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>
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.
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 | Next PR 👉