Skip to content

fix: use SDK AppID for User-Agent#556

Merged
simonmarty merged 7 commits intomainfrom
useragent
Jan 28, 2026
Merged

fix: use SDK AppID for User-Agent#556
simonmarty merged 7 commits intomainfrom
useragent

Conversation

@ThirdEyeSqueegee
Copy link
Member

@ThirdEyeSqueegee ThirdEyeSqueegee commented Jan 8, 2026

Issue #, if available:
N/A

Description of changes:
The old User-Agent middleware logic was bugged causing the provider and add-on versions to not show up in service logs. This was due to our custom middleware adding an entirely new header instead of modifying the existing UserAgent header which was never ingested on the service side.

  • Use the SDK's middleware import to fix this

Example of UserAgent after this change (from service log):

UserAgent=aws-sdk-go-v2/1.39.0 ua/2.1 os/linux lang/go#1.24.12 md/GOOS#linux md/GOARCH#amd64 api/secretsmanager#1.39.4 app/secrets-store-csi-driver-provider-aws-2.1.0 m/E,z

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ThirdEyeSqueegee ThirdEyeSqueegee requested a review from a team as a code owner January 8, 2026 22:47
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.56%. Comparing base (6dbe3b9) to head (6a8bd60).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
credential_provider/irsa_credential_provider.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #556      +/-   ##
==========================================
+ Coverage   60.10%   61.56%   +1.46%     
==========================================
  Files          11       11              
  Lines         762      752      -10     
==========================================
+ Hits          458      463       +5     
+ Misses        287      274      -13     
+ Partials       17       15       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@i-am-SR
Copy link
Contributor

i-am-SR commented Jan 23, 2026

Please add some info reg the bug in the old User-Agent middleware logic.

@derik01
Copy link

derik01 commented Jan 26, 2026

Could we explore using AppID for configuring the user agent: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config

@ThirdEyeSqueegee ThirdEyeSqueegee changed the title fix: User-Agent middleware fix: use SDK AppID for User-Agent Jan 26, 2026
derik01
derik01 previously approved these changes Jan 26, 2026
@ThirdEyeSqueegee ThirdEyeSqueegee added the safe-to-test Pull Request has been manually reviewed and deemed to be safe to run integration tests on. label Jan 26, 2026
@simonmarty
Copy link
Contributor

Could we explore using AppID for configuring the user agent: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config

Maybe, as long as it doesn't risk getting overwritten too easily by accident by customers.

@ThirdEyeSqueegee
Copy link
Member Author

Pivoted to using AppID a couple commits ago @simonmarty. Plz review whenever you can 😁

@derik01
Copy link

derik01 commented Jan 27, 2026

Cursory look suggests that using AppID does what Angad was proposing in a earlier revision: https://github.com/aws/aws-sdk-go-v2/blob/de58dc6cdc4c35ac4687d53cff781a6027a0f52f/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsClientUserAgent.java#L79-L91

Copy link
Contributor

@i-am-SR i-am-SR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation has changed since the last review. Please ensure we have validated the updated UA value in the service logs.

@github-actions github-actions bot removed the safe-to-test Pull Request has been manually reviewed and deemed to be safe to run integration tests on. label Jan 27, 2026
@ThirdEyeSqueegee ThirdEyeSqueegee added the safe-to-test Pull Request has been manually reviewed and deemed to be safe to run integration tests on. label Jan 27, 2026
@simonmarty
Copy link
Contributor

Experiencing some weirdness with the IRSA integ tests failing to create EKS clusters. I'm going to override the approvals.

@simonmarty simonmarty merged commit 072ee2d into main Jan 28, 2026
17 of 21 checks passed
@simonmarty simonmarty deleted the useragent branch January 28, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe-to-test Pull Request has been manually reviewed and deemed to be safe to run integration tests on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants