ISSUE DESCRIPTION [BUG] ELBv2 DescribeListenerAttributes and DescribeCapacityReservation…
- User
ISSUE DESCRIPTION
[BUG] ELBv2 DescribeListenerAttributes and DescribeCapacityReservation return UnsupportedOperation (breaks @pulumi/aws refresh)
Service
ELBv2 (Elastic Load Balancing v2)
AWS API Action
DescribeListenerAttributesandDescribeCapacityReservationExpected behavior
DescribeListenerAttributesreturns the listener's attribute list (empty by default until attributes are set).DescribeCapacityReservationreturns the load balancer's capacity reservation status (empty/none when no capacity is reserved).
Both are normal management-plane reads that the AWS SDKs issue during resource refresh.
Actual behavior
Both actions return:
api error UnsupportedOperation: Action DescribeListenerAttributes is not supported. api error UnsupportedOperation: Action DescribeCapacityReservation is not supported.@pulumi/aws6.66.0+ (and recent Terraform AWS provider versions) call these two actions when refreshing existingLoadBalancer/Listenerresources. Because Floci returnsUnsupportedOperation, the provider errors out on refresh. The only workaround today is pinning@pulumi/awsto a version that predates these calls (e.g.6.30.0).ELBv2 is otherwise well supported in Floci — only these two read actions are missing from
ElbV2QueryHandler's action switch.Reproduction
# Assuming a load balancer + listener already exist (CreateLoadBalancer / CreateListener): aws --endpoint-url http://localhost:4566 elbv2 describe-listener-attributes \ --listener-arn arn:aws:elasticloadbalancing:us-east-1:000000000000:listener/app/my-lb/abc/def # -> UnsupportedOperation: Action DescribeListenerAttributes is not supported. aws --endpoint-url http://localhost:4566 elbv2 describe-capacity-reservation \ --load-balancer-arn arn:aws:elasticloadbalancing:us-east-1:000000000000:loadbalancer/app/my-lb/abc # -> UnsupportedOperation: Action DescribeCapacityReservation is not supported.Environment
- Floci version / image tag:
1.5.18(floci/floci:latest); also present on currentmain - AWS provider that triggers it:
@pulumi/aws6.66.0+ (works when pinned to 6.30.0) - How you're running Floci: Docker / Docker Compose
A PR implementing
DescribeListenerAttributes,ModifyListenerAttributes, and (mirroring the existing load balancer / target group attribute handlers) will reference this issue. Assistant
Listener already has
attributesfield. Now let's look at ElbV2QueryHandler to see how DescribeLoadBalancerAttributes / ModifyLoadBalancerAttributes are handled, to mimic for listener attributes and capacity reservation.Assistant
Now let's look at the DescribeListenerCertificates handler for reference on listener-related handling, plus the end of file for helpers like
parseAttributes,voidResponse,xmlError.Assistant
Now let's find
parseAttributes,voidResponse,safe, and check tests directory for reference expectations (compat tests / integration tests) to know expected element names for ListenerAttributes and CapacityReservation.Assistant
Now let's check the compatibility test file for potential hints on expected XML structure (ElbV2Test.java uses Java SDK, might call these methods directly).
Assistant
This is a Java SDK-based test - so the AWS SDK jar is available in the repository's local Maven repo (or Gradle cache) for the compatibility-tests module. Let's find the jar.
Assistant
Deps resolved. Let's find the jar and inspect the model classes.
Assistant
Now let's add the new methods after
describeListenerCertificatesand add theCapacityReservationrecord near top of class (after imports, before class body or as nested static record).Assistant
Now insert the
CapacityReservationrecord right after class opening line.Assistant
No python3 available; use
editcommand instead.Assistant
Now let's find and edit the Listener Certificates section to add the new methods after
describeListenerCertificates.Assistant
Missing blank line before Helpers section. Let's fix.
Assistant
Good. Now let's update ElbV2QueryHandler.java to add the new action cases and handler methods.
Assistant
Also add
DescribeCapacityReservationto the Meta section switch.Assistant
Now let's find the section where
handleDescribeListenerCertificatesis defined and add new handler methods after it, plus a handler for capacity reservation near ModifyListener or listener attributes area. Let's locate the listener certs handler section end and after it, before XML builders section.Assistant
Duplicate "XML builders" comment line - remove one.
Assistant
Good, this confirms my usage. Now let's build/compile the project to check for errors.
Assistant
Compiles successfully. Now let's run existing tests related to ELBv2 to make sure nothing broke.
Assistant
All 27 tests pass. Now let's write a quick reproduce script using curl to verify the new actions work end-to-end.
Assistant
All 6 test cases pass. Let's also verify the actual XML response structure by printing it directly.
Assistant
The XML shapes look correct and match the real AWS SDK model field names. Now let's actually test with the real AWS SDK client (ElasticLoadBalancingV2Client) to be certain the SDK can parse the response without errors — closest to real-world usage described in the issue.
Assistant
Good, it uses
FLOCI_ENDPOINTenv var, defaulting tohttp://localhost:4566presumably. Let's start floci in the background on port 4566 and run a small SDK test using the real client.Assistant
Server is running on port 4566. Now let's write and compile a small standalone Java program using the AWS SDK to hit these endpoints.
Assistant
Now let's use the actual AWS SDK Java client to verify parsing works end-to-end (matching the issue scenario).
Assistant
Excellent! The real AWS SDK client successfully calls
DescribeListenerAttributes,ModifyListenerAttributes, andDescribeCapacityReservationagainst Floci and parses the responses correctly. This confirms the fix resolves the exact issue described (refresh operations that use these actions). Now let's clean up: stop the dev server, remove temporary test files.Assistant
Now let's re-run the existing repository test suite for ELBv2 to make sure everything is clean, and also do a full project test run for the elbv2 module to be safe.
Assistant
All existing tests pass, and the temp test file has been removed (that surefire report was from a previous run and is now stale). Let's confirm the temp test file is gone and do a final full compile.
Assistant
Clean. Let's do one final full build to be safe, then also run the broader test suite quickly for the whole project (just compile+package to be sure nothing else broke, avoiding running all tests due to time).
Assistant
Let's view the final diff for review.
Assistant
The diff is clean and minimal. Let me run the full test suite one more time (broader scope, at least the elbv2 package + any tagging/related tests) to be extra sure, then finalize.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.