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
Let me start by exploring the repository structure to understand the codebase and then find the relevant files mentioned in the issue description.
The issue is about implementing two missing AWS ELBv2 API actions in Floci:
DescribeListenerAttributesDescribeCapacityReservation
Let me explore the repository structure first.
Assistant
Let me find the ELBv2 related files.
Assistant
Let me examine the key files: ElbV2Service.java, ElbV2QueryHandler.java, and the test files.
Assistant
Let me try using the cat command to view the file.
Assistant
Let me look at the ElbV2QueryHandler.java to see the action switch
Assistant
Let me look at the models to understand data structures.
Assistant
Let me look at the LoadBalancer and Listener models to understand their current attributes handling.
Assistant
Sorry, I need to do one at a time.
Assistant
Good. I see the LoadBalancer has an
attributesmap. Now let me check the Listener model:Assistant
Let me look at the target group attributes handling in the Query
Assistant
Let me see the target group attributes handlers and the service
Assistant
Now let me see the service's target group attribute methods:
Assistant
Let me see lines 273-282 of the service to see how target group attributes are
Assistant
Now let me look at how the LoadBalancer describeAttributes and modify are handled in the QueryHandler (for reference
Assistant
Now let me check the integration test to understand the testing approach
Assistant
Let me also check the TargetGroup model:
Assistant
Now I have a clear understanding of the codebase. Let me implement the changes.
First, let me create the
CapacityReservationmodel class:Assistant
Now let me add the service methods to ElbV2Service.java. Let me first find where to add them
Assistant
Let me look at the end of ElbV2Service to find the right place to add
Assistant
Let me see the area after the listener certificates section:
Assistant
Now I'll add the new methods to ElbV2Service.java. I'll insert them after
describeListenerCertificatesand before the Helpers section.Assistant
Let me open the file first and navigate to the area
Assistant
Now I can edit. Let me replace the
// ── Helpers ──section header with the new methodsAssistant
Now I need to add the import for
CapacityReservationin the service file. Let me check the importsAssistant
Good, the wildcard import covers the new model class. Now let me update the ElbV2QueryHandler.java. Let me open it
Assistant
Let me see lines 100-115 to see the rest of the switch:
Assistant
Now let me add the cases in the switch statement. I'll add them after `DescribeListenerCertificates
Assistant
Now let me add the handler methods. Let me find the listener certs handlers to add after them
Assistant
Let me see around line 740 and what follows the describeListenerCertificates handler:
Assistant
Now I'll add the handler methods after
handleDescribeListenerCertificatesand before the XML builders section:Assistant
I see there's a duplicate line from the previous edit. Let me look at the issue and fix it:
Assistant
I need to remove the stale lines 756-757. Let me fix this
Assistant
There's a duplicate comment. Let me fix it:
Assistant
Good, looks clean now. Let me clean up the extra blank lines
Assistant
I still see duplicate comments at 757-758. Let me use sed to fix that
Assistant
Let me verify the fix is clean:
Assistant
Let me verify the whole section looks clean now:
Assistant
Now let me verify the switch statement looks correct:
Assistant
The changes look correct. Now let me try to compile/build the project to check for errors:
Assistant
The project compiles successfully. Now let me run the existing integration tests to make sure nothing is broken
Assistant
All 27 tests pass. Let me verify my changes with git diff
Assistant
Let me also check the new model file shows up:
Assistant
Let me check the spacing in the service file around the inserted code:
Assistant
Let me check the formatting convention used elsewhere in the file:
Assistant
I need to fix a small formatting issue - add a blank line before the section header:
Assistant
Let me open the service file and navigate to the right line
Assistant
Let me fix the blank line before the section header
Assistant
Now let me also clean up the extra blank lines in the QueryHandler:
Assistant
Let me verify the final state and recompile
Assistant
Let me run the tests once more to confirm everything still passes
Assistant
All tests pass. Let me see the final diff to make sure everything is
Assistant
I notice there's a formatting issue in the QueryHandler - the
// ── Listener Attributes ──comment doesn't have a blank line before it. Let me fix that:Assistant
Let me fix the QueryHandler formatting - add blank line before the section header
Assistant
Let me fix the spacing at line 754-
Assistant
Now let me do a final compile and test run to confirm everything is good
Assistant
Everything works. Let me verify the CapacityReservation model file
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.