-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
release-21.1: deps: upgrade gogoproto and cockroachdb/errors #77677
Conversation
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
I'm not sure I'm entirely comfortable backporting these. What's the motivation? |
Fixing #76571 as requested by @yuzefovich |
I feel like this pulls in too much additional stuff. The diff is 60k lines. Any way to strip this down to the bare minimum? |
Most of this is generated .pb.go, which was checked in in the 21.1 branch. |
Sure, but still -- this seems like a lot. Is it really worth it, especially when this will be out of support in a couple of months anyway? Saw a bunch of conflict markers in here too, btw. E.g.:
|
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
This updates the sentry SDK version from 0.6.1 to 0.12.0. Release note: None Co-authored-by: Rail Aliiev <rail@iqchoice.com>
This upgrades to v1.9.0 and enhances Sentry reports as requested by the SQL queries team. Release justification: low risk, high benefit changes to existing functionality Release note: None
abd2b98
to
0518910
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like a lot.
Excluding the generated files, we're looking at 13 modified go files. Most of this is test code adjustments; the only non-test code change adds protobuf marshal methods.
Is it really worth it, especially when this will be out of support in a couple of months anyway?
That's a good question. I'll let @yuzefovich and @jordanlewis chime in on this.
Saw a bunch of conflict markers in here too
That was just DEPS.bzl. This also auto-generated and I forgot to run the re-gen. Done now.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @erikgrinaker)
Sure, but the dependency bumps here aren't entirely trivial. It's probably fine though -- we use these in 21.2 after all -- but I'd rather avoid the larger bumps if we can. We can't limit this to the sentry package alone, with some small error tweaks? |
That's what I started with, but some point in the line we had errors hard depend on gogoproto 1.3, hence the need to also backport #56147. |
I think given the complications with the backport of #77525 it’s not worth it. Sorry for the trouble Raphael. |
no worries! |
Backports:
Release justification: low risk, high benefit changes to existing functionality
See individual PRs for details