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

Different types between this repo and Bazel #944

Closed
linzhp opened this issue Nov 27, 2022 · 1 comment
Closed

Different types between this repo and Bazel #944

linzhp opened this issue Nov 27, 2022 · 1 comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@linzhp
Copy link

linzhp commented Nov 27, 2022

Currently in this repo, google.golang.org/genproto/googleapis/storage/v2.Bucket_RetentionPolicy.RetentionPeriod is int64:

RetentionPeriod int64 `protobuf:"varint,3,opt,name=retention_period,json=retentionPeriod,proto3" json:"retention_period,omitempty"`

However, the one generated from Bazel rules in https://github.com/googleapis/googleapis/blob/master/google/storage/v2/BUILD.bazel is *int64. Which one is correct?

Environment details

  • Programming language: Go
  • OS: macOS
  • Language runtime version:
  • Package version:

Steps to reproduce

  1. git clone [email protected]:googleapis/googleapis.git
  2. cd googleapis
  3. bazel build --output_groups=go_generated_srcs @go_googleapis//google/storage/v2:storage_go_proto
  4. open bazel-bin/google/storage/v2/storage_go_proto_/google.golang.org/genproto/googleapis/storage/v2/storage.pb.go
  5. search for "RetentionPeriod"
@linzhp linzhp added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 27, 2022
@noahdietz
Copy link
Contributor

tl;dr: The protos in googleapis are the source of truth and should be trusted over this specific instance of the generated code. This code should not be depended on directly.

Hello, the googleapis/storage/v2 package is not maintained and hasn't been since July 28. The actual service for these protos is not publicly available and the code should not be depended upon, as described in the package documentation. We will likely be removing this code. If you are a customer in private testing of the Storage v2 API, Go support is not in scope of that testing yet.

If you bumped into an issue because rules_go or your dependencies are providing a version of genproto that also conflicts with a version of the cloud.google.com/go/storage client library, please upgrade your version of cloud.google.com/go/storage to v1.24.0 or later. This release contains a move off of genproto for storage stubs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants