Skip to content

fix(util-user-agent-node): should memoize app id #2223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2021

Conversation

AllanZhengYP
Copy link
Contributor

@AllanZhengYP AllanZhengYP commented Apr 8, 2021

Issue

Resolves: #2027

Description

This change fix an issue that SDK need to read shared config files to load App ID for every request. Now this change only load the App ID once at the client instantiation. This will remove some performance overhead.


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

@AllanZhengYP AllanZhengYP requested a review from trivikr April 8, 2021 19:37
@AllanZhengYP AllanZhengYP changed the title fix(util-user-agent-node): should only load app id once fix(util-user-agent-node): should memoize app id Apr 8, 2021
@TysonAndre
Copy link
Contributor

Not a maintainer, but LGTM. nit - in case of future refactorings reintroducing similar bugs or sharing the same array object it might still be useful to assert the length is the expected value

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@0745502). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2223   +/-   ##
=======================================
  Coverage        ?   61.83%           
=======================================
  Files           ?      454           
  Lines           ?    23290           
  Branches        ?     5521           
=======================================
  Hits            ?    14402           
  Misses          ?     8888           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0745502...db3f5c3. Read the comment docs.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-staging-test
  • Commit ID: 8212881
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@TysonAndre TysonAndre left a comment

Choose a reason for hiding this comment

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

Not a maintainer, but don't see any other issues

@AllanZhengYP
Copy link
Contributor Author

Thanks @TysonAndre for looking into this PR. 👍

@AllanZhengYP AllanZhengYP merged commit fd40114 into aws:main Apr 9, 2021
@matej-prokop
Copy link

Great! Thank you for fixing this. When do you plan to release? I would like to retry our perf test with this fix in place.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default AWS credentials provider chain resolution changed in v3 for EC2MetadataCredentials/ECSCredentials - readFile calls more frequent
6 participants