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

fix(clients): populate sdkId in serviceId and default to use arnNamespace as signingName #1786

Merged
merged 3 commits into from
Dec 19, 2020

Conversation

AllanZhengYP
Copy link
Contributor

Follow up to #1765
Description of changes:
The previous change #1765 put arnNamespace in serviceId client config, and use it as fallback when a service doesn't specify a signing name in its endpoints.json credentialScope. It fixes the issue but the serviceId config is not correct. Right now the serviceId is generated from arnNamespace in the Smithy model, but it can be different from the actual service id. It may result unexpected results in metrics.

This change moves the fallback-to-arnNamespace logic to endpoints.ts: every service has arnNamespace as default signingName. If they have a different signing name in its endpoints.json credentialScope, they will use that instead. Now serviceId client config can be changed to actual service id because it doesn't need to provide the signing name information.

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

This change also change client serivceId config from arnNamespace
to sdkId
@trivikr trivikr changed the title fix(clients-*): generate sdkId in serviceId and default to use arnNamespace as signingName fix(clients): generate sdkId in serviceId and default to use arnNamespace as signingName Dec 14, 2020
@codecov-io
Copy link

Codecov Report

Merging #1786 (267d32d) into master (de75f7e) will decrease coverage by 1.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1786      +/-   ##
==========================================
- Coverage   79.77%   78.72%   -1.06%     
==========================================
  Files         325      362      +37     
  Lines       12087    15301    +3214     
  Branches     2553     3333     +780     
==========================================
+ Hits         9643    12046    +2403     
- Misses       2444     3255     +811     
Impacted Files Coverage Δ
protocol_tests/aws-json/models/models_0.ts 79.36% <0.00%> (-20.64%) ⬇️
protocol_tests/aws-restjson/models/models_0.ts 89.43% <0.00%> (-10.57%) ⬇️
...tocol_tests/aws-restxml/commands/XmlMapsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ocol_tests/aws-restxml/commands/XmlBlobsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ocol_tests/aws-restxml/commands/XmlEnumsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ocol_tests/aws-restxml/commands/XmlListsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...col_tests/aws-restjson/commands/JsonMapsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ol_tests/aws-restjson/commands/JsonBlobsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ol_tests/aws-restjson/commands/JsonEnumsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ol_tests/aws-restjson/commands/JsonListsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
... and 178 more

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 f69ff44...267d32d. Read the comment docs.

@trivikr trivikr changed the title fix(clients): generate sdkId in serviceId and default to use arnNamespace as signingName fix(clients): populate sdkId in serviceId and default to use arnNamespace as signingName Dec 18, 2020
@AllanZhengYP AllanZhengYP merged commit 0011af2 into aws:master Dec 19, 2020
@github-actions
Copy link

github-actions bot commented Jan 8, 2021

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 Jan 8, 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.

3 participants