Skip to content
This repository was archived by the owner on Jul 13, 2023. It is now read-only.

feat!: move to typescript code generation#264

Merged
xiaozhenliu-gg5 merged 73 commits intomasterfrom
move-to-typescript
Mar 5, 2020
Merged

feat!: move to typescript code generation#264
xiaozhenliu-gg5 merged 73 commits intomasterfrom
move-to-typescript

Conversation

@xiaozhenliu-gg5
Copy link
Contributor

@xiaozhenliu-gg5 xiaozhenliu-gg5 commented Jan 14, 2020

BREAKING CHANGE: helper function generated for resource gets changed, cryptoKeyPathPathTemplate is removed from Typescript client.

  1. convert src/v1/kmsclient.js to Typescript, and manually add IamClient to the service. (by synth.py)
  2. helper.ts creates the iamClient service and provides three methods getIamPolicy, setIamPolicy, testIamPermission for kms client.
  3. Manually add extra_proto_list.json for extra Iam service protos.
  4. Manually write iam_policy_service_client_config.json
  5. Add unit test for three extra methods from IAM service.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 14, 2020
@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@89fc97b). Click here to learn what that means.
The diff coverage is 64.52%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     googleapis/gapic-generator-typescript#264   +/-   ##
=========================================
  Coverage          ?   86.55%           
=========================================
  Files             ?        4           
  Lines             ?     3205           
  Branches          ?      101           
=========================================
  Hits              ?     2774           
  Misses            ?      430           
  Partials          ?        1
Impacted Files Coverage Δ
src/index.ts 100% <100%> (ø)
src/helper.ts 28.07% <33.62%> (ø)
src/v1/key_management_service_client.ts 90.89% <80.56%> (ø)

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 89fc97b...ceb08e9. Read the comment docs.

Copy link
Contributor

@alexander-fenster alexander-fenster left a comment

Choose a reason for hiding this comment

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

LGTM but let's first figure out the problem with the missing path template.

@xiaozhenliu-gg5
Copy link
Contributor Author

seems SetIamPolicy and GetIamPolicy is defined in googleapis/googleapis/google/cloud/kms/v1/cloudkms_gapic.yaml and it reroutes to google.iam.v1.IAMPolicy which is not supported by micro-generator now.

reroute_to_grpc_interface: google.iam.v1.IAMPolicy

For go, they add the rerouting methods manually to generated client code, [but in separate directory, or it will be rewritten by synthtool], can you give some suggestions here? @alexander-fenster Thanks

@alexander-fenster
Copy link
Contributor

(replied in person, adding response here for documentation purposes)

I think we need to generate IAM client (in synth.py) and then mix-in IAM and KMS clients together, similar to how I did a mix-in in speech API.

@alexander-fenster alexander-fenster changed the title feat: move to typescript code generation feat!: move to typescript code generation Mar 3, 2020
@alexander-fenster
Copy link
Contributor

@xiaozhenliu-gg5 Please update the PR message with some short description of what's changed (starting with BREAKING CHANGE line, as shown here).

Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

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

LGTM, but let @alexander-fenster give it the final look :)

Copy link
Contributor

@alexander-fenster alexander-fenster left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

@xiaozhenliu-gg5 xiaozhenliu-gg5 merged commit ad02c1c into master Mar 5, 2020
@release-please release-please bot mentioned this pull request Mar 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants