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: add default destroy function to clients #1081

Merged
merged 3 commits into from Apr 8, 2020

Conversation

AllanZhengYP
Copy link
Contributor

@AllanZhengYP AllanZhengYP commented Apr 5, 2020

Currently all the clientRuntimeCustomization can have a destroy() function. But the default configs in smithy client doesn't have one:

readonly config: ResolvedClientConfiguration;
.

This change adds a destroy function to the Smithy client. When every service client extends the Smithy client, it has a default destroy function. In the service clients' destroy function, it will call the function from its super class Smithy client. This is necessary as you can destroy the Smithy resolved config just like destroying other client customization.

The last commit is client generation diff. You can ignore it when reviewing it.

Related: smithy-lang/smithy-typescript#156

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

@codecov-io
Copy link

Codecov Report

Merging #1081 into master will decrease coverage by 12.69%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1081       +/-   ##
===========================================
- Coverage   91.49%   78.79%   -12.70%     
===========================================
  Files         146      279      +133     
  Lines        2868    11598     +8730     
  Branches      511     2402     +1891     
===========================================
+ Hits         2624     9139     +6515     
- Misses        244     2459     +2215     
Impacted Files Coverage Δ
packages/smithy-client/src/client.ts 81.81% <0.00%> (-7.66%) ⬇️
packages/util-create-request/src/foo.fixture.ts 73.33% <0.00%> (-5.24%) ⬇️
...ests/aws-restxml/commands/XmlMapsXmlNameCommand.ts 100.00% <0.00%> (ø)
...aws-restxml/commands/AllQueryStringTypesCommand.ts 88.23% <0.00%> (ø)
...rotocol_tests/aws-query/commands/XmlMapsCommand.ts 100.00% <0.00%> (ø)
protocol_tests/aws-restxml/models/index.ts 68.27% <0.00%> (ø)
...rotocol_tests/aws-restxml/protocols/Aws_restXml.ts 67.88% <0.00%> (ø)
...aws-restxml/commands/ConstantQueryStringCommand.ts 88.23% <0.00%> (ø)
...ommands/OperationWithOptionalInputOutputCommand.ts 88.23% <0.00%> (ø)
...tjson/commands/NullAndEmptyHeadersClientCommand.ts 88.23% <0.00%> (ø)
... and 125 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 77386f6...507a283. Read the comment docs.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

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

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

@trivikr
Copy link
Member

trivikr commented Apr 7, 2020

CodeGen needs to be run post this update in dependent package smithy-lang/smithy-typescript@1e11300

@AllanZhengYP
Copy link
Contributor Author

AllanZhengYP commented Apr 7, 2020

@trivikr Thanks for the heads up. In fact no diff will be generated from the commit

@AllanZhengYP AllanZhengYP merged commit 7eb0f0e into aws:master Apr 8, 2020
@lock
Copy link

lock bot commented Apr 17, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 17, 2020
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.

None yet

4 participants