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 and find the relevant files.
Assistant
Let me see the full service file including the middle part that was truncated, and the model files.
Assistant
Now let me look at the model files for Listener and LoadBalancer to understand the attributes structure.
Assistant
Now let me look at the QueryHandler to understand how actions are dispatched and the existing attribute handlers.
Assistant
Let me see the middle part of the QueryHandler that I missed (target group attributes, listener handlers).
Assistant
Now let me look at the rest of the handler including the XML builders (listenerXml, loadBalancerXml).
Assistant
Now let me look at the integration test to understand testing patterns.
Assistant
Now let me check the build system and how to compile/run tests.
Assistant
Let me check the Java version available and verify the project compiles.
Assistant
Compilation succeeds. Now let me run the existing ELBv2 integration tests to ensure they pass before I make changes.
Assistant
All 27 tests pass. Now I have a complete understanding of the codebase. Let me look at the exact insertion points in the service file.
Assistant
Now I'll implement the changes. First, let me add the
describeCapacityReservationmethod aftermodifyLoadBalancerAttributesin theservice.Assistant
Let me use the
editcommand instead. First, let me open the service file.Assistant
Now let me find the
modifyListenermethod to add listener attributes methods after it.Assistant
Now let me add the listener attributes methods after
modifyListener(after line 406).Assistant
The edit introduced a duplicate
return listener;and a duplicate comment. Let me fix that.Assistant
I need to add a blank line after the Rules comment. Let me fix that.
Assistant
Now I need to add the
CapacityReservationrecord. Let me find the end of the class.Assistant
Now let me add the
CapacityReservationrecord as a public nested static record just before the closing brace of the class.Assistant
The service changes are done. Now let me update the
ElbV2QueryHandler.javato add the three new action cases and handler methods. First, let me add the action cases to the switch.Assistant
Let me view the full switch block to find the best place to add the new cases.
Assistant
Now let me add the new cases to the switch. First, the Load Balancers section to add
DescribeCapacityReservation.Assistant
Let me use the
editcommand with line ranges instead.Assistant
Now let me add the listener attribute cases to the Listeners section.
Assistant
Now I need to add the handler method implementations. Let me find the locations for
handleSetIpAddressType(Load Balancers section) andhandleModifyListener(Listeners section).Assistant
Now let me add the
handleDescribeCapacityReservationmethod afterhandleSetIpAddressType(lines 250-252).Assistant
Now let me add the listener attributes handlers after
handleModifyListener. Let me find its new location.Assistant
Now let me compile the project to verify everything compiles.
Assistant
Compilation succeeds. Now let me run the existing ELBv2 integration tests to ensure nothing broke.
Assistant
All 27 tests pass. Now let me write a temporary test to verify the new functionality works end-to-end. I'll create it in a temp location and delete it afterward.
Assistant
Most tests pass. The one failure is just a test-assertion nuance—RestAssured returns empty string
""(notnull) for missing XML elements. Let me verify the actual XML response to confirm the implementation is correct.Assistant
The XML response is correct—an empty
CapacityReservationelement (null fields omitted), matching the issue's expectation. The test failure was just a RestAssured nuance (returns""notnullfor missing elements). Let me fix the temp test assertion and re-run to confirm everything passes.Assistant
The value
<>is RestAssured's representation of a genuinely-absent element (neithernullnor""). This confirms the implementation is correct—the fields are omitted when null. Let me adjust the assertion toemptyOrNullString()and re-run to fully confirm.Assistant
The
<>is a GPath representation of an empty element that's tricky to match. The implementation is verified correct via the dump test. Let me simplify the test to verify structure differently and confirm all pass.Assistant
The XPath fails only because of the XML default namespace (GPath handles namespaces, XPath without namespace context doesn't). The XML is confirmed correct. Let me use a string-contains assertion for test 6.
Assistant
All 8 temporary tests pass, confirming:
DescribeListenerAttributesreturns empty attributes by default ✓ModifyListenerAttributesmerges attributes and echoes them ✓DescribeListenerAttributesreads back modified attributes ✓DescribeListenerAttributeson non-existent listener returnsListenerNotFound✓DescribeCapacityReservationreturns an emptyCapacityReservation(null fields) by default ✓DescribeCapacityReservationon non-existent LB returnsLoadBalancerNotFound✓- Unsupported actions still error ✓
Now let me clean up the temporary test files and run the full ELBv2 test suite plus the lambda target test to ensure nothing is broken.
Assistant
All 36 tests pass. Let me verify how ELBv2 requests are routed to ensure the AWS CLI (which may use query or JSON protocol) reaches my handler. Let me check the controller/dispatch.
Assistant
Let me look at the controller's dispatch logic to confirm action/form params parsing.
Assistant
The routing confirms ELBv2 uses the Query protocol via
AwsQueryController, readingActionfrom form params — exactly what the AWS CLI sends for elbv2. My handlers follow the same pattern as the existing, working attribute handlers (ModifyLoadBalancerAttributes, etc.).Let me do a final review of my complete diff.
Assistant
The diff is clean and complete. Let me do a final verification: compile everything (including tests) and run the ELBv2 tests once more.
Assistant
All compilation and tests pass. Let me confirm there are no leftover temp files and that git status only shows my intended changes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.