You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After #1883, the Command's middleware won't be added to the stack repeatedly when calling resolveMiddleware(). However, it introduces another bug: If a command instance is used by a different client instance, the command still consumes the configuration of the previous client interface.
The getSerdePlugin() consumes the configuration from the client AccessAnalyzerClientResolvedConfig. if a new client with a different configuration send this command, the configuration consumed by getSerdePlugin won't be updated.
SDK version number
v3.3.0
Is the issue in the browser/Node.js/ReactNative?
Browser & Node.js & ReactNative
To Reproduce (observed behavior)
Here's the code snippet:
constcommand=newCreateAnalyzerCommand(params);constclient1=newAccessAnalyzerClient(options);// Sent to endpoint access-analyzer.us-west-2.amazonaws.comawaitclient1.send(command);constclient2=newAccessAnalyzerClient({ ...options,endpoint: "https://foo.some-endpoints.com"});// Still sent to access-analyzer.us-west-2.amazonaws.comawaitclient2.send(command);
Expected behavior
The configuration should be updated between the invocations.
Additional context
The key to solving this problem is to re-add the native command's middleware every time in resolveMiddleare(), without re-introducing the bug #1864. A solution would be introducing an internal MiddlewareStack API that allows native middleware to be added to the stack repeatedly, without duplicated middleware name exceptions. This should be low-risk because only the middleware shipped with SDK natively will need to do so.
The text was updated successfully, but these errors were encountered:
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.
Describe the bug
After #1883, the Command's middleware won't be added to the stack repeatedly when calling
resolveMiddleware()
. However, it introduces another bug: If a command instance is used by a different client instance, the command still consumes the configuration of the previous client interface.For example
aws-sdk-js-v3/clients/client-accessanalyzer/commands/CreateAnalyzerCommand.ts
Lines 44 to 52 in 311f55b
The
getSerdePlugin()
consumes the configuration from the clientAccessAnalyzerClientResolvedConfig
. if a new client with a different configurationsend
this command, the configuration consumed bygetSerdePlugin
won't be updated.SDK version number
v3.3.0
Is the issue in the browser/Node.js/ReactNative?
Browser & Node.js & ReactNative
To Reproduce (observed behavior)
Here's the code snippet:
Expected behavior
The configuration should be updated between the invocations.
Additional context
The key to solving this problem is to re-add the native command's middleware every time in
resolveMiddleare()
, without re-introducing the bug #1864. A solution would be introducing an internal MiddlewareStack API that allows native middleware to be added to the stack repeatedly, without duplicated middleware name exceptions. This should be low-risk because only the middleware shipped with SDK natively will need to do so.The text was updated successfully, but these errors were encountered: