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 analyze the issue. The bug is that ELBv2's
DescribeListenerAttributesandDescribeCapacityReservationactions returnUnsupportedOperationbecause they're not implemented in Floci. I need to:- First, explore the repository structure to understand how it's organized
- Look at the existing ELBv2 handler to understand the patterns used
- Implement the missing actions:
DescribeListenerAttributes,ModifyListenerAttributes, andDescribeCapacityReservation - Test the changes
Let me start by exploring the repository.
Assistant
Let me look at the key files to understand the existing patterns:
- ElbV2Service.java - the service where I need to add the new functions
- ElbV2QueryHandler.java - the handler that routes actions to the service
Assistant
The issue is that
openis trying to execute the file. I need to use the correct syntax.Assistant
Let me try a different approach - I'll use
catto read the files:Assistant
Now let me look at the ElbV2Service.java file:
Assistant
Now let me look at the model classes to understand the data structures:
Assistant
Now I need to understand:
- The Listener model already has an
attributesfield (Map<String, String>) - great! - I need to check the LoadBalancer model for capacity reservation
Let me check the LoadBalancer model to see if it has capacityReservation field or similar.
- The Listener model already has an
Assistant
Now let me look at the existing integration tests to understand test patterns:
Assistant
Now let me check the SDK test to understand expected API formats:
Assistant
Assistant
Let me run the command properly.
Assistant
Now I have a clear understanding of the codebase. Let me implement the missing features:
- DescribeListenerAttributes and ModifyListenerAttributes - for listener attributes
- DescribeCapacityReservation - for load balancer capacity reservation state
I need to:
- Add a
CapacityReservationmodel class - Add methods to
ElbV2Service - Add handlers to
ElbV2QueryHandler
Let me start by creating the CapacityReservation model:
Assistant
Now let me add the new service methods to
ElbV2Service.java. I'll add them after the Listener Certificates section:Assistant
I need to find where to add the new methods. Let me look at the exact lines where I need to insert the new methods.
Assistant
I need to add the new methods after
describeListenerCertificatesand beforeHelpers. Let me see the exact lines to understand where to insert.Assistant
The error is because
seduses:as a range separator. I should usesed -n '633,640p'instead.Assistant
I need to add the new service methods after
describeListenerCertificates(ending at line 636) and beforeHelpers(line 638). I'll use the edit command to insert the new code.Assistant
Let me use bash to insert the code properly:
Assistant
The user has not said anything new. I need to continue with my task. I'm in the middle of implementing the ELBv2 service methods. I was creating a temp file with the first part of the ElbV2Service.java file. Let me continue building the new file with the new methods inserted.
Assistant
I need to append the rest of the file (starting from line 638 which is the Helpers section) to complete the new file.
Assistant
I need to verify that the new file was created correctly, and then copy it back to replace the original file. Let me check the result.
Assistant
Good, the new methods are in place. Now let me copy it back and update the query handler:
Assistant
I need to update the ElbV2QueryHandler to handle the three new actions. Let me see the exact location in the switch statement where I need to add the new cases.
Assistant
Now I need to add the three new action cases to the switch statement and the corresponding handler methods. Let me first add the cases to the switch:
Assistant
Let me use sed to modify the query handler file:
Assistant
Let me use a different approach with sed to insert the new cases:
Assistant
Let me verify the sed command worked correctly:
Assistant
Let me fix the sed command syntax - I need to use
,for ranges andpfor print:Assistant
The switch cases are added correctly. Now I need to add the actual handler methods to the query handler. Let me find where to add them - after the existing listener handler methods:
Assistant
Let me look at what comes after handleModifyListener:
Assistant
I keep making the same mistake with sed ranges. Let me be careful with the syntax.
Assistant
The user hasn't sent a new message, so I need to continue with my current task. I was working on adding the handler methods to ElbV2QueryHandler.java. I need to:
- Find where to insert the new handler methods (after handleModifyListener and before the Rules section)
- Add the three handler methods for DescribeListenerAttributes, ModifyListenerAttributes, and DescribeCapacityReservation
Let me first find the right location and see what follows handleModifyListener.
Assistant
Let me fix the syntax and continue working on adding the handler methods.
Assistant
I need to insert the three new handler methods after line 468 and before line 470. Let me use sed to insert them:
Assistant
Let me verify the insertion was successful:
Assistant
The handler methods are added. Now I need to add the import for the
CapacityReservationmodel class. Let me check the current imports in the query handler:Assistant
The wildcard import already covers the new
CapacityReservationclass. Now let me try to build the project to verify everything compiles:Assistant
It's a Maven project. Let me try to compile it to verify the changes:
Assistant
The compilation succeeded. Let me verify the complete implementation by viewing the key parts of the modified files:
Assistant
Good, the model class is correct. Now let me verify the service methods:
Assistant
Let me verify the rest of the CapacityReservation method:
Assistant
Now let me run the existing ELBv2 tests to make sure nothing is broken:
Assistant
The tests completed successfully. Let me verify by running the tests with verbose output to confirm all tests passed:
Assistant
All 27 tests passed. Now let me create a simple test script to verify the new functionality works correctly:
Assistant
I was working on creating and running a test script to verify the new ELBv2 API functionality. The test script has been created at
/tmp/test_new_api.sh. Let me run it to verify 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.