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 understanding the repository structure and then find the relevant files to implement the fix. The issue is about adding support for
DescribeListenerAttributes,ModifyListenerAttributes, andDescribeCapacityReservationin the ELBv2 service.Let me explore the repository structure first.
Assistant
Let me find the ELBv2 related files specifically
Assistant
Let me examine the key files. First, the query handler where the action switch lives
Assistant
The open command doesn't take FILE as a parameter. Let me use the proper syntax.
Assistant
Let me use the bash_terminal command to open the file and view it.
Assistant
Now let me look at the ElbV2Service.java to understand the existing patterns.
Assistant
Let me see the full ElbV2Service.java - it was truncated. Also let me check the Listener model.
Assistant
Let me check the Listener model first
Assistant
Now let me check the LoadBalancer model
Assistant
Let me get the full ElbV2Service.java (it was truncated). Let me view the rest of the file
Assistant
Let me view the full file.
Assistant
Let me see the Listener-related portion (truncated section
Assistant
Now let me look at the existing test file to understand test patterns.
Assistant
Let me check the model directory for existing models and check if there's already a CapacityReservation
Assistant
Let me look at the full ElbV2QueryHandler.java, specifically the listener-related handlers
Assistant
Now I have a good understanding of the codebase. Let me now implement the changes:
- Create a
CapacityReservationmodel class - Add
capacityReservationfield toLoadBalancer - Add
describeListenerAttributes,modifyListenerAttributes, anddescribeCapacityReservationmethods toElbV2Service - Add the three handler methods and switch cases to
ElbV2QueryHandler
Let me start with the CapacityReservation model
- Create a
Assistant
Now let me add the
capacityReservationfield to `LoadBalancer.javaAssistant
Now let me add the capacityReservation field to LoadBalancer.java
Assistant
Now let me add the three methods to ElbV2Service.java. First let me add
describeListenerAttributesandmodifyListenerAttributesafter the listener methods (around line 383), anddescribeCapacityReservationafter the load balancer methods (around line 162).Let me first add
describeCapacityReservationafter the existing load balancer attributes methods:Assistant
Now let me add the
describeCapacityReservationmethod to ElbV2Service.java after `setIpAddressTypeAssistant
Let me verify the change was
Assistant
Now let me add the listener attribute methods. Let me find where modifyListener ends
Assistant
Let me see around line 400 to find where modify
Assistant
Now let me add the listener attribute methods between modifyListener and Rules section
Assistant
Let me verify
Assistant
Now let me add the switch cases and handler methods to ElbV2QueryHandler.java. Let me first see the full switch statement to find where to add the
Assistant
Now let me add the switch cases and handler methods to ElbV2QueryHandler.java.
First, let me add the case for
DescribeCapacityReservationnear the Load Balancer cases:Assistant
Let me verify the switch cases look correct now
Assistant
Let me fix the ordering to be cleaner. Let me move the comment back above DescribeCapacityReservation
Assistant
Let me check the current
Assistant
Let me fix the double
Assistant
Wait, but now the "// Target Groups" comment is above DescribeCapacityReservation and before CreateTargetGroup. Actually the original was:
- line 75: // Target Groups
- line 76: case "CreateTargetGroup"
And I inserted at line 75 so now:
- line 75: case "DescribeCapacityReservation"...
- line 76: // Target Groups
- line 77: case "CreateTargetGroup"
Actually no, I did
sed -i '75a\...'which inserts AFTER line 75. So the original line 75 was the last case in Load Balancers section (SetIpAddressType). Then line 76 was// Target Groups. So inserting after line 75 gives:- line 75: case "SetIpAddressType" -> ...
- line 76: case "DescribeCapacityReservation" -> ... (new)
- line 77: // Target Groups (original line 76)
- ...
Then I did
sed -i '76s/\/\/ Target Groups//'which removed the comment from line 76 (now DescribeCapacityReservation), thensed -i '76a\ // Target Groups'which added the comment AFTER line 76. So:- line 76: case "DescribeCapacityReservation" -> ...
Assistant
I've made some messy edits. Let me restore from git and do it cleanly.
Assistant
Let me now look at the exact switch statement lines to know precisely where to
Assistant
Now I'll do precise edits. First, add the switch cases
Assistant
Now add the listener attribute cases after ModifyListener (which shifted to line 87
Assistant
Let me verify the switch
Assistant
Now I need to add the handler methods. Let me find where to place them
Assistant
Let me see the area between handleDescribeLoadBalancerAttributes and handleSetSecurityGroups
Assistant
Now let me insert handleDescribeCapacityReservation after line 213 (end of handleDescribeLoadBalancerAttributes) and before handleSetSecurityGroups
Assistant
Now let me insert the listener attribute handlers. Let me find where handleModifyListener
Assistant
Let me see the end of handleModifyListener
Assistant
Now let me insert the listener attribute handlers between end of handleModifyListener and the Rules section
Assistant
Let me verify the changes by checking the key
Assistant
Let me check the imports in ElbV2QueryHandler.java to see if CapacityReservation import
Assistant
Good, the wildcard import covers it. Now let me build and run the tests to make sure everything compiles
Assistant
Good, compilation succeeds. Now let me run the ELBv2 integration tests
Assistant
All 27 existing tests pass. Now let me write a quick test to verify the new API actions work (instead of returning UnsupportedOperation
Assistant
Let me debug step by
Assistant
Good, the compilation passes and all 27 tests pass. Let me also run the Lambda target integration test to make sure nothing is broken
Assistant
All tests pass. Let me review the final state of all my
Assistant
Let me check git status to see the new file
Assistant
Let me view the full diff
Assistant
I notice a couple of minor formatting issues. Let me fix them
Assistant
Let me check the formatting around the new handler
Assistant
Let me fix the missing
Assistant
Let me check the ElbV2Service.java
Assistant
Let me check the line after
Assistant
Let me add the blank line for consistency
Assistant
Let me rebuild to make sure everything still compiles
Assistant
Let me run the tests one more time to make sure everything still works
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.