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
I'll start by exploring the repository structure to understand the codebase, then find and fix the relevant ELBv2 handler code.
Assistant
Let me look at the Listener model and the ElbV2QueryHandler to understand the structure:
Assistant
I need to make only one tool call at a time. Let me look at the Listener model first:
Assistant
Good, the Listener model already has an
attributesmap. Now let me look at the LoadBalancer model:Assistant
Now let me look at the ElbV2QueryHandler to find the action switch:
Assistant
The output was truncated. Let me view the relevant handler sections - particularly the listener and target group attribute handlers, and check what's already there. Let me look at the describe/modify target group attribute handlers and the listener creation to understand patterns:
Assistant
Let me view the existing target group attribute handlers and the listener handlers in detail (lines 346-475):
Assistant
Now let me check the ElbV2Service for the existing target group attribute methods and listener methods to understand the pattern:
Assistant
Let me view the target group attribute methods and the listener methods in the service:
Assistant
Now I have a clear understanding of the patterns. Let me look at the existing tests to understand testing conventions:
Assistant
Let me check how the app is built and run tests:
Assistant
Now let me check if the project compiles before I make changes:
Assistant
The project compiles. Now let me check the existing test setup to understand how tests run:
Assistant
Let me view the
listenerXmlmethod and theloadBalancerXmlto understand XML formatting patterns:Assistant
Let me check the XmlBuilder class to understand the
elemmethod behavior with nulls:Assistant
I now have all the context. Let me make the changes. First, let me add the three methods to
ElbV2Service.java. Let me open the file at the right location:Assistant
Now let me add the listener attribute methods and capacity reservation method. I'll add the listener attribute methods after the
modifyListenermethod (before the Rules section):Assistant
Let me use the replace command to add the listener attribute methods:
Assistant
No python available. Let me use the editor's
editcommand. First open the file:Assistant
Now let me add the listener attribute methods and capacity reservation method after
modifyListener:Assistant
Now let me add the
CapacityReservationrecord. Let me view the class declaration area:Assistant
I'll add the
CapacityReservationrecord as a nested public record inside the class. Let me open that area and add it:Assistant
Now let me add the
CapacityReservationrecord right after the class declaration:Assistant
I see a duplicate
@ApplicationScopedwas introduced. Let me fix it:Assistant
There's a duplicate
ElbV2DataPlane dataPlane;line. Let me fix it:Assistant
The
ElbV2Service.javalooks good now. Let me verify the new methods are in place:Assistant
The service changes are in place. Now let me update the
ElbV2QueryHandler.java. First, the switch cases:Assistant
Now let me add the new switch cases. I'll add
DescribeListenerAttributesandModifyListenerAttributesafterModifyListener, andDescribeCapacityReservationafter the LoadBalancer attributes:Assistant
Now let me add the
DescribeCapacityReservationcase after the LoadBalancer attributes line:Assistant
Now let me add the handler methods. Let me find the
handleDescribeLoadBalancerAttributesmethod location:Assistant
Now let me add the
handleDescribeCapacityReservationmethod afterhandleDescribeLoadBalancerAttributes:Assistant
Now let me add the
handleDescribeCapacityReservationmethod afterhandleDescribeLoadBalancerAttributes:Assistant
Let me fix the missing blank line between the new method and
handleSetSecurityGroups:Assistant
Now let me add the listener attribute handlers. Let me find the
handleModifyListenermethod to add them after:Assistant
Now let me add the listener attribute handlers after
handleModifyListener(after line 492):Assistant
All the changes look good. Now let me compile to make sure everything is correct:
Assistant
Compilation succeeded. Now let me write a reproduction/test script to verify the behavior end-to-end. Let me first check how the integration tests run and the test resource setup:
Assistant
Now let me run the existing ELBv2 integration tests to confirm they still pass with my changes:
Assistant
All 27 existing tests pass. Now let me create a temporary reproduction test to verify the new actions work end-to-end. Let me first check the test setup details:
Assistant
Now let me create a temporary reproduction test to verify the new actions end-to-end. I'll place it in the test package:
Assistant
The implementation works — the only failure is a test-assertion detail: RestAssured returns empty string rather than
nullfor absent XML elements. Let me verify the actual XML response is correct by capturing it:Assistant
The XML response is exactly correct — empty
CapacityReservationelement with all fields omitted. The test assertion just needs to use empty-string matching for absent XML elements. Let me fix the temporary test and rerun:Assistant
This is purely a RestAssured XML-path quirk for nested non-existent elements — the raw XML dump already confirmed the response is exactly correct (
<CapacityReservation></CapacityReservation>). Let me make the temporary test assertions robust using the raw body:Assistant
The perl failed. Let me just rewrite that section directly with the edit command. Let me view the current lines:
Assistant
The capacity reservation part now passes. The remaining failure is the same RestAssured quirk for the empty listener attributes (path returns empty, not null). Let me fix that assertion:
Assistant
The reproduction test passes — all the new actions work end-to-end:
DescribeListenerAttributesreturns empty attributes by defaultModifyListenerAttributessets attributesDescribeListenerAttributesreflects the set attributesDescribeCapacityReservationreturns an emptyCapacityReservationelement- Edge cases: non-existent listener →
ListenerNotFound, non-existent LB →LoadBalancerNotFound
Now let me clean up the temporary test files and verify the existing tests still pass:
Assistant
Now let me run the full ELBv2 test suite once more to make sure nothing is broken:
Assistant
All 36 ELBv2 tests pass. Let me also check the SDK compatibility test file to ensure my changes align with what it expects:
Assistant
The SDK compatibility tests don't test these new actions. Let me do a final review of all my changes with git diff:
Assistant
The diff looks clean and complete. Let me verify no temporary files remain:
Assistant
Only the two source files are modified, and all temporary test files have been removed. Let me do a final compile to confirm everything builds cleanly:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.