GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Generate gRPC files for long-running operations by boimart1 · Pull Request #13 · googleapis/python-api-common-protos

This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Conversation

@boimart1

@boimart1 boimart1 commented Jun 11, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #12 🦕

(My automatic whitespace formatter removed some trailing whitespace, is this an issue?)

Note that I'm not entirely sure how to work with synthtool, and so I couldn't figure out how to get the license header and formatting fixed before committing the files generated by nox -s generate_protos. Someone else is going to have to do that part for me 🙂 Still, the generated grpc file looks good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
boimart1 added 2 commits June 11, 2020 13:23
@boimart1
Add a command to generate grpc output for LRO
e038959
@boimart1
Complete compatibility fixes
5bcebd6
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 11, 2020
@boimart1
Fixed comment
fa5c706
@boimart1

boimart1 commented Jun 11, 2020

Copy link
Copy Markdown
Contributor Author

Ah, actually, it looks like there are some more import weirdnesses than I expected. The committed
operations_pb2 expects operations_grpc_pb2 to have from operations_proto_pb2 import *, which is what allows it to have access both to the messages and the service definitions... I'm not entirely sure what to do with this 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@boimart1

boimart1 commented Jun 11, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

I'm thinking of leaving the grpc file to its generated name operations_pb2_grpc.py, and having another "redirect" file (like the current operations_pb2.py) which would amount to:

# operations_grpc_pb2.py
from google.longrunning.operations_proto_pb2 import *
from google.longrunning.operations_pb2_grpc import *

This would ensure that all users who currently import either operations_pb2 or operations_grpc_pb2 continue to work as expected.

The only mild downside is the naming mess.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

boimart1 added 3 commits June 11, 2020 14:15
@boimart1
Fixing some potential import issues
c7d6b1f
* Replaced operations_grpc_pb2 with compatibility file
* Removed renaming of newly-genrated operations_pb2_grpc file in noxfile.py
@boimart1
Merge branch 'lro-generate-grpc' of https://github.com/boimart1/pytho…
44134ec
…n-api-common-protos into lro-generate-grpc
@boimart1
Formatting
7833344
@busunkim96

busunkim96 commented Jun 11, 2020

Copy link
Copy Markdown
Contributor

I think the naming mess is kind of unavoidable at this point. 🤷 I'll ping some folks to see if they have more historical context on the LRO directory.

Thank you for the PR!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@busunkim96 busunkim96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 16, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 16, 2020
@busunkim96
feat: generate pb2_grpc.py
f5a2329
@boimart1
boimart1 requested a review from a team December 22, 2020 19:20
@busunkim96 busunkim96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 22, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 22, 2020
@busunkim96
Merge branch 'master' into lro-generate-grpc
5c37e16
busunkim96
busunkim96 approved these changes Dec 22, 2020
View reviewed changes
@busunkim96 busunkim96 changed the title Noxfile: Generate gRPC files for long-running operations fix Generate gRPC files for long-running operations Dec 22, 2020
@busunkim96 busunkim96 changed the title fix Generate gRPC files for long-running operations fix: Generate gRPC files for long-running operations Dec 22, 2020
@busunkim96 busunkim96 added automerge Merge the pull request once unit tests and other checks pass. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 22, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 22, 2020
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit a9ce288 into googleapis:master Dec 22, 2020
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Dec 22, 2020
gcf-merge-on-green Bot pushed a commit that referenced this pull request Jan 27, 2021
@release-please
chore: release 1.53.0dev1 (#32)
d7a3099
🤖 I have created a release \*beep\* \*boop\* 
---
## [1.53.0dev1](https://www.github.com/googleapis/python-api-common-protos/compare/v1.52.0...v1.53.0dev1) (2021-01-27)


### Features

* add `google.api.ResourceDescriptor.Style` ([4ce679c](https://www.github.com/googleapis/python-api-common-protos/commit/4ce679cd49771946bf781108e92e07cdf04a61eb))
* require python >=3.6 and   ([#31](https://www.github.com/googleapis/python-api-common-protos/issues/31)) ([4ce679c](https://www.github.com/googleapis/python-api-common-protos/commit/4ce679cd49771946bf781108e92e07cdf04a61eb))


### Bug Fixes

* add `create_key` to FieldDescriptors ([4ce679c](https://www.github.com/googleapis/python-api-common-protos/commit/4ce679cd49771946bf781108e92e07cdf04a61eb))
* Generate gRPC files for long-running operations ([#13](https://www.github.com/googleapis/python-api-common-protos/issues/13)) ([a9ce288](https://www.github.com/googleapis/python-api-common-protos/commit/a9ce28840ddfec712da5b296f43e6c3131840db4))


### Documentation

* add link to PyPI ([#10](https://www.github.com/googleapis/python-api-common-protos/issues/10)) ([3f79402](https://www.github.com/googleapis/python-api-common-protos/commit/3f7940226b0e22aef31b82c8dc2196aa25b48a3f))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@boimart1
boimart1 deleted the lro-generate-grpc branch April 27, 2021 13:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@busunkim96 busunkim96 busunkim96 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

gRPC code isn't (re)generated for protos containing service definitions

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@boimart1 @busunkim96 @googlebot @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.