aws / aws/aws-sdk-js-codemod

S3 waitFor adding extra delay which changes application behavior

Open
#737 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
89
Forks
13
Avg merge
9h 59m
Merged PRs (30d)
1

Description

### Self-service

- [ ] I'd be willing to implement a fix

### Describe the bug

SDK V2 to V3 migration using codemod is adding extra time which is causing performance issues.

```
await s3.waitFor('objectExists', param).promise();

```
transformed by codemod
```
await waitUntilObjectExists({
client: s3,
maxWaitTime: 200
}, param)
```
The codemod adds maxWaitTime: 200 which is changing the code behavior and causing performance issues


### Steps to reproduce

Try to reproduce using the provided description for command.

### Observed behavior

The command waits for 200 seconds which is adding significant delay.

### Expected behavior

The code would execute instantly before.

### Environment

```shell
aws-sdk-js-codemod: 0.26.3
- jscodeshift: 0.15.0
- recast: 0.23.4
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the S3 waitFor conversion in the codemod and compare its generated waitUntilObjectExists call with the example in the report. Reproduce the transformation using the shown SDK and codemod versions, then verify the output preserves the prior waiting behavior without the reported extra delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, nodejs, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.