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

feat!: convert library to TypeScript, adding v1p1beta1 import #198

Merged
merged 11 commits into from
Feb 5, 2020

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Jan 25, 2020

This moves us to the TypeScript generator, which allows us to start pulling in fancy 👖 new updates to the API.

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

codecov bot commented Jan 25, 2020

Codecov Report

Merging #198 into master will increase coverage by 64.37%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #198       +/-   ##
===========================================
+ Coverage   28.56%   92.93%   +64.37%     
===========================================
  Files          40        7       -33     
  Lines       11220     9965     -1255     
  Branches        0      266      +266     
===========================================
+ Hits         3205     9261     +6056     
+ Misses       8015      701     -7314     
- Partials        0        3        +3
Impacted Files Coverage Δ
src/v1/security_center_client.ts 93.07% <ø> (ø)
src/v1p1beta1/security_center_client.ts 93.07% <ø> (ø)
src/v1beta1/security_center_client.ts 92.37% <ø> (ø)
src/index.ts 100% <100%> (ø)
src/v1beta1/index.ts 100% <100%> (ø)
src/v1p1beta1/index.ts 100% <100%> (ø)
src/v1/index.ts 100% <100%> (ø)
... and 4 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 3c536e6...b00e76c. Read the comment docs.

Copy link
Contributor

@xiaozhenliu-gg5 xiaozhenliu-gg5 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this Ben!

Seems the proto annotation for v1beta1 and v1p1beta1 is not published, so the path templates of resources are not generated properly in client.ts, which breaks the samples-test.

package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@xiaozhenliu-gg5 xiaozhenliu-gg5 left a comment

Choose a reason for hiding this comment

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

LGTM with a minor question, thanks!

output: {
library: 'security-center',
library: 'SecurityCenter',
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if it's a breaking change for library name @alexander-fenster ?

@alexander-fenster
Copy link
Contributor

This will be breaking because the set of path templates is different (we are missing some helper methods such as assetSecurityMarksPath(organization, asset)). This is not a problem with your generation, it's an annotation problem that I'm trying to figure out with my team.

We can either merge it as a breaking change now (and if annotations are fixed later, add them), or wait for a while until this is sorted out. I will let you know!

@alexander-fenster alexander-fenster changed the title feat: convert library to TypeScript, adding v1p1beta1 import feat!: convert library to TypeScript, adding v1p1beta1 import Jan 31, 2020
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 with breaking changes - if it's not OK then let's wait for a while to get it sorted out

@alexander-fenster alexander-fenster added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 31, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 31, 2020
synth.py Outdated
# [END fix-dead-link]
# There's an internal tracking ticket for this generation bug b/148673437
# we should remove this replacement hack as soon as it is addressed:
s.replace("protos/google/cloud/securitycenter/v1p1beta1/notification_config.proto", r"""// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is cool! I'm making this change internally, then we'll be able to remove this hack. Internal CL 292600161

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.

Please wait for the generator update to generate all the path templates (even though they are not directly referenced).

@alexander-fenster
Copy link
Contributor

googleapis/gapic-generator-typescript#220 will take care of this.

package.json Outdated
@@ -1,18 +1,31 @@
{
"name": "@google-cloud/security-center",
"description": "Cloud Security Command Center API client for Node.js",
"version": "2.3.2",
"version": "2.3.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, the version drop is weird

@xiaozhenliu-gg5
Copy link
Contributor

Newest image is published and I generated security-center which picks the missing resources back, can you try one more time? @bcoe Thanks!

@bcoe bcoe merged commit 0adb7d0 into master Feb 5, 2020
@bcoe bcoe deleted the typescript-conversion branch February 5, 2020 18:53
@release-please release-please bot mentioned this pull request Feb 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.

6 participants