Skip to content

test: enforce cloud engine invariants by default in system tests#9609

Merged
pierugo-dfinity merged 10 commits intomasterfrom
pierugo/system-tests/enforce-cloud-engine-properties
Apr 1, 2026
Merged

test: enforce cloud engine invariants by default in system tests#9609
pierugo-dfinity merged 10 commits intomasterfrom
pierugo/system-tests/enforce-cloud-engine-properties

Conversation

@pierugo-dfinity
Copy link
Copy Markdown
Contributor

@pierugo-dfinity pierugo-dfinity commented Mar 26, 2026

There is a registry invariant that enforces that cloud engines must have a free cycles cost schedule. A separate PR will add a second invariant enforcing that cloud engines must contain only type4 node reward types, as this is already how nodes deny incoming connections from cloud engine nodes in the firewall.

This PR ensures those two invariants are satisfied when creating cloud engines in system tests by default (though can still be broken if needed by calling with_cost_schedule/with_node_reward_type).

Moreover, note that this means that it becomes a requirement for any system test running a cloud engine to also have an API BN. As of HEAD, cloud engines already use API BNs to replicate the registry (because NNS nodes' firewall blocks them). Existing system tests using cloud engines work because the nodes' reward types are not set in the registry, thus default to contacting NNS nodes. Soon (draft PR), fetching delegations will also go through API BNs.
This PR thus also adds an API BN to existing tests that use cloud engines.

@github-actions github-actions bot added the test label Mar 26, 2026
@pierugo-dfinity pierugo-dfinity changed the title test: enforce properties of cloud engines in system tests feat(registry): add cloud engine invariant to only contain type4 nodes and enforce it in system tests Mar 27, 2026
@github-actions github-actions bot added feat and removed test labels Mar 27, 2026
@pierugo-dfinity pierugo-dfinity changed the title feat(registry): add cloud engine invariant to only contain type4 nodes and enforce it in system tests test: enforce cloud engine invariants by default in system tests Mar 27, 2026
@github-actions github-actions bot added test and removed feat labels Mar 27, 2026
@pierugo-dfinity pierugo-dfinity marked this pull request as ready for review March 27, 2026 13:20
@pierugo-dfinity pierugo-dfinity requested review from a team as code owners March 27, 2026 13:20
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):

  1. Update unreleased_changelog.md (if there are behavior changes, even if they are
    non-breaking).

  2. Are there BREAKING changes?

  3. Is a data migration needed?

  4. Security review?

How to Satisfy This Automatic Review

  1. Go to the bottom of the pull request page.

  2. Look for where it says this bot is requesting changes.

  3. Click the three dots to the right.

  4. Select "Dismiss review".

  5. 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

@pierugo-dfinity pierugo-dfinity dismissed github-actions[bot]’s stale review March 27, 2026 13:27
  1. Only test changes
  2. Only test changes
  3. Only test changes, no migration needed
  4. No security review either
@pierugo-dfinity pierugo-dfinity force-pushed the pierugo/system-tests/enforce-cloud-engine-properties branch from 26a236f to 06bd053 Compare March 27, 2026 17:19
@pierugo-dfinity
Copy link
Copy Markdown
Contributor Author

Now that #9613 is merged, I added a last commit to use API BNs with valid DNS resolution and TLS certificates otherwise the upcoming changes to delegation fetching (#9595) break. Nothing changes conceptually from the original PR description, so I do not expect a new review round.

@pierugo-dfinity pierugo-dfinity added this pull request to the merge queue Apr 1, 2026
Merged via the queue into master with commit 0040ee4 Apr 1, 2026
37 checks passed
@pierugo-dfinity pierugo-dfinity deleted the pierugo/system-tests/enforce-cloud-engine-properties branch April 1, 2026 10:24
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