refactor(compute-providers): isolate EC2 provider handling - #5254
Open
edersonbrilhante wants to merge 10 commits into
Open
refactor(compute-providers): isolate EC2 provider handling#5254edersonbrilhante wants to merge 10 commits into
edersonbrilhante wants to merge 10 commits into
Conversation
edersonbrilhante
marked this pull request as ready for review
August 7, 2026 20:54
edersonbrilhante
force-pushed
the
refactor-ec2-provider-isolation
branch
from
August 7, 2026 21:42
1fc78c4 to
b948b89
Compare
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
edersonbrilhante
force-pushed
the
experimental-multi-runner-config-v2-20260805
branch
from
August 12, 2026 21:58
0849752 to
2aa54f7
Compare
edersonbrilhante
force-pushed
the
refactor-ec2-provider-isolation
branch
3 times, most recently
from
August 12, 2026 22:38
ecba660 to
6d3c6ba
Compare
edersonbrilhante
changed the base branch from
experimental-multi-runner-config-v2-20260805
to
main
August 12, 2026 22:38
edersonbrilhante
force-pushed
the
refactor-ec2-provider-isolation
branch
2 times, most recently
from
August 12, 2026 22:57
cefb18a to
6a5922a
Compare
edersonbrilhante
changed the base branch from
main
to
refactor-compute-providers
August 12, 2026 22:58
edersonbrilhante
force-pushed
the
refactor-ec2-provider-isolation
branch
from
August 14, 2026 12:32
6a5922a to
fd78317
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Moves dynamic-label routing from the webhook Lambda into the compute-provider abstraction while preserving EC2 policy behavior.
Changes:
- Adds provider-neutral queue selection and label detection.
- Narrows provider responsibility to policy violation reporting.
- Extracts shared AWS policy evaluation and updates tests/callers.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
lambdas/libs/compute-providers/webhook.ts |
Adds centralized provider queue selection. |
lambdas/libs/compute-providers/webhook.test.ts |
Tests selector behavior. |
lambdas/libs/compute-providers/templates/provider/webhook.ts |
Updates provider template contract. |
lambdas/libs/compute-providers/templates/provider/provider.test.ts |
Updates template capability assertion. |
lambdas/libs/compute-providers/registry.test.ts |
Updates registry capability assertion. |
lambdas/libs/compute-providers/provider-types.ts |
Consolidates strict provider resolution. |
lambdas/libs/compute-providers/provider-types.test.ts |
Tests provider resolution. |
lambdas/libs/compute-providers/dynamic-labels.ts |
Detects labels targeting other providers. |
lambdas/libs/compute-providers/dynamic-labels.test.ts |
Adds label-detection coverage. |
lambdas/libs/compute-providers/contracts.ts |
Replaces queue selection with violation reporting. |
lambdas/libs/compute-providers/aws/ec2/src/webhook/dynamic-labels.ts |
Adapts EC2 to the new contract. |
lambdas/libs/compute-providers/aws/ec2/src/webhook/dynamic-labels.test.ts |
Tests EC2 violation reporting and fallback. |
lambdas/libs/compute-providers/aws/ec2/src/webhook/dynamic-labels-policy.ts |
Delegates to shared AWS policy logic. |
lambdas/libs/compute-providers/aws/dynamic-labels-policy.ts |
Adds reusable AWS policy evaluation. |
lambdas/functions/webhook/src/runners/dispatch.ts |
Uses the provider-neutral selector. |
lambdas/functions/webhook/src/runners/dispatch.test.ts |
Updates dispatch tests and mocks. |
lambdas/functions/webhook/src/runners/aws-dynamic-labels.ts |
Removes obsolete Lambda selector. |
lambdas/functions/webhook/src/runners/aws-dynamic-labels.test.ts |
Removes obsolete selector tests. |
lambdas/functions/webhook/src/runners/aws-dynamic-labels-policy.ts |
Removes obsolete type re-export. |
lambdas/functions/control-plane/src/scale-runners/scale-up.test.ts |
Updates unsupported-provider fixture. |
lambdas/functions/control-plane/src/pool/pool.test.ts |
Updates unsupported-provider fixture. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
@Brend-Smits @guicaulada when the time permits, could you review? |
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.
Description
DynamicLabelProviderto provider-owned validation throughgetViolationswhile preserving EC2 legacy-policy fallback.This PR is based directly on
refactor-compute-providers. The Lambda MicroVM implementation remains out of scope for a separate PR.Test Plan
yarn install --immutable.libs/compute-providers,functions/webhook/src, and the affected control-plane tests.ncc.git diff --check.Related Issues
Related to #5252.