Skip to content

feat(registry): Allow Cloud Engines to have blank replica_version_id (in their SubnetRecord).#10865

Merged
daniel-wong-dfinity-org-twin merged 4 commits into
masterfrom
allow-cloud-engines-to-have-blank-replica_version_id-daniel-wong
Jul 22, 2026
Merged

feat(registry): Allow Cloud Engines to have blank replica_version_id (in their SubnetRecord).#10865
daniel-wong-dfinity-org-twin merged 4 commits into
masterfrom
allow-cloud-engines-to-have-blank-replica_version_id-daniel-wong

Conversation

@daniel-wong-dfinity-org-twin

@daniel-wong-dfinity-org-twin daniel-wong-dfinity-org-twin commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

In order for that to be allowed, the following conditions must be met:

  1. Primarily, StandardEngineReplicaVersionRecord exists
  2. This feature must be enabled via flag.

As per our standard way of doing this, this is currently DISABLED.

The plan is to enable it once all subnets (or maybe, just Cloud Engines) understand how to handle a blank replica_version_id field.

👈 Previous PR | Next PR 👉

github-actions[bot]

This comment was marked as resolved.

@zeropath-ai

zeropath-ai Bot commented Jul 22, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 88e8390.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/registry/canister/src/flags.rs
    Add IS_BLANK_REPLICA_VERSION_ID_FOR_CLOUD_ENGINES_ENABLED flag
Enhancement ► rs/registry/canister/src/invariants/replica_version.rs
    Import new flag and adjust logic to handle blank replica_version_id for CloudEngines; add detailed comments and tests scaffolding

@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin dismissed github-actions[bot]’s stale review July 22, 2026 12:53

New code is not yet active in release builds. Will changelog when this feature is enabled.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates registry invariants to optionally allow CloudEngine subnets to have an empty replica_version_id in their SubnetRecord, gated behind a new (currently disabled) feature flag and the presence of a StandardEngineReplicaVersionRecord.

Changes:

  • Add a new registry-canister flag for enabling blank replica_version_id specifically for CloudEngines.
  • Update replica version invariants to ignore blank replica_version_id for CloudEngine subnets when the flag is enabled and a StandardEngineReplicaVersionRecord exists.
  • Add tests covering the allowed/forbidden combinations (flag on/off, record present/absent, CloudEngine vs non-CloudEngine).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
rs/registry/canister/src/invariants/replica_version.rs Adjusts version-in-use collection logic to permit blank CloudEngine replica_version_id under gated conditions; adds unit tests for the new behavior.
rs/registry/canister/src/flags.rs Introduces a new feature flag and test-only temporary enable/disable helpers for blank CloudEngine replica_version_id.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rs/registry/canister/src/invariants/replica_version.rs
Comment thread rs/registry/canister/src/invariants/replica_version.rs
Comment thread rs/registry/canister/src/invariants/replica_version.rs
Comment thread rs/registry/canister/src/invariants/replica_version.rs
Comment thread rs/registry/canister/src/flags.rs

@pierugo-dfinity pierugo-dfinity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

Comment thread rs/registry/canister/src/invariants/replica_version.rs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin added this pull request to the merge queue Jul 22, 2026
Merged via the queue into master with commit 3b4a53d Jul 22, 2026
37 checks passed
@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin deleted the allow-cloud-engines-to-have-blank-replica_version_id-daniel-wong branch July 22, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants