Skip to content

feat(elbv2): scaffold Elastic Load Balancing v2 — LoadBalancers + Tags#746

Merged
vieiralucas merged 5 commits intomainfrom
worktree-elbv2-batch1
Apr 25, 2026
Merged

feat(elbv2): scaffold Elastic Load Balancing v2 — LoadBalancers + Tags#746
vieiralucas merged 5 commits intomainfrom
worktree-elbv2-batch1

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 25, 2026

Summary

First batch of ELBv2 (Application/Network/Gateway Load Balancer) support — picks up the Wave 4 roadmap slot after ECR + ECS shipped.

  • New crate fakecloud-elbv2 wired into server under SigV4 service elasticloadbalancing. Wire protocol: AWS Query, XML responses (matching real ELBv2).
  • 12 ops shipped this batch: CreateLoadBalancer, DescribeLoadBalancers, DeleteLoadBalancer, SetSubnets, SetSecurityGroups, SetIpAddressType, ModifyIpPools, AddTags, RemoveTags, DescribeTags, DescribeAccountLimits, DescribeSSLPolicies.
  • All 3 LB types (application, network, gateway) — ARN prefix matches AWS conventions (app/, net/, gwy/); idempotent CreateLoadBalancer; cascade-delete listeners/rules on DeleteLoadBalancer; tags routing across every taggable resource.
  • Smithy-exact validation: 1–32 char name, alphanumeric + hyphens, internal- prefix rejection, Type/Scheme/IpAddressType enum constraints — returns ValidationError with the AWS-shaped error envelope.

Introspection

  • GET /_fakecloud/elbv2/load-balancers
  • GET /_fakecloud/elbv2/target-groups
  • GET /_fakecloud/elbv2/listeners
  • GET /_fakecloud/elbv2/rules

SDKs

  • TypeScript: Elbv2Client (fc.elbv2.getLoadBalancers() etc.)
  • Python: Elbv2Client + _SyncElbv2Client + dataclass types
  • Go/PHP/Java/Rust SDKs land alongside the next batch (ops they introspect aren't shipped yet)

Docs

  • README service table + LocalStack comparison row
  • website/content/local-elb.md landing page
  • website/static/llms.txt updated
  • Conformance audit map gains elasticloadbalancing + ECR/ECS entries

Roadmap

Subsequent batches: target groups + targets + health, listeners + rules, attributes + trust stores + capacity reservations, real in-process HTTP routing + ECS auto-register-target.

Test plan

  • cargo test -p fakecloud-elbv2 — 7 unit tests pass
  • cargo test -p fakecloud-conformance --test elbv2 — 12 Smithy-checksum-validated tests pass
  • cargo build --tests workspace clean
  • cargo clippy --workspace --all-targets -- -D warnings clean
  • cargo fmt --all -- --check clean

Summary by cubic

Adds first batch of ELBv2 support (ALB/NLB/GWLB) for Load Balancers and Tags under SigV4 elasticloadbalancing. Ships 12 core ops with Smithy-accurate validation, SDKs, and introspection.

  • New Features

    • New crate fakecloud-elbv2 (AWS Query, XML) wired into the server.
    • 12 ops: Create/Describe/Delete LoadBalancers; SetSubnets/SecurityGroups/IpAddressType; ModifyIpPools; Add/Remove/DescribeTags; DescribeAccountLimits/SSLPolicies.
    • Supports application, network, gateway types with correct ARN prefixes (app/, net/, gwy/); idempotent create; cascade-delete listeners/rules.
    • Strict validation (name rules, internal- prefix, enum constraints) returning AWS-shaped ValidationError.
    • Introspection: /_fakecloud/elbv2/{load-balancers,target-groups,listeners,rules}.
    • SDKs: TypeScript and Python Elbv2Client + types; testkit elbv2_client(); conformance wired via aws-sdk-elasticloadbalancingv2.
    • Tests/Docs/Models: 12 conformance tests + 7 unit; README service table updated; website/content/local-elb.md; added aws-models/elasticloadbalancingv2.json + service-map entry.
  • Bug Fixes

    • Enforce IpAddressType validation in CreateLoadBalancer and SetSubnets via a shared helper (was only in SetIpAddressType).
    • Python SDK: ruff fixes and formatting in Elbv2Client code.
    • Docs: update website/static/llms.txt headline counts to 26 services / 1,810 ops.
    • Rust: format validate_ip_address_type helper.

Written for commit 0d472ab. Summary will update on new commits.

First batch of ELBv2 (Application/Network/Gateway Load Balancer) support.

- New crate `fakecloud-elbv2` wired into server registry under SigV4 service
  name `elasticloadbalancing` (Query protocol, XML responses).
- 12 ops: CreateLoadBalancer, DescribeLoadBalancers, DeleteLoadBalancer,
  SetSubnets, SetSecurityGroups, SetIpAddressType, ModifyIpPools, AddTags,
  RemoveTags, DescribeTags, DescribeAccountLimits, DescribeSSLPolicies.
- Real Smithy validation: name length/chars, internal- prefix rejection,
  Type/Scheme/IpAddressType enums; idempotent CreateLoadBalancer matching
  AWS's documented behavior; cascade-delete listeners/rules on
  DeleteLoadBalancer.
- Introspection endpoints: /_fakecloud/elbv2/{load-balancers,target-groups,
  listeners,rules}.
- TS + Python SDKs: Elbv2Client + dataclass types.
- 12 conformance tests with Smithy shape checksums + 7 unit tests.
- aws-models/elasticloadbalancingv2.json + service-map entry.
- README + website /local-elb/ landing page + llms.txt updates.
- Subsequent batches: target groups, listeners, rules, attributes/trust
  stores, real HTTP routing, ECS auto-register.
@vieiralucas vieiralucas force-pushed the worktree-elbv2-batch1 branch from aab10ef to dd06d02 Compare April 25, 2026 11:54
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 26 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="website/static/llms.txt">

<violation number="1" location="website/static/llms.txt:8">
P3: The updated service list now includes 26 services, but the nearby headline still says 23 services / 1,680 operations, so this section is internally inconsistent.</violation>
</file>

<file name="crates/fakecloud-elbv2/src/service.rs">

<violation number="1" location="crates/fakecloud-elbv2/src/service.rs:439">
P2: Validate `IpAddressType` in `CreateLoadBalancer`; invalid values are currently accepted and stored.</violation>

<violation number="2" location="crates/fakecloud-elbv2/src/service.rs:658">
P2: `SetSubnets` should validate `IpAddressType` before updating state.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread crates/fakecloud-elbv2/src/service.rs
Comment thread crates/fakecloud-elbv2/src/service.rs
Comment thread website/static/llms.txt
…txt counts

- CreateLoadBalancer / SetSubnets now reject invalid IpAddressType up-front via shared validate_ip_address_type helper (was already enforced in SetIpAddressType only).
- llms.txt headline updated from 23 services / 1,680 ops to 26 / 1,810 to match the post-ELBv2 service list directly below it.
@vieiralucas vieiralucas merged commit 8ffaf1b into main Apr 25, 2026
26 checks passed
@vieiralucas vieiralucas deleted the worktree-elbv2-batch1 branch April 25, 2026 12:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

❌ Patch coverage is 57.86273% with 485 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/fakecloud-elbv2/src/service.rs 67.51% 305 Missing ⚠️
crates/fakecloud-server/src/introspection.rs 0.00% 93 Missing ⚠️
crates/fakecloud-server/src/main.rs 0.00% 74 Missing ⚠️
crates/fakecloud-elbv2/src/state.rs 62.85% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant