Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

waitUntilLoadBalancersDeleted never resolves #639

Closed
3 tasks done
cpyle0819 opened this issue Nov 6, 2023 · 4 comments · Fixed by aws/aws-sdk-js-v3#6501
Closed
3 tasks done

waitUntilLoadBalancersDeleted never resolves #639

cpyle0819 opened this issue Nov 6, 2023 · 4 comments · Fixed by aws/aws-sdk-js-v3#6501
Assignees
Labels
bug Something isn't working elbv2 service-api This issue pertains to the AWS API

Comments

@cpyle0819
Copy link

Checkboxes for prior research

Describe the bug

The waiter, waitUntilLoadBalancersDeleted, returns a promise that never resolves.

SDK version number

"@aws-sdk/client-elastic-load-balancing-v2": "^3.441.0"

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v20.9.0

Reproduction Steps

import {
  ElasticLoadBalancingV2Client,
  waitUntilLoadBalancersDeleted,
} from "@aws-sdk/client-elastic-load-balancing-v2";

await waitUntilLoadBalancersDeleted(
  {
    client: new ElasticLoadBalancingV2Client({}),
  },
  { Names: ["some-fake-name"] }
);

Observed Behavior

The promise from the waiter never resolves.

Expected Behavior

The promise should resolve immediately for non-existent load balancers.

Possible Solution

No response

Additional Information/Context

No response

@cpyle0819 cpyle0819 added bug Something isn't working needs-triage labels Nov 6, 2023
@aBurmeseDev aBurmeseDev self-assigned this Nov 7, 2023
@RanVaknin
Copy link

Hi @cpyle0819 ,

Thanks for the report. I'm able to confirm the issue. The root cause is that the waiter is expecting the exception to be "LoadBalancersNotFound" when in fact the returned exception is "LoadBalancersNotFoundException".

It can be seen here:
https://github.com/aws/aws-sdk-js-v3/blob/5aa935c97485df4ec7bf8022e7683c7017a09c24/clients/client-elastic-load-balancing-v2/src/waiters/waitForLoadBalancersDeleted.ts#L36

The SDK is generated with the wrong exception because the ELBV2 API model incorrectly defines its waiter as such:
https://github.com/aws/aws-sdk-js-v3/blob/5aa935c97485df4ec7bf8022e7683c7017a09c24/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.json#L2163

I see that other waiters are also relying on the same exception. Its unclear to me if "LoadBalancersNotFound" is ever returned from the service, but if I had to guess I'd say its probably incorrect as well.

I have created a ticket to the service team to update their C2J file to reflect this change P105020735.

Thanks again,
Ran~

@RanVaknin RanVaknin assigned RanVaknin and unassigned aBurmeseDev Nov 7, 2023
@RanVaknin RanVaknin transferred this issue from aws/aws-sdk-js-v3 Nov 7, 2023
@RanVaknin RanVaknin added service-api This issue pertains to the AWS API elbv2 labels Nov 7, 2023
@aBurmeseDev
Copy link
Member

As of today, there hasn't been any update from service team, when I reached out. We'll keep it posted.

@kuhe
Copy link

kuhe commented Sep 25, 2024

fixed in the AWS SDK JSv3 with aws/aws-sdk-js-v3#6501

Copy link

This issue is now closed.

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working elbv2 service-api This issue pertains to the AWS API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants