Skip to content

samples: add more TS samples#1666

Merged
feywind merged 18 commits intogoogleapis:mainfrom
feywind:more-ts-samples
Feb 17, 2023
Merged

samples: add more TS samples#1666
feywind merged 18 commits intogoogleapis:mainfrom
feywind:more-ts-samples

Conversation

@feywind
Copy link
Collaborator

@feywind feywind commented Dec 16, 2022

Convert more samples to TypeScript, to work with the typeless sample bot.

feywind and others added 4 commits December 14, 2022 13:29
…for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport (googleapis#1663)

* chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport

chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java)
PiperOrigin-RevId: 493113566

Source-Link: googleapis/googleapis@758f0d1

Source-Link: googleapis/googleapis-gen@78bd8f0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Megan Potter <57276408+feywind@users.noreply.github.com>
@feywind feywind requested a review from a team as a code owner December 16, 2022 22:04
@feywind feywind requested a review from a team December 16, 2022 22:04
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: pubsub Issues related to the googleapis/nodejs-pubsub API. samples Issues that are directly related to samples. labels Dec 16, 2022
@snippet-bot
Copy link

snippet-bot bot commented Dec 16, 2022

Here is the summary of changes.

You are about to add 71 region tags.
You are about to delete 35 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 16, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 16, 2022
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 16, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 16, 2022
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 16, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 16, 2022
@feywind feywind added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 16, 2022
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 25, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 25, 2023
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 31, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 31, 2023
@feywind feywind removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 8, 2023
Copy link

@bcoe bcoe left a comment

Choose a reason for hiding this comment

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

Left a couple comments. I think you should be able to simplify OwlBot.py, given that we have typeless sample bot installed already no?

logger.debug("Update typeless sample bot [1.1.0]")
shell.run(["npm", "i", "@google-cloud/typeless-sample-bot@1.1.0"])
logger.debug("Update typeless sample bot [1.3.0]")
shell.run(["npm", "i", "@google-cloud/typeless-sample-bot@1.3.0"])
Copy link

Choose a reason for hiding this comment

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

I thought we built @google-cloud/typeless-sample-bot into the post-processor, why is this install necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mentioned in Karl's issue on the main bot repo, but I was basically saving review/release time looping through synthtool. It's my intent to get synthtool updated once it's fully stabilized, and I can remove this in another PR.

# sure quickstart.js gets gts fixed before the README is generated.
# This needs to be worked out more properly, this is temporary.
logger.debug("Copy eslint config")
shell.run(
Copy link

Choose a reason for hiding this comment

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

gts should already be built into the container, see:

https://github.com/googleapis/synthtool/blob/master/synthtool/languages/node.py#L216

Which should be called by owlbot_main already.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, the trouble is that there's a chicken and egg problem that needs solving here :\ We need to gts fix the quickstart.js before the README gets generated by OwlBot. There are probably better ways to fix this, I'm happy to talk it over :)

Copy link

Choose a reason for hiding this comment

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

I wonder if we could change the order of operations in synthtool to solve this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mentioned in chat, but recorded here for posterity: because of the README generation step, the quickstart requires a gts pre-pass, but I'll work out how to fix this and come back with a PR removing the manual install and hopefully fixing that.

@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 17, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 17, 2023
@feywind feywind merged commit faa885f into googleapis:main Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the googleapis/nodejs-pubsub API. samples Issues that are directly related to samples. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants