Skip to content
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

Ruby: Convert Descriptor to DescriptorProto #12044

Open
willbryant opened this issue Feb 24, 2023 · 7 comments
Open

Ruby: Convert Descriptor to DescriptorProto #12044

willbryant opened this issue Feb 24, 2023 · 7 comments
Labels

Comments

@willbryant
Copy link

willbryant commented Feb 24, 2023

What language does this apply to?
Ruby, proto2 in particular.

Describe the problem you are trying to solve.

Exactly the same as #9425 for C#, we need to send a DescriptorProto to use the BigQuery Storage write streaming API. The Ruby bindings allow us to generate the message class and get it as a Descriptor, but there doesn't seem to be an API to convert this to a DescriptorProto as required for the proto2 writer_schema argument.

Describe the solution you'd like

Just like #9426 for C#.

Describe alternatives you've considered

Manually constructing a Descriptor that is identical to the message class's fields.

Additional context
Add any other context or screenshots about the feature request here.

@willbryant willbryant added the untriaged auto added to all issues by default when created. label Feb 24, 2023
@acozzette acozzette added ruby and removed untriaged auto added to all issues by default when created. labels Feb 24, 2023
@haberman
Copy link
Member

It would be relatively trivial to add to_proto methods on the descriptor classes. At the upb level we have an API that is perfect for this: https://github.com/protocolbuffers/upb/blob/main/upb/util/def_to_proto.h

@dazuma
Copy link
Contributor

dazuma commented Aug 9, 2023

This has come up a few times for Ruby. There's an ugly workaround described here: googleapis/google-cloud-ruby#19093 but we should provide a real solution.

Copy link

github-actions bot commented Dec 3, 2023

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Dec 3, 2023
@willbryant
Copy link
Author

Still an issue, bot :)

@github-actions github-actions bot removed the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Dec 4, 2023
@haberman
Copy link
Member

This would be fairly straightforward to contribute, but I'm not able to prioritize it myself.

@haberman haberman removed their assignment Jan 30, 2024
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Apr 30, 2024
@willbryant
Copy link
Author

Still an issue.

@github-actions github-actions bot removed the inactive Denotes the issue/PR has not seen activity in the last 90 days. label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants