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 first inspect the ELBv2 service, query handler, models, and relevant tests to understand the existing attribute-handler conventions and response serialization before making changes.
- Assistant
The actions are absent not only from the ELBv2 switch but also from the central AWS Query action allowlist, so both routing layers may need updates. I’ll read the complete relevant sections and model persistence behavior next.
- Assistant
The listener model already has an attributes map, so no schema change is needed there. Capacity reservation is intentionally a stable service-level record rather than mutable load-balancer state; I’ll inspect listener validation/error semantics, Java version, and response timestamp formatting so the implementation matches existing behavior and AWS Query XML conventions.
- Assistant
Existing code targets a modern Java release, so the requested nested
CapacityReservationrecord is supported directly. I’ll now capture the untruncated listener and validation blocks, then implement the three service APIs plus the three query actions and central routing entries. - Assistant
I’ll serialize capacity reservation as an empty
CapacityReservationStatestructure when all record fields are null, and conditionally include AWS’s nestedMinimumLoadBalancerCapacity/CapacityUnitand timestamp fields if the record later gains values. Listener attribute reads return defensive copies; modifications merge entries, matching load balancer and target group semantics. - Assistant
Python is unavailable in this image, so no files were changed. I’ll use the repository’s provided
replaceeditor command for the same targeted edits. - Assistant
One string replacement inserted a literal
\\n; I’ll correct that immediately. The service edits were not applied because the editor only searched its current displayed window, so I’ll open each target location before applying those replacements and then add handler methods at precise insertion points. - Assistant
The service APIs are now in place. I’ll repair the switch line from its actual window and insert the capacity/listener response handlers immediately before existing neighboring methods, using line-aware edits to avoid further search-window issues.
- Assistant
The switch is now syntactically correct. I’ll add the two handler blocks, then compile to catch any API/formatting mistakes.
- Assistant
Capacity serialization is inserted with AWS-compatible nesting. I’ll now add listener attribute response serialization; for modify, it returns the submitted attributes like the existing ELB attribute modify handlers, while subsequent describe returns the full merged map.
- Assistant
The source passes
git diff --check; compilation did not run because the environment has noHOME, not because of code. I’ll rerun Maven withHOME=/tmp, then run the focused ELBv2 integration test. - Assistant
Compilation and the full existing ELBv2 integration test pass. On reviewing AWS’s capacity shape, the nested member is
CapacityUnits(plural), so I’ll correct that before performing an end-to-end HTTP reproduction against a packaged Floci instance. - Assistant
The editor again required the matching line to be open, so that correction did not apply; the package itself succeeded on the prior source. I’ll make the one-line correction directly, rebuild, inspect the test authorization header, and then launch the packaged service for HTTP calls.
- Assistant
The corrected package builds successfully. I’ll now reproduce the original management-plane flow end to end: create a load balancer and listener, describe empty listener attributes, modify and re-describe them, describe empty capacity reservation, and verify nonexistent ARNs produce the correct resource-specific errors.
- Assistant
The end-to-end reproduction now returns HTTP/XML success for both formerly unsupported reads, confirms listener attributes persist after merge, and confirms missing resources still return
ListenerNotFound/LoadBalancerNotFound. I’ll review the final diff for accidental changes and rerun the focused integration test after the final XML naming correction. - Assistant
The final diff is limited to the three intended source files, is whitespace-clean, and the focused integration suite passes after all corrections. The DNS warning suggests a lingering packaged JVM may remain from the manual run, so I’ll verify and clean only that temporary process, then do one final status check before submission.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.