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 related tests to understand existing attribute-handler conventions and reproduce the unsupported action path before implementing the three requested APIs.
- Assistant
The actions are absent not only from the handler switch but likely also from the controller’s ELBv2 action-routing allowlist. I’ll read the relevant implementations and model definitions in full enough context to preserve XML shape, validation, and state-copy semantics.
- Assistant
The listener model already has an attributes map, so no model migration is needed. I’ll isolate service methods, required-resource validation, handler listener sections, XML date conventions, and integration-test setup. This will also identify the exact expected capacity-reservation response element names from AWS conventions.
- Assistant
The reproduction is confirmed structurally: neither action is in the central route set nor handler switch, so requests cannot reach a service implementation. I’ll now inspect the exact listener handler boundaries and helper validation, then patch only production files (per the instruction not to alter tests).
- Assistant
AWS’s query response wraps capacity fields in
CapacityReservationState, withMinimumLoadBalancerCapacity/CapacityUnitsnested. Since the requested service record deliberately omits a state string and specifies all-null fields when unreserved, the handler should emit an emptyCapacityReservationStatewhile conditionally serializing any future non-null record fields. I’ll implement that forward-compatible shape, listener attribute merge/copy behavior, both route layers, and AWS-style error validation through existingrequire*helpers. - Assistant
The environment lacks Python, so that scripted patch did not run and no files were changed. I’ll use the repository’s non-interactive
edit/replacecommands instead, applying each insertion explicitly and checking the resulting diff. - Assistant
Only the handler switch replacements landed because
replacerequires the target region to be open despite a file argument. I’ll navigate each file/region before applying the remaining changes, and also normalize switch alignment. - Assistant
The service and route registrations are now present. Next I’ll add the XML handlers: capacity output with conditional fields, and a shared listener-attributes response builder matching the existing load-balancer/target-group XML conventions.
- Assistant
Compilation did not start because the Maven wrapper requires
HOME; the source edits themselves passed whitespace validation. Before testing, I’ll setHOME, compile, and inspect any locally cached AWS ELBv2 service model to verify the capacity XML member names rather than relying solely on documentation memory. - Assistant
Compilation passes. I’ll run the existing ELBv2 integration suite for regressions. Then I’ll perform an end-to-end temporary HTTP reproduction (create LB/listener, describe/modify listener attributes, describe capacity, and missing-resource errors) without adding repository tests.
- Assistant
The full existing ELBv2 integration class passes. I’ll now launch the packaged application briefly and issue the exact query-protocol actions. The reproduction will confirm default empty maps/state, modification persistence, XML escaping/shape, and resource validation at the real HTTP routing layer.
- Assistant
The exact end-to-end reproduction now succeeds: empty listener attributes return 200, modifications persist, capacity returns an empty reservation state, and invalid ARNs produce the expected ELBv2 not-found codes. I’ll review the final diff for accidental changes, API signatures, response naming, and consistency 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.