Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(pubsub): Add commit_proto_schema to samples #29241

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aandreassa
Copy link
Contributor

No description provided.

@aandreassa aandreassa force-pushed the pubsub_commit_proto_schema branch 5 times, most recently from 77cf0a9 to c6d1abf Compare February 27, 2025 23:03
@aandreassa aandreassa force-pushed the pubsub_commit_proto_schema branch from c6d1abf to 4bb6ef0 Compare February 27, 2025 23:33
def revision_id
return nil if reference?
@grpc.revision_id if @grpc.revision_id && !@grpc.revision_id.empty?
end
Copy link
Member

Choose a reason for hiding this comment

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

Note: these are functional changes to the library. If we include these, we'll need to apply the feat: conventional commit tag.

##
# The revision ID of the schema.
#
# @return [String] The revision id.
Copy link
Member

Choose a reason for hiding this comment

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

Need to document that this can also return nil. One way to do that is to have a second @return tag, e.g.

# @return [String] The revision id.
# @return [nil] If this object is a reference.

def commit_proto_schema schema_id:, proto_file:
# [START pubsub_commit_proto_schema]
# schema_id = "your-schema-id"
# proto_file = "path/to/a/proto/file/(.proto)/formatted/in/protocol/buffers"
Copy link
Member

Choose a reason for hiding this comment

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

This is a little odd because the value is not a well-formed example path. How about just "path/to/a/proto_file.proto"?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants