fix(commons): keep AWS_SDK_UA_APP_ID idempotent and <=50 chars#5157
fix(commons): keep AWS_SDK_UA_APP_ID idempotent and <=50 chars#5157saschabuehrle wants to merge 1 commit intoaws-powertools:mainfrom
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
No acknowledgement section found. Please make sure you used the template to open a PR and didn't remove the acknowledgment section. Check the template at |
|
dreamorosi
left a comment
There was a problem hiding this comment.
Although I don't have a better solution yet - which is why we haven't addressed the issue - I don't think trimming, slicing, and generally doing all these operations every time the module is imported is the way to go.
I'd rather help customers address the root cause of why the module is imported twice - which is bad regardless of the UA length - or give a way to opt out from UA concatenation altogether.



Fixes #5082
This patch makes commons user-agent app-id initialization safe for repeated module loads and compliant with the AWS SDK 50-char limit:
Greetings, saschabuehrle