forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
56147: *: update to use gogoproto v1.3 r=erikgrinaker a=knz Fixes cockroachdb#56378. To achieve this version upgrade, some care needed to be taken: - previously, `go.mod` was anchoring gogoproto to v1.2 and our own fork at github.com/cockroachdb/gogoproto. This fork was needed because the original v1.2 gogoproto had a bug, and our upstream PR was never merged: gogo/protobuf#529 Thankfully, gogoproto did eventually fix that bug upstream (in a different way) so we do not need the custom patch anymore in v1.3. So this commit drops the anchor and lets the code start to depend on upstream gogoproto v1.3.1. - doing so causes all `.pb.go` files to be updated, using the latest protobuf code generation changes in gogoproto v1.3. In particular, v1.3 extends its `Message` interface with a new method: ```go MarshalToSizedBuffer(data []byte) (int, error) ``` This behaves like `MarshalTo()` but requires the buffer to have space already for at least `.Size()` more bytes. - because of this new method, `.pb.go` code now requires all its recursively needed `Message` types to also implement the new method. In CockroachDB we have two "external" `.pb.go` dependencies and osome internal custom `Message` implementations (non-autogenerated): - `raftpb` for etcd's Raft protobuf messages - `errorspb` from `cockroachdb/errors` - the `sql/types.T` type. - the `util/hlc.ClockTimestamp` type. All these need to be upgraded to satisfy the new interface. - to upgrade `sql/types.T`, this patch adds the missing method (by means of extending `util/protoutil/marshal.go` accordingly. Because of the transitive minimum version dependencies in `etcd` and `gogo/protobuf`, a couple of other packages were also updated: - github.com/cockroachdb/errors - github.com/gogo/protobuf - github.com/golang/protobuf - github.com/google/go-cmp - github.com/google/uuid - go.etcd.io/etcd/raft - golang.org/x/net - golang.org/x/sys - golang.org/x/text - golang.org/x/time The changes seem fairly contained but the reviewer is invited to take a cursory look nonetheless. Release note: None Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
110 changed files
with
56,981 additions
and
46,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.