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

waitUntilObjectExists throws WaiterConfiguration.minDelay must be greater than 0 when minDelay is 0.5 #6767

Closed
3 of 4 tasks
razbensimon opened this issue Jan 1, 2025 · 4 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue queued This issues is on the AWS team's backlog

Comments

@razbensimon
Copy link

razbensimon commented Jan 1, 2025

Checkboxes for prior research

Describe the bug

waitUntilObjectExists method throws WaiterConfiguration.minDelay must be greater than 0 error if minDelay is 0.5.
I see you are using @smithy/util-waiter which throws it here.

0.5 is greater than 0, the condition and error are not synced.

This means that I can't wait for an s3 object with an exponential backoff policy to start at 0.5 seconds.

Is there any workaround?

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.12.2

Reproduction Steps

call:

import {
  type HeadObjectCommandInput,
  S3Client,
  waitUntilObjectExists
} from '@aws-sdk/client-s3';

  const fileParams = {
    Bucket: 'bucket-name',
    Key: 'my-key'
  } satisfies HeadObjectCommandInput;

await waitUntilObjectExists({ 
  client,
  minDelay: 0.5, // exponential backoff floor (seconds)
  maxDelay: 1, // exponential backoff ceiling (seconds)
  maxWaitTime: 30
 }, fileParams);

Observed Behavior

Error: WaiterConfiguration.minDelay must be greater than 0

Expected Behavior

An exponential backoff policy should work, starting with 500ms delay

Possible Solution

No response

Additional Information/Context

No response

@razbensimon razbensimon added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 1, 2025
@aBurmeseDev aBurmeseDev self-assigned this Jan 3, 2025
@kuhe kuhe added queued This issues is on the AWS team's backlog p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jan 3, 2025
@kuhe kuhe self-assigned this Jan 3, 2025
@razbensimon
Copy link
Author

It's great to see it got fixed! Thanks guys!
on what release it will be available?
@smilkuri / @kuhe

@kuhe
Copy link
Contributor

kuhe commented Jan 8, 2025

A fix was released in https://www.npmjs.com/package/@smithy/util-waiter/v/4.0.1.

To use the fix, you will need a version of @aws-sdk/client-s3 that has a ^4.0.0 dependency range and perform a lockfile update or clean install, which is at minimum https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.723.0. This is because all transitive smithy dependencies had major version bumps in the recent release dropping support for Node.js 16 in the AWS SDK for JavaScript v3.

@kuhe kuhe added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jan 8, 2025
@razbensimon
Copy link
Author

Thanks, it workes :)

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jan 13, 2025
@kuhe kuhe closed this as completed Jan 13, 2025
@kuhe kuhe assigned smilkuri and unassigned kuhe Jan 13, 2025
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 Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. p2 This is a standard priority issue queued This issues is on the AWS team's backlog
Projects
None yet
Development

No branches or pull requests

4 participants