feat: enable canister creation with subnet ID in the URL#9919
Merged
feat: enable canister creation with subnet ID in the URL#9919
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for a new replica HTTP update-call endpoint that is addressed by subnet ID (/api/v4/subnet/<effective_subnet_id>/call) and is restricted to aaaaa-aa (ic:00) create_canister calls, aligning with the referenced public spec change.
Changes:
- Introduces
/api/v4/subnet/{effective_subnet_id}/callrouter/handler wiring in the public HTTP endpoints crate. - Extends ingress validation to distinguish between canister-scoped vs subnet-scoped “effective destination” and enforces subnet endpoint restrictions.
- Adds/updates unit + system tests and a test-agent helper for exercising the new subnet endpoint; updates Bazel visibility/deps accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rs/http_endpoints/public/src/lib.rs | Wires a new v4 subnet call router into the main axum router. |
| rs/http_endpoints/public/src/call/call_sync.rs | Adds route + handler for /api/v4/subnet/.../call and refactors sync call handling to accept an “effective destination”. |
| rs/http_endpoints/public/src/call/call_async.rs | Updates async call path to use the new “effective destination” validation API. |
| rs/http_endpoints/public/src/call.rs | Adds EffectiveDestination and extends ingress validation to enforce subnet endpoint constraints. |
| rs/http_endpoints/test_agent/src/lib.rs | Adds CallSubnet test client for the new endpoint. |
| rs/http_endpoints/public/tests/common/mod.rs | Adds UpdateEndpoint to parameterize tests across canister vs subnet call endpoints. |
| rs/http_endpoints/public/tests/test.rs | Expands test matrix to cover subnet v4 sync calls + adds focused subnet endpoint tests. |
| rs/http_endpoints/public/tests/load_shed_test.rs | Extends load shedding tests to include the subnet v4 endpoint. |
| rs/tests/networking/http_endpoints_public_spec_test.rs | Adds system/spec test exercising subnet v4 behavior on a real topology. |
| rs/http_endpoints/test_agent/BUILD.bazel | Extends visibility to allow fuzz subpackages to depend on test_agent. |
| rs/http_endpoints/fuzz/BUILD.bazel | Adds dependency on the test_agent crate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eichhorl
reviewed
Apr 17, 2026
eichhorl
approved these changes
Apr 20, 2026
venkkatesh-sekar
approved these changes
Apr 20, 2026
eichhorl
reviewed
Apr 20, 2026
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.
This PR adds a new public HTTP endpoint
/api/v4/subnet/<effective_subnet_id>/callon the replica that supports call to thecreate_canisterendpoint of the management canister (aaaaa-aa). It is specified in this PR.