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
dreamorosi opened this issue
Oct 21, 2023
· 2 comments
· Fixed by #1762
Assignees
Labels
commonsThis item relates to the Commons UtilitycompletedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
AWS SDK can have only one middleware with the same identifier in the same middleware stack. In order to avoid hitting this error we currently try to compare the ids of the middlewares present in a client middleware stack before attempting to attach our own.
The current method does an exact string comparison using the id of the middleware, as well as other metadata, which can be problematic in case the middleware stack order changes or the information returned by the client.middlewareStack.identify() function changes.
We should move to a more loose comparison to instead check for the middleware id only.
Why is this needed?
To decrease the chance of false positives, and ultimately be able to attach the middleware correctly.
Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered:
dreamorosi
added
internal
PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
confirmed
The scope is clear, ready for implementation
commons
This item relates to the Commons Utility
labels
Oct 21, 2023
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
commonsThis item relates to the Commons UtilitycompletedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
Summary
AWS SDK can have only one middleware with the same identifier in the same middleware stack. In order to avoid hitting this error we currently try to compare the ids of the middlewares present in a client middleware stack before attempting to attach our own.
The current method does an exact string comparison using the id of the middleware, as well as other metadata, which can be problematic in case the middleware stack order changes or the information returned by the
client.middlewareStack.identify()
function changes.We should move to a more loose comparison to instead check for the middleware id only.
Why is this needed?
To decrease the chance of false positives, and ultimately be able to attach the middleware correctly.
Which area does this relate to?
Other
Solution
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: