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

waitUntilObjectNotExists hangs when Bucket is missing. #6469

Closed
3 of 4 tasks
cpyle0819 opened this issue Sep 13, 2024 · 2 comments
Closed
3 of 4 tasks

waitUntilObjectNotExists hangs when Bucket is missing. #6469

cpyle0819 opened this issue Sep 13, 2024 · 2 comments
Assignees
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue

Comments

@cpyle0819
Copy link

cpyle0819 commented Sep 13, 2024

Checkboxes for prior research

Describe the bug

When waitUntilObjectNotExists is called without providing a Bucket, it hangs indefinitely.

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v20.17.0

Reproduction Steps

import { waitUntilObjectNotExists, S3Client } from "@aws-sdk/client-s3";

const main = async () => {
  await waitUntilObjectNotExists(
    { client: new S3Client({}) },
    { Key: "some-key" }
  );
};

// Call function if run directly
import { fileURLToPath } from "url";
if (process.argv[1] === fileURLToPath(import.meta.url)) {
  main();
}

Observed Behavior

Waiter should fail immediately due to missing param.

Expected Behavior

Waiter hangs forever.

Possible Solution

No response

Additional Information/Context

No response

@cpyle0819 cpyle0819 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 13, 2024
@aBurmeseDev aBurmeseDev self-assigned this Sep 16, 2024
@aBurmeseDev aBurmeseDev added investigating Issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Sep 16, 2024
@aBurmeseDev
Copy link
Member

Hi Corey - thanks for reaching out.

In JSv3, waiters requires maxWaitTime field in waiter configuration because the bare-bones modular client does not include the waitFor operation by default. This is similar to delay and maxAttempts fields in JSv2 waiters.

...
await waitUntilObjectNotExists({ client, maxWaitTime: 30 });
...

If you have the maxWaitTime field in your waiter configuration and the client is missing the Bucket property, you will encounter a waiter timeout error. This is how waiters are designed to operate.

However, there's room for improvements in our waiter docs, particularly in providing examples. I created this new issue to address the need for better documentation on waiters.

Closing this issue now.

@aBurmeseDev aBurmeseDev added closing-soon This issue will automatically close in 4 days unless further comments are made. p2 This is a standard priority issue and removed investigating Issue is being investigated and/or work is in progress to resolve the issue. labels Sep 23, 2024
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Sep 28, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants