Skip to content
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

feat(middleware-user-agent): add client config for userAgentAppId #6524

Merged
merged 26 commits into from
Oct 3, 2024

Conversation

siddsriv
Copy link
Contributor

@siddsriv siddsriv commented Sep 26, 2024

Issue

Internal JS-5173

Description

Adds a client config field for userAgentAppId

Testing

Unit tests:

  • util-user-agent-node
 PASS  src/defaultUserAgent.spec.ts
  createDefaultUserAgentProvider
    ✓ should return basic node default user agent (5 ms)
    ✓ should set crt available key if aws-crt is available in runtime (1 ms)
    ✓ should skip api version if service id is not supplied (1 ms)
    ✓ should add AWS_EXECUTION_ENV (2 ms)
    ✓ should add app id if available (2 ms)

Test Suites: 1 passed, 1 total
Tests:       5 passed, 5 total
Snapshots:   0 total
Time:        2.86 s
Ran all test suites.
Done in 3.44s.
  • util-user-agent-browser
Location: /local/home/sidddsri/workspace/aws-sdk-js-v3/packages/util-user-agent-browser
.
 PASS  src/index.native.spec.ts
 PASS  src/index.spec.ts

Test Suites: 2 passed, 2 total
Tests:       5 passed, 5 total
Snapshots:   0 total
Time:        4.485 s
  • middleware-user-agent
 PASS  src/user-agent-middleware.spec.ts
  userAgentMiddleware
    ✓ should include appId in user agent when provided (1 ms)
    ✓ should include long appId in user agent when provided (1 ms)
  • Client config option is generated in runtimeConfig.ts:
.
.
    useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
    userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
.
.

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

@siddsriv siddsriv requested a review from a team as a code owner September 26, 2024 16:35
@siddsriv siddsriv marked this pull request as draft September 26, 2024 16:35
@siddsriv siddsriv marked this pull request as ready for review October 1, 2024 15:37
@siddsriv siddsriv changed the title feat: add client config for userAgentAppId feat(middleware-user-agent): add client config for userAgentAppId Oct 1, 2024
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 Oct 27, 2024
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.

3 participants