Skip to content

fix: exit generate-clients if child process errors or fails #1498

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
Sep 8, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Sep 2, 2020

Issue #, if available:
Fixes: #1497

Description of changes:
exit generate-clients if child process errors or fails

Verified that generate-client fails with error code emitted by prettier in #1497

error Command failed with exit code 1
5 actionable tasks: 2 executed, 3 up-to-date
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/build-info/smithy-build-info.json 43ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/model/model.json 156ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/sources/model.json 7ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/Braket.ts 237ms

[error] codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/BraketClient.ts: SyntaxError: ',' expected. (166:24)
[error]   164 |    * The service name with which to sign requests.
[error]   165 |    */
[error] > 166 |   signingName?:< string;
[error]       |                        ^
[error]   167 | 
[error]   168 |   /**
[error]   169 |    * Default credentials provider; Not available in browser runtime
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/commands/CancelQuantumTaskCommand.ts 23ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/commands/CreateQuantumTaskCommand.ts 18ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/commands/GetDeviceCommand.ts 17ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/commands/GetQuantumTaskCommand.ts 16ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/commands/SearchDevicesCommand.ts 16ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/commands/SearchQuantumTasksCommand.ts 10ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/endpoints.ts 14ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/index.ts 4ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/jest.config.js 7ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/models/index.ts 89ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/package.json 16ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/pagination/Interfaces.ts 2ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/pagination/SearchDevicesPaginator.ts 11ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/pagination/SearchQuantumTasksPaginator.ts 9ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/protocols/Aws_restJson1.ts 193ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/README.md 27ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/runtimeConfig.browser.ts 7ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/runtimeConfig.native.ts 4ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/runtimeConfig.shared.ts 3ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/runtimeConfig.ts 9ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/tsconfig.es.json 3ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/braket.2019/typescript-codegen/tsconfig.json 4ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/source/build-info/smithy-build-info.json 7ms
codegen/sdk-codegen/build/smithyprojections/sdk-codegen/source/model/model.json 51ms
./node_modules/.bin/prettier failed with { code: 2, signal: null }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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

@codecov-commenter
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1498      +/-   ##
==========================================
- Coverage   79.80%   79.77%   -0.03%     
==========================================
  Files         298      299       +1     
  Lines       11502    11810     +308     
  Branches     2475     2483       +8     
==========================================
+ Hits         9179     9422     +243     
- Misses       2323     2388      +65     
Impacted Files Coverage Δ
...l_tests/aws-json/commands/EmptyOperationCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
...ts/aws-query/commands/NoInputAndNoOutputCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
.../aws-restxml/commands/NoInputAndNoOutputCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
...aws-restjson/commands/NoInputAndNoOutputCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
protocol_tests/aws-ec2/commands/XmlBlobsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
protocol_tests/aws-ec2/commands/XmlEnumsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
protocol_tests/aws-ec2/commands/XmlListsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
...rotocol_tests/aws-query/commands/XmlMapsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
...otocol_tests/aws-query/commands/XmlBlobsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
...otocol_tests/aws-query/commands/XmlEnumsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
... and 101 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 e2f33c1...ce2469c. Read the comment docs.

@trivikr trivikr merged commit 0b2ad5d into aws:master Sep 8, 2020
@trivikr trivikr deleted the generate-clients-prettier-error branch September 8, 2020 22:01
@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 Jan 16, 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.

yarn generate-clients command doesn't fail if there's an issue while prettifying code
3 participants