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.
|
Thanks for the detailed review. Agreed on the concern about doing normalization work at import time. I’m going to rework this around an explicit opt-in/guard path so we avoid repeated module-load mutations and keep behavior predictable. I’ll post an updated patch here. Greetings, saschabuehrle |
|
Thanks for the review. I agree this needs a different approach than import-time normalization. I’m parking this one while I work out a cleaner opt-in path and will come back with a revised patch.\n\nGreetings, saschabuehrle |
|
Closing this out for now since the current approach isn't the right direction. I'll reopen with a new patch once I have a cleaner opt-in design that matches the maintainer guidance.\n\nGreetings, saschabuehrle |



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