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, andDescribeCapacityReservation(mirroring the existing load balancer / target group attribute handlers) will reference this issue.Interface
Type: Function Name: describeListenerAttributes Path: src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2Service.java Input: region: String, arn: String Output: Map<String, String> Description: Returns a copy of the attributes map for the listener identified by the given ARN.
Type: Function Name: modifyListenerAttributes Path: src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2Service.java Input: region: String, arn: String, newAttrs: Map<String, String> Output: void Description: Merges the provided key-value pairs into the listener's existing attributes.
Type: Record Name: CapacityReservation Path: src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2Service.java Public API: CapacityReservation(Integer decreaseRequestsRemaining, Integer minimumCapacityUnits, Instant lastModifiedTime) Description: Stable representation of load-balancer capacity-reservation state. Floci returns null fields when no capacity is reserved.
Type: Function Name: describeCapacityReservation Path: src/main/java/io/github/hectorvent/floci/services/elbv2/ElbV2Service.java Input: region: String, arn: String Output: CapacityReservation Description: Validates the load balancer and returns its capacity-reservation state.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /floci, current file: none) bash-$
- Assistant
I'll start by exploring the repository structure and the existing ELBv2 service implementation to understand how similar handlers are built.
- Assistant
Let me look at the ElbV2Service and ElbV2QueryHandler to understand the existing patterns for attribute handlers.
- Assistant
Let me read the ElbV2Service.java and ElbV2QueryHandler.java files, focusing on attribute-related methods.
- Assistant
Let me search for attribute-related methods in ElbV2Service.
- Assistant
Need to use grep with recursive flag or on specific files.
- Assistant
The Listener model already has attributes. Next I'll inspect how listeners and attribute handlers are implemented so I can mirror them.
- Assistant
I'll review requireListener helpers and the query handler's listener action switch next.
- Assistant
I'll read the require helpers and attribute handlers, and search for existing tests and capacity-reservation response shapes.
- Assistant
I'll inspect existing tests and AGENT.md, and check the AWS CapacityReservation response shape.
- Assistant
I'll check AWS API shapes for capacity reservation and how optional XML fields are written elsewhere.
- Assistant
Checking elb docs and AWS ELBv2 capacity-reservation API response structure.
- Assistant
Python isn't available — I'll fetch the AWS service model with curl and parse it another way.
- Assistant
I'll pull the full response shapes and how Terraform/Pulumi consume them.
- Assistant
No node either. Let me use grep/sed on the JSON file.
- Assistant
Let me extract the full shapes.
- Assistant
Next I'll inspect XmlBuilder and the ModifyListenerAttributes / ModifyCapacityReservation shapes so the handlers match AWS.
- Assistant
I have enough to implement. Checking LoadBalancer and listener placement, then making the changes.
- Assistant
Now I have a clear picture. Let me implement: I'll implement the missing ELBv2 actions to fix the refresh issues. Let me start by examining the current codebase structure to understand where to add these features. First, let me check the ElbV2Service.java file to see the current implementation.
Since I can't see the actual file contents directly, I'll need to 1) explore the repository structure to find the relevant files, and 2) understand the current implementation of ELBv2 handling. Let me start by listing the files in the repository.
Let me check the current state of ElbV2Service.java to see what's already there.
- Assistant
Let me get the full ModifyListenerAttributes shapes.
- Assistant
Implementing service methods and query handlers next.
- Assistant
I'll insert the new listener-attribute and capacity-reservation methods after
modifyListener. - Assistant
Need to navigate to the right line first.
- Assistant
Now I can apply the replace.
- Assistant
I'll add the capacityReservation field to the LoadBalancer model next.
- Assistant
I'll store capacity reservation on the service instead of the model to avoid a circular dependency — reverting the model reference.
- Assistant
Updating
describeCapacityReservationto use the map and cleaning it up on load balancer delete. - Assistant
Need to goto the line first again.
- Assistant
Now replace.
- Assistant
I'll also clean up capacityReservations when a load balancer is deleted.
- Assistant
Add cleanup of capacityReservations on delete.
- Assistant
Updating the query handler next: wire up the action switch and add the response handlers.
- Assistant
I'll open ElbV2QueryHandler and wire in the new action cases.
- Assistant
Updating the switch cases and adding the handlers.
- Assistant
Adding handler methods after the existing load-balancer attribute and listener handlers.
- Assistant
I'll add handleDescribeCapacityReservation after handleDescribeLoadBalancerAttributes.
- Assistant
Now I'll add the listener attribute handlers after modifyListener.
- Assistant
Let me go to that location.
- Assistant
I'll insert the new listener attribute handlers right after modifyListener.
- Assistant
Updating the docs, then compiling and running the ELBv2 tests.
- Assistant
Need to open the docs file.
- Assistant
Update docs.
- Assistant
Update listeners line too.
- Assistant
Compiling and running the ELBv2 integration tests.
- Assistant
HOME isn't set — I'll set it and retry the build.
- Assistant
Compile succeeded. Running the ELBv2 integration tests next.
- Assistant
I'll check the full test summary / exit status next.
- Assistant
I'll verify the new provide APIs with a temporary test, then remove it so the repo stays clean.
- Assistant
I'll add a temporary verification test, run it, then remove it without committing.
- Assistant
All tests passed. Removing the temporary verification test file.
- Assistant
Verifying the final implementation looks correct before submitting.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →