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 to understand the structure and locate the ELBv2 service implementation. Let's first check what files are in the repository.
- Assistant
Great! We have the relevant files. Let's examine the main files:
ElbV2QueryHandler.java- likely contains the action switch where we need to add the missing actions.ElbV2Service.java- contains the implementation of the service, where we need to add the new methods and possibly a record.
Let's first look at the query handler to see the current actions. We'll open it.
- Assistant
Let's scroll down to see the rest of the switch statement and understand the handler pattern.
- Assistant
Let's examine the ElbV2Service.java to understand the existing pattern for load balancer attributes and target group attributes:
- Assistant
Let's search for existing attribute handling patterns in the service:
- Assistant
Let's examine the Listener model class to see if it already has attributes:
- Assistant
Let me check the LoadBalancer model to understand how capacity reservation might be stored:
- Assistant
Now let's look at the existing handler for ModifyLoadBalancerAttributes and DescribeLoadBalancerAttributes to understand the pattern:
- Assistant
Let's look at the listener-related handlers:
- Assistant
Let's look at the relevant service methods for load balancer and target group attributes to understand the pattern:
- Assistant
Let me see the target group attributes methods:
- Assistant
Let me look at the existing listener methods to understand the pattern better:
- Assistant
Now let's check if there's already a
requireListenermethod likerequireLoadBalancerandrequireTargetGroup: - Assistant
Let me see the modifyListener method to understand how the handler pattern works:
- Assistant
Let me look at the handler methods for target group attributes to understand the XML structure:
- Assistant
Now I have a clear picture of what needs to be done. Let me start implementing the changes. First, I'll add the missing methods to
ElbV2Service.java. Let me check the end of the file to see where to add them: - Assistant
Now I'll implement the changes. Let me add the listener attribute methods to
ElbV2Service.javafirst: - Assistant
Now let me add the listener attribute methods to the service. I'll insert them after line 399:
- Assistant
I see there's a duplicate line. Let me revert and fix it:
- Assistant
Let me look at the context around line 398-401 more carefully:
- Assistant
Now let me add the listener attribute methods properly by inserting between line 399 and 401:
- Assistant
Good! Now I need to add the
CapacityReservationrecord anddescribeCapacityReservationmethod. First, let me add a capacity reservation field to the LoadBalancer model: - Assistant
Let me check what Java version the project uses:
- Assistant
I see the project uses Java records. Let me add a
capacityReservationfield to the LoadBalancer model: - Assistant
I see there's a duplicate constructor. Let me fix that and add getter/setter for capacityReservation:
- Assistant
There's still a duplicate. Let me revert and redo this properly:
- Assistant
Let me take a simpler approach. I'll create a
CapacityReservationrecord and add thedescribeCapacityReservationmethod to the service. First, let me add the record at the end ofElbV2Service.java: - Assistant
Now let me add the
CapacityReservationrecord anddescribeCapacityReservationmethod at the end of the class: - Assistant
Now I need to update the
ElbV2QueryHandler.javato add the handler cases and methods. Let me first check how the load balancer attributes are handled: - Assistant
Now let me add the handler cases to the switch statement. I need to add them to the listener section:
- Assistant
Now let me add the new action cases to the switch statement. I'll add them after the "ModifyListener" case:
- Assistant
Now I need to add the
DescribeCapacityReservationaction to the switch statement. Let me add it afterDescribeLoadBalancerAttributes: - Assistant
Now I need to add the handler methods. Let me find where the listener handler methods are:
- Assistant
Let me check where
handleModifyListenerends and the Rules section starts: - Assistant
Now let me add the handler methods for listener attributes after line 466:
- Assistant
Now I need to add the
handleDescribeCapacityReservationmethod. Let me find where the load balancer attribute handlers are: - Assistant
Now let me add the
handleDescribeCapacityReservationmethod afterhandleDescribeLoadBalancerAttributes: - Assistant
Now let me check if
ISO_FMTis already defined and accessible: - Assistant
Let me verify that the
parseAttributesmethod exists: - Assistant
Good! Now let me verify the changes compile by running a build:
- Assistant
Let me try a different approach:
- Assistant
The code compiles. Let me run the tests to verify nothing is broken:
- Assistant
Let me try running just the ELBv2 integration test:
- Assistant
Let me check if the test passed by looking at the full output:
- Assistant
Let me also run the ELBv2LambdaTargetIntegrationTest:
- Assistant
Let me also run the SDK compatibility test:
- Assistant
Now let me create a quick test script to verify the new functionality works:
- Assistant
Let me check if there are any reflection registrations needed:
- Assistant
Let me check if records in the service classes are typically registered:
- Assistant
Let me verify my changes by looking at the diff:
- Assistant
Let me look at the full diff to make sure everything is correct:
- Assistant
The changes look good. Let me run all the ELBv2 tests one more time to confirm everything works:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.