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:
codeapi 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
bash# 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. - Assistant
I’ll first inspect the ELBv2 service, query handler, models, and relevant tests to understand existing attribute-handler conventions and reproduce the unsupported action at the most appropriate test level.
- Assistant
The action switch confirms all requested actions are absent. I’ll now read the full service/model storage semantics and adjacent XML handlers so the implementation preserves region validation, error behavior, response shape, and parameter parsing conventions.
- Assistant
The
Listenermodel already contains an attributes map, so no model migration is needed. Capacity state is specified as a service-level record with null fields when unreserved. I’ll inspect precise listener lookup/error helpers and response utility behavior before editing. - Assistant
I need exact insertion points because the prior combined output was truncated. I’ll retrieve the switch, listener handler block, service lookup helpers, and test setup independently.
- Assistant
The service contract implies capacity reservations are not currently mutable: validation plus a stable all-null record is sufficient for the unreserved state. The query response should omit null optional fields, yielding an empty result that AWS SDKs deserialize safely. Before patching, I’ll verify the canonical AWS Query member names from project dependencies/docs if available and inspect lookup errors.
- Assistant
I’ll add the public nested record and service methods, register all three actions, mirror existing attribute response handlers, and serialize any non-null capacity fields using AWS’s
MinimumLoadBalancerCapacity.CapacityUnits,LastModifiedTime, andDecreaseRequestsRemainingstructure. With the current all-null state, the result remains intentionally empty. - Assistant
Python is unavailable and no files were changed. I’ll use the repository’s provided
edit/replacecommands instead, starting with literal service edits. - Assistant
The record insertion succeeded; the other literal replacements were outside the editor’s displayed window. I’ll use line-range edits at the now-known method boundaries.
- Assistant
I’ll insert rather than replace these methods, preserving existing code exactly.
- Assistant
The line replacement semantics exposed two issues in the review: a missing capacity method brace and an insertion that accidentally replaced the listener map initialization while retaining the old method declaration. I’ll correct both blocks explicitly now.
- Assistant
One duplicate declaration remained because the replacement ended before the original line; I’ll remove it and restore the section spacing, then patch the handler via line-aware edits.
- Assistant
The service is now structurally correct. I’ll add switch cases and handlers using exact current line ranges, then immediately compile to catch any structural mistakes.
- Assistant
The review shows both handler insertions landed on method signature lines rather than section markers, causing extra/missing braces and erased signatures. I’ll replace those affected spans wholesale with complete, valid blocks. Maven also needs
HOMEset in this environment; I’ll account for that after repair. - Assistant
Compilation has narrowed the repair to one erased local variable in the pre-existing security-group handler. I’ll restore it, compile, run the ELBv2 integration suite, and then exercise the new actions against a live test endpoint (or equivalent handler path) to verify XML and errors.
- Assistant
Compilation and the existing ELBv2 integration suite pass. To verify the exact newly added success paths without modifying tests, I’ll launch the app temporarily, create a load balancer and listener via Query API, call both empty reads, modify listener attributes, read them back, and stop the process.
- Assistant
The dev endpoint is ready. I’ll execute the complete API sequence and assert response names, empty-state shape, and persisted/merged listener attributes using shell checks.
- Assistant
The live API checks pass for all requested behavior, including empty defaults and merged attributes. I’ll now inspect the final diff for accidental edits, verify not-found validation for both new reads, and run formatting/compile checks plus the affected integration test once more if the diff is clean.
- Assistant
The final diff is limited to the two intended files and passes whitespace validation. The service uses existing
requireLoadBalancer/requireListenerhelpers, so wrong-region and unknown-ARN edge cases preserve AWS-styleLoadBalancerNotFound/ListenerNotFounderrors. I’ll run both ELBv2 integration classes as the final regression check, then submit.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.