Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Sep 1, 2025

If both $AWS_CONTAINER_AUTHORIZATION_TOKEN and
$AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE are set, the SDK wants to emit a warning.

Because of the way it calls the logger.warn() function, the reference to this is lost and we try to look up a member on undefined which then fails and no credentials are loaded at all.

Reported as an upstream bug to SDKv3, but in order to expedite the fix we also guard against it ourselvses by locally binding this before we pass our logger object to the SDK.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…nerTokenFile are set

If both `$AWS_CONTAINER_AUTHORIZATION_TOKEN` and
`$AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE` are set, the SDK wants to emit
a warning.

Because of the way it calls the `logger.warn()` function, the reference
to `this` is lost and we try to look up a member on `undefined` which
then fails and no credentials are loaded at all.

Reported as an upstream bug to SDKv3, but in order to expedite the fix
we also guard against it ourselvses by locally binding `this` before
we pass our logger object to the SDK.
@rix0rrr rix0rrr requested a review from a team September 1, 2025 08:59
@aws-cdk-automation aws-cdk-automation requested a review from a team September 1, 2025 08:59
@github-actions github-actions bot added the p2 label Sep 1, 2025
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.85%. Comparing base (5fc1b13) to head (b041868).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #829      +/-   ##
==========================================
+ Coverage   82.60%   82.85%   +0.24%     
==========================================
  Files          64       65       +1     
  Lines        9465     9509      +44     
  Branches     1106     1117      +11     
==========================================
+ Hits         7819     7879      +60     
+ Misses       1612     1598      -14     
+ Partials       34       32       -2     
Flag Coverage Δ
suite.unit 82.85% <ø> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Sep 2, 2025
Merged via the queue into main with commit 6f4e98a Sep 2, 2025
33 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/unsafe-this branch September 2, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants