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:
codeapi 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
bash# 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. Assistant
Let me start by understanding the repository structure and the issue. The issue says that
DescribeListenerAttributesandDescribeCapacityReservationactions are not supported in the ELBv2 service. I need to add handlers for these actions.Let me first explore the repository structure to understand how it's organized and find the relevant files.
Assistant
Let me find the main source files, not just test files.
Assistant
Let me find the ELBv2 related files
Assistant
Let me examine the main files. Starting with the query handler and service files
Assistant
Let me use the open command correctly.
Assistant
Let me scroll down to see more of the switch statement and find where actions end
Assistant
Let me search for existing references to these missing
Assistant
Now let me look at ElbV2Service.java to understand the data model
Assistant
Let me scroll to see the load balancer attributes section and more of
Assistant
Let me look at the load balancer attributes and listener methods more closely
Assistant
Let me look at the listener methods in the
Assistant
Let me look at the model classes
Assistant
Let me read the Listener and LoadBalancer models
Assistant
Now let me see the LoadBalancer model
Assistant
Let me look at the existing describe target group attributes handler for the
Assistant
Let me read the target group attribute handlers to use as templates
Assistant
Let me see the rest of the query handler file, especially the XmlBuilder methods and
Assistant
Let me look at how handleDescribeTargetHealth works and get a broader view of the query handler
Assistant
Now I have a good understanding of the codebase. Let me plan the changes:
- Create a
CapacityReservationmodel class - Add
capacityReservationfield toLoadBalancermodel - Add
describeListenerAttributes,modifyListenerAttributes, anddescribeCapacityReservationmethods toElbV2Service - Add
DescribeListenerAttributes,ModifyListenerAttributes, andDescribeCapacityReservationcases and handler methods toElbV2QueryHandler
Let me first look at what the AWS API response for
DescribeCapacityReservationlooks like to model- Create a
Assistant
Now let me create the implementation. First, let me create the
CapacityReservationmodel classAssistant
Now let me create the
CapacityReservationmodel. Let me also check the exact AWS API response format by searching for any related patterns.Assistant
Let me write the CapacityReservation model class.
Assistant
Now let me add the
capacityReservationfield to theLoadBalancermodel.Assistant
Let me add the
capacityReservationfield to LoadBalancer model. First add the fieldAssistant
I accidentally removed the
attributesfield. Let me fix this by adding it back along wAssistant
Now add getter/setter for
capacityReservationinAssistant
Now let me add the methods to
ElbV2Service.java. Let me find the right location near the listener methods.Assistant
Let me find the exact line where listener methods end and where I should add the new methods.
Assistant
Let me add
describeListenerAttributesandmodifyListenerAttributesmethods before the Rules section. Let me find the exact insertAssistant
Let me use
replaceto add the listener attribute methods before the Rules sectionAssistant
Let me use goto and then edit directly on the right
Assistant
Now let me add the listener attribute methods before the Rules section
Assistant
I lost the Rules header comment. Let me fix that.
Assistant
Let me fix the formatting of line 411 to have the comment on its own line before
createRuleAssistant
Now let me add
describeCapacityReservationmethod aftermodifyLoadBalancerAttributes. Let me find the lineAssistant
Let me see the context around
modifyLoadBalancerAttributesfor tAssistant
Let me add
describeCapacityReservationaftermodifyLoadBalancerAttributesAssistant
I need to add a newline before
setSecurityGroups. Let me fix thatAssistant
Now let me update the
ElbV2QueryHandler.java. First let me add the switch cases.Assistant
Let me see the remaining switch cases and add the new ones. Let me first look at lines 100-114
Assistant
Let me add
DescribeCapacityReservationcase near the load balancer actions. First, add it after `SetIpAddressTypeAssistant
Now add
DescribeListenerAttributesandModifyListenerAttributesafter `ModifyListenerAssistant
Now I need to add the handler methods. Let me find where the load balancer handlers end and add
handleDescribeCapacityReservation.Assistant
Let me see the area after
handleSetIpAddressTypeto find where to insert the new methodAssistant
Let me add
handleDescribeCapacityReservationbefore the Target Groups sectionAssistant
Let me fix the missing newline before Target Groups section
Assistant
Now let me find
handleModifyListenerto add the listener attribute handlers after itAssistant
Let me look at the area after
handleModifyListenerwhere I should add the handlerAssistant
Now let me add the listener attribute handler methods before the Rules section
Assistant
I see the Rules section comment was lost again. Let me fix that
Assistant
Now let me verify that the code compiles. Let me first check the build system.
Assistant
Let me try compiling with M
Assistant
Code compiles successfully. Let me run the existing ELBv2 tests to make sure nothing is broken.
Assistant
Let me run the ELBv2 tests with more verbose output to confirm they pass
Assistant
All 27 ELBv2 tests pass. Let me also run the other ELBv2 test
Assistant
Let me also run the compatibility test for ELBv2
Assistant
Let me review all the changes I
Assistant
Let me check the untracked file too
Assistant
Let me review the full diff to ensure correctness
Assistant
Let me verify the formatting in ElbV2Service around the new
Assistant
Let me check the area around line 417 to see if the Rules section comment is properly formatted.
Assistant
I need to add a newline before the Rules section comment in ElbV2Service
Assistant
Let me switch to the ElbV2Service file to fix the missing newline before the Rules section comment
Assistant
Let me go to line 419 in ElbV2Service to fix the formatting
Assistant
Let me fix line 419-420 to add a newline between the method end and the comment
Assistant
Let me verify the CapacityReservation model file looks good
Assistant
Let me recompile and run the tests one more time to confirm everything works
Assistant
All tests pass. Let me now also verify the compatibility test for ELBv2 if possible. Let me first check what it tests
Assistant
Let me do a final review of all the changes by checking the git diff
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.