aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

`waitUntilDBInstanceDelete` does not work - waiter errorType pointing to awsQueryError::code rather than ShapeId

Open Eyjafjallaa opened this issue 1 year ago • 2 comments

Checkboxes for prior research

Describe the bug

waitUntilDBInstanceDelete doesn't stop even target DBInstance is deleted

SDK version number

@aws-sdk/client-rds v3.573.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

19.1.0

Reproduction Steps

const DBINSTANCE = 'doesnotexist';
const client = new RDSClient(config);
const input = {
  DBInstanceIdentifier: DBINSTANCE,
};

await waitUntilDBInstanceDeleted(
  {
    client: client
  },
  input
)

console.log('end')

Observed Behavior

It should print end but doesn't stop

Expected Behavior

print end

Possible Solution

https://github.com/aws/aws-sdk-js-v3/blob/ac9ef805060eafa14c87dda8779d3892a749b76f/clients/client-rds/src/waiters/waitForDBInstanceDeleted.ts#L78-L81

I found that exception.name is "DBInstanceNotFoundFault" Not "DBInstanceNotFound"

I think condition should be exception.name && exception.name == "DBInstanceNotFoundFault"

Additional Information/Context

No response

Eyjafjallaa avatar May 10 '24 07:05 Eyjafjallaa

Hi @Eyjafjallaa ,

Thanks for reporting this. I'm able to confirm this issue.

The problem is likely with the smithy-typescript code generator.

Thanks, Ran~

RanVaknin avatar May 15 '24 17:05 RanVaknin

the model's waiter is pointed at "errorType": "DBInstanceNotFound". This is the awsQueryError trait code value and not the error shape id.

Checking with the teams to see whether the service should update the waiter or we should handle this indirection.

kuhe avatar Jun 14 '24 16:06 kuhe

ask for an additional matcher:

{
  "state": "success",
  "matcher": {
    "errorType": "DBInstanceNotFound"
  }
},
{
  "state": "success",
  "matcher": {
    "errorType": "DBInstanceNotFoundFault"
  }
},

kuhe avatar Aug 14 '24 20:08 kuhe

Hi @Eyjafjallaa - we've verified and confirmed that this needs to be addressed on service side. I'm going to reach out to RDS service team. (ref: P149786965).

Since there are no pending action items for the SDK team, and this repository is solely dedicated to SDK-related issues, I will proceed to close this case. However, please feel free to contact the service team directly through AWS Support for further updates regarding this change.

aBurmeseDev avatar Aug 21 '24 20:08 aBurmeseDev

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[bot] avatar Sep 06 '24 00:09 github-actions[bot]