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
I'll explore the repository structure first.
Assistant
Let me explore the ELBv2 service files.
Assistant
Let me see the truncated middle part of the file (the target group attributes and listener sections).
Assistant
Now let me look at the ElbV2QueryHandler to understand the action switch.
Assistant
Let me see the middle truncated part of the QueryHandler - specifically the listener handlers and the part around the target group attributes handlers.
Assistant
Now let me look at the Listener and LoadBalancer model classes to understand their structure.
Assistant
The Listener model already has an
attributesfield. Now let me look at the LoadBalancer model.Assistant
Now let me look at the existing integration test to understand testing patterns.
Assistant
No existing references. Let me look at the integration test to understand patterns and how they invoke actions.
Assistant
Now I have a clear understanding. Let me look at the exact end of the
modifyListenermethod to add the listener attribute methods there.Assistant
I now have all the context I need. Let me implement the changes. First, I'll add the listener attribute methods to
ElbV2Service.javaright after themodifyListenermethod.Assistant
Now let me add the listener attribute methods after the
modifyListenermethod (after line 399):Assistant
The listener attribute methods are added. Now let me add the
describeCapacityReservationmethod and theCapacityReservationrecord. Let me find thesetIpAddressTypemethod.Assistant
Now let me add the
describeCapacityReservationmethod aftersetIpAddressType(line 161):Assistant
Now let me add the
CapacityReservationrecord. Let me add it near the top of the class, after the fields declaration.Assistant
Let me add the
@RegisterForReflectionannotation to the record for consistency with other model classes:Assistant
The replace tool needs the SEARCH marker on its own line and the REPLACE marker on its own line. Let me use the proper format.
Assistant
The ElbV2Service changes are complete. Now let me update the
ElbV2QueryHandler.javato add the switch cases. Let me view the switch statement.Assistant
Now let me add the new switch cases. First the
DescribeCapacityReservationin the Load Balancers section:Assistant
Now let me add the listener attribute cases in the Listeners section:
Assistant
Now let me add the handler methods. First, let me find the
handleSetIpAddressTypemethod to addhandleDescribeCapacityReservationafter it.Assistant
Now let me add the
handleDescribeCapacityReservationmethod afterhandleSetIpAddressType:Assistant
Now let me add the listener attribute handler methods. Let me find the
handleModifyListenermethod.Assistant
Now let me add the listener attribute handler methods after
handleModifyListener:Assistant
Let me check whether there's a JSON handler for ELBv2 in addition to the Query handler.
Assistant
ELBv2 uses the Query protocol via
AwsQueryController, so my changes are in the right place. Now let me verify the imports in the QueryHandler are correct.Assistant
ElbV2Serviceis in the same package so no import is needed. Now let me compile the project to verify the changes.Assistant
Compilation succeeded. Now let me create a temporary test to reproduce and verify the fix. Let me check the test setup first.
Assistant
Now let me create a temporary test to reproduce and verify the fix, mirroring the existing integration test approach.
Assistant
The output was truncated. Let me check the test results.
Assistant
All 7 tests pass, confirming the fix works and the
UnsupportedOperationerror is gone. Now let me run the existing ELBv2 integration tests to ensure I didn't break anything.Assistant
All existing tests pass. Let me also run the Lambda target integration test for ELBv2 to be thorough.
Assistant
All tests pass. Now let me remove the temporary test file before submitting.
Assistant
Let me review the final diff to make sure everything is clean.
Assistant
The diff is clean and complete. Let me verify there are no leftover temp files and that the
application.yml.bakwarning isn't from my changes (it's a build artifact in target).Assistant
No leftover files. The temp test is removed. Let me do a final compile to confirm everything builds cleanly after removing the temp test.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.