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 and the relevant files mentioned in the issue.
Assistant
Let me look at the middle section that was truncated, and the model classes.
Assistant
The Listener model already has an
attributesfield. Now let me look at the LoadBalancer model and the ElbV2QueryHandler.Assistant
Now let me look at the ElbV2QueryHandler, particularly the action switch and existing attribute handlers.
Assistant
Now let me look at the full QueryHandler to understand the structure, especially the header, the existing attribute handlers, and helper methods.
Assistant
Now let me look at the existing attribute handlers in detail, the helper methods (parseAttributes, xmlError, writeAttributes), and the imports/structure around the handler.
Assistant
Now let me look at the listener handlers and the listener XML output, plus the helper methods at the end (parseAttributes, memberList, xmlError, voidResponse, etc.).
Assistant
Now let me look at the helper methods at the end of the file (parseAttributes, memberList, xmlError, voidResponse, listenerXml, loadBalancerXml).
Assistant
Now let me look at the target group attribute handlers in the service to mirror the pattern.
Assistant
Now let me look at the integration test to understand the testing patterns and check how tests are run.
Assistant
Let me look at the build setup and reproduce the error first.
Assistant
Now I have a clear understanding. Let me reproduce the error first by building and running a quick test. Let me check how the test endpoint works and verify the error with a temporary test.
Assistant
Now let me implement the changes. First, I'll add the listener attribute service methods after
modifyListener:Assistant
Now I'll add the listener attribute service methods after
modifyListener(line 399):Assistant
Now let me add the
describeCapacityReservationmethod near the load balancer attributes section:Assistant
The edit broke the
modifyLoadBalancerAttributesmethod. Let me fix it:Assistant
Now I need to add the
CapacityReservationrecord. Let me add it as a nested record at the bottom of the class. Let me find the closing brace of the class:Assistant
I introduced an extra closing brace. Let me fix the
linkTgToLbmethod structure:Assistant
The service file looks correct now. Let me verify the listener attribute methods are still in place:
Assistant
Now let me add the handler methods and switch cases in
ElbV2QueryHandler.java. First the switch cases:Assistant
Now let me add the new switch cases. I'll add the listener attribute cases after
ModifyListenerand the capacity reservation case afterDescribeLoadBalancerAttributes:Assistant
Now add the listener attribute cases after
ModifyListener:Assistant
Now let me add the handler methods. First, the
handleDescribeCapacityReservationafterhandleDescribeLoadBalancerAttributes. Let me find it:Assistant
Let me check the XmlBuilder API to understand how to handle conditional elements:
Assistant
Now I'll add the
handleDescribeCapacityReservationmethod afterhandleDescribeLoadBalancerAttributes. Let me view the exact lines:Assistant
I need to add a blank line between the new method and
handleSetSecurityGroups:Assistant
Now let me add the listener attribute handler methods after
handleModifyListener. Let me find it:Assistant
Now I'll add the listener attribute handler methods after
handleModifyListener(line 487):Assistant
I need to add the closing brace for
handleModifyListenerthat was removed:Assistant
Now let me verify the package declarations and that the
CapacityReservationreference works (same package):Assistant
Same package, so
ElbV2Service.CapacityReservationworks. Now let me compile to check for errors:Assistant
There's a compile error at line 407 in ElbV2Service.java. Let me check what's there.
Assistant
The closing brace for
modifyListeneris missing. Let me fix it:Assistant
The
editcommand edited the wrong file (the currently open QueryHandler instead of the Service). Let me check git status and reset the damaged file:Assistant
Let me reset the QueryHandler file and redo the changes carefully using the
--fileoption to avoid editing the wrong file:Assistant
Now let me verify the ElbV2Service.java state (it had a missing brace). Let me check the listener attributes section:
Assistant
The
modifyListenermethod is missing its closing brace. Let me fix it using the--fileoption explicitly:Assistant
The edits are getting messy. Let me reset the Service file completely and redo all changes cleanly using
replace(search/replace) which is more robust:Assistant
Both files are reset. Now let me reapply the Service changes using
replacewith search/replace text. First, the listener attributes methods:Assistant
The listener attribute methods are added cleanly. Now let me add the
describeCapacityReservationmethod and theCapacityReservationrecord:Assistant
Let me navigate to the location first:
Assistant
Now the text is visible. Let me run the replace:
Assistant
Now let me add the
CapacityReservationrecord at the end of the class. Let me navigate to the end:Assistant
Now let me add the
CapacityReservationrecord at the end of the class:Assistant
The Service file is now complete and clean. Let me verify the full set of changes and compile:
Assistant
The Service changes look clean. Now let me reapply the QueryHandler changes using
replacewith--fileand navigate to the right locations. First the switch cases:Assistant
Now let me add the switch cases using replace:
Assistant
Now add the listener attribute switch cases:
Assistant
Now let me add the
handleDescribeCapacityReservationmethod afterhandleDescribeLoadBalancerAttributes. Let me navigate there:Assistant
Now let me add the
handleDescribeCapacityReservationmethod:Assistant
Now let me add the listener attribute handler methods after
handleModifyListener. Let me navigate there:Assistant
Now let me add the listener attribute handlers after
handleModifyListener:Assistant
Now let me verify the full diff and compile:
Assistant
Compilation succeeded. Now let me write a temporary reproduction/test script to verify the new actions work. Let me first check the test infrastructure:
Assistant
Let me run the existing ELBv2 integration tests to confirm they pass:
Assistant
Offline mode lacks the surefire plugin. Let me try with network access:
Assistant
All existing tests pass. Now let me create a temporary test to verify the new actions work, then delete it. Let me look at how a listener is created in the existing test to reuse the flow:
Assistant
Now let me create a temporary test to verify the new actions end-to-end:
Assistant
All 9 tests pass, including the edge cases (not found errors). Now let me remove the temporary test file:
Assistant
Let me run the broader ELBv2 test suite once more to ensure nothing broke (including the Lambda target and SDK tests if possible), and review the final diff:
Assistant
All tests pass. Let me review the final diff for both files:
Assistant
The implementation is complete and clean. Let me verify the final state compiles cleanly one more time and confirm no temp files remain:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.