Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waitUntilLoadBalancersDeleted never resolves #639

Open
3 tasks done
cpyle0819 opened this issue Nov 6, 2023 · 2 comments · May be fixed by aws/aws-sdk-js-v3#6501
Open
3 tasks done

waitUntilLoadBalancersDeleted never resolves #639

cpyle0819 opened this issue Nov 6, 2023 · 2 comments · May be 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

3 participants