Skip to content

DEPS: upgrade grpc to v1.57.2 #138283

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

Merged
merged 5 commits into from
Jan 14, 2025
Merged

DEPS: upgrade grpc to v1.57.2 #138283

merged 5 commits into from
Jan 14, 2025

Conversation

tbg
Copy link
Member

@tbg tbg commented Jan 6, 2025

See #136278 (comment).

grpc has gotten a little worse at allocations, but it's overall similarly fast, perhaps even a little faster in the smaller RPCs we care most about.

Benchmark results

$ benchdiff --old lastmerge ./pkg/rpc -b -r 'BenchmarkGRPCPing' -d 1s -c 10
old:  3ce8f44 Merge #138561 #138779 #138793
new:  3708ee5 DEPS: add resolve hints and update packages

name                                        old time/op    new time/op    delta
GRPCPing/bytes=____256/rpc=UnaryUnary-24       126µs ± 3%     124µs ± 2%  -1.59%  (p=0.035 n=9+10)
GRPCPing/bytes=___8192/rpc=StreamStream-24     126µs ± 3%     124µs ± 1%  -1.32%  (p=0.011 n=10+10)
GRPCPing/bytes=______1/rpc=UnaryUnary-24       124µs ± 4%     123µs ± 3%    ~     (p=0.315 n=10+10)
GRPCPing/bytes=______1/rpc=StreamStream-24    70.3µs ± 3%    70.8µs ± 2%    ~     (p=0.393 n=10+10)
GRPCPing/bytes=____256/rpc=StreamStream-24    74.5µs ± 3%    75.1µs ± 2%    ~     (p=0.105 n=10+10)
GRPCPing/bytes=___1024/rpc=UnaryUnary-24       123µs ± 6%     120µs ± 4%    ~     (p=0.661 n=10+9)
GRPCPing/bytes=___1024/rpc=StreamStream-24    67.4µs ± 8%    67.4µs ± 6%    ~     (p=0.720 n=10+9)
GRPCPing/bytes=___2048/rpc=UnaryUnary-24       133µs ± 5%     133µs ± 4%    ~     (p=0.986 n=10+10)
GRPCPing/bytes=___2048/rpc=StreamStream-24    73.9µs ± 1%    74.6µs ± 2%    ~     (p=0.234 n=8+8)
GRPCPing/bytes=___4096/rpc=UnaryUnary-24       150µs ± 2%     151µs ± 3%    ~     (p=0.182 n=9+10)
GRPCPing/bytes=___4096/rpc=StreamStream-24    97.4µs ±10%    95.3µs ±10%    ~     (p=0.393 n=10+10)
GRPCPing/bytes=___8192/rpc=UnaryUnary-24       175µs ± 1%     176µs ± 2%    ~     (p=0.720 n=9+10)
GRPCPing/bytes=__16384/rpc=UnaryUnary-24       252µs ± 1%     253µs ± 1%    ~     (p=0.315 n=9+10)
GRPCPing/bytes=__16384/rpc=StreamStream-24     190µs ± 1%     189µs ± 2%    ~     (p=0.497 n=9+10)
GRPCPing/bytes=__32768/rpc=UnaryUnary-24       363µs ± 1%     366µs ± 1%    ~     (p=0.079 n=10+9)
GRPCPing/bytes=__32768/rpc=StreamStream-24     305µs ± 3%     305µs ± 1%    ~     (p=0.579 n=10+10)
GRPCPing/bytes=__65536/rpc=UnaryUnary-24       512µs ± 2%     515µs ± 1%    ~     (p=0.095 n=9+10)
GRPCPing/bytes=__65536/rpc=StreamStream-24     449µs ± 1%     452µs ± 1%    ~     (p=0.059 n=9+8)
GRPCPing/bytes=_262144/rpc=UnaryUnary-24      1.48ms ± 3%    1.48ms ± 2%    ~     (p=0.739 n=10+10)
GRPCPing/bytes=_262144/rpc=StreamStream-24    1.42ms ± 1%    1.41ms ± 2%    ~     (p=0.182 n=9+10)
GRPCPing/bytes=1048576/rpc=UnaryUnary-24      5.90ms ± 2%    5.86ms ± 1%    ~     (p=0.278 n=10+9)
GRPCPing/bytes=1048576/rpc=StreamStream-24    5.81ms ± 2%    5.84ms ± 3%    ~     (p=0.631 n=10+10)

name                                        old speed      new speed      delta
GRPCPing/bytes=____256/rpc=UnaryUnary-24    4.44MB/s ± 3%  4.51MB/s ± 2%  +1.58%  (p=0.033 n=9+10)
GRPCPing/bytes=___8192/rpc=StreamStream-24   130MB/s ± 3%   132MB/s ± 1%  +1.32%  (p=0.010 n=10+10)
GRPCPing/bytes=______1/rpc=UnaryUnary-24     386kB/s ± 4%   391kB/s ± 3%    ~     (p=0.378 n=10+10)
GRPCPing/bytes=______1/rpc=StreamStream-24   682kB/s ± 3%   676kB/s ± 2%    ~     (p=0.189 n=10+9)
GRPCPing/bytes=____256/rpc=StreamStream-24  7.52MB/s ± 3%  7.46MB/s ± 2%    ~     (p=0.100 n=10+10)
GRPCPing/bytes=___1024/rpc=UnaryUnary-24    17.1MB/s ± 6%  17.4MB/s ± 4%    ~     (p=0.645 n=10+9)
GRPCPing/bytes=___1024/rpc=StreamStream-24  31.1MB/s ± 8%  31.1MB/s ± 6%    ~     (p=0.720 n=10+9)
GRPCPing/bytes=___2048/rpc=UnaryUnary-24    31.1MB/s ± 5%  31.2MB/s ± 4%    ~     (p=0.986 n=10+10)
GRPCPing/bytes=___2048/rpc=StreamStream-24  56.1MB/s ± 1%  55.6MB/s ± 2%    ~     (p=0.224 n=8+8)
GRPCPing/bytes=___4096/rpc=UnaryUnary-24    55.1MB/s ± 2%  54.6MB/s ± 3%    ~     (p=0.189 n=9+10)
GRPCPing/bytes=___4096/rpc=StreamStream-24  85.1MB/s ±11%  87.0MB/s ±11%    ~     (p=0.393 n=10+10)
GRPCPing/bytes=___8192/rpc=UnaryUnary-24    93.7MB/s ± 1%  93.5MB/s ± 2%    ~     (p=0.720 n=9+10)
GRPCPing/bytes=__16384/rpc=UnaryUnary-24     130MB/s ± 1%   130MB/s ± 1%    ~     (p=0.305 n=9+10)
GRPCPing/bytes=__16384/rpc=StreamStream-24   173MB/s ± 1%   173MB/s ± 2%    ~     (p=0.497 n=9+10)
GRPCPing/bytes=__32768/rpc=UnaryUnary-24     180MB/s ± 1%   179MB/s ± 1%    ~     (p=0.079 n=10+9)
GRPCPing/bytes=__32768/rpc=StreamStream-24   215MB/s ± 2%   215MB/s ± 1%    ~     (p=0.579 n=10+10)
GRPCPing/bytes=__65536/rpc=UnaryUnary-24     256MB/s ± 2%   255MB/s ± 1%    ~     (p=0.095 n=9+10)
GRPCPing/bytes=__65536/rpc=StreamStream-24   292MB/s ± 1%   290MB/s ± 1%    ~     (p=0.059 n=9+8)
GRPCPing/bytes=_262144/rpc=UnaryUnary-24     353MB/s ± 3%   353MB/s ± 2%    ~     (p=0.447 n=10+9)
GRPCPing/bytes=_262144/rpc=StreamStream-24   369MB/s ± 1%   371MB/s ± 2%    ~     (p=0.182 n=9+10)
GRPCPing/bytes=1048576/rpc=UnaryUnary-24     355MB/s ± 2%   358MB/s ± 1%    ~     (p=0.278 n=10+9)
GRPCPing/bytes=1048576/rpc=StreamStream-24   361MB/s ± 2%   359MB/s ± 3%    ~     (p=0.631 n=10+10)

name                                        old alloc/op   new alloc/op   delta
GRPCPing/bytes=______1/rpc=UnaryUnary-24      16.9kB ± 1%    16.9kB ± 3%    ~     (p=0.579 n=10+10)
GRPCPing/bytes=____256/rpc=UnaryUnary-24      19.8kB ± 2%    19.9kB ± 2%    ~     (p=0.755 n=10+10)
GRPCPing/bytes=____256/rpc=StreamStream-24    7.35kB ± 2%    7.43kB ± 2%    ~     (p=0.052 n=10+10)
GRPCPing/bytes=___1024/rpc=UnaryUnary-24      29.8kB ± 2%    29.8kB ± 1%    ~     (p=0.853 n=10+10)
GRPCPing/bytes=___1024/rpc=StreamStream-24    17.7kB ± 1%    17.7kB ± 1%    ~     (p=0.796 n=10+10)
GRPCPing/bytes=___2048/rpc=UnaryUnary-24      43.2kB ± 1%    43.0kB ± 1%    ~     (p=0.218 n=10+10)
GRPCPing/bytes=___2048/rpc=StreamStream-24    31.0kB ± 0%    31.1kB ± 1%    ~     (p=0.278 n=9+10)
GRPCPing/bytes=___4096/rpc=UnaryUnary-24      73.0kB ± 1%    73.2kB ± 1%    ~     (p=0.393 n=10+10)
GRPCPing/bytes=___4096/rpc=StreamStream-24    61.6kB ± 1%    61.7kB ± 0%    ~     (p=0.573 n=10+8)
GRPCPing/bytes=___8192/rpc=UnaryUnary-24       127kB ± 0%     127kB ± 1%    ~     (p=0.393 n=10+10)
GRPCPing/bytes=___8192/rpc=StreamStream-24     118kB ± 1%     118kB ± 0%    ~     (p=0.796 n=10+10)
GRPCPing/bytes=__16384/rpc=UnaryUnary-24       237kB ± 1%     237kB ± 1%    ~     (p=0.579 n=10+10)
GRPCPing/bytes=__16384/rpc=StreamStream-24     227kB ± 1%     227kB ± 1%    ~     (p=0.481 n=10+10)
GRPCPing/bytes=__32768/rpc=UnaryUnary-24       500kB ± 1%     500kB ± 1%    ~     (p=0.912 n=10+10)
GRPCPing/bytes=__32768/rpc=StreamStream-24     492kB ± 0%     492kB ± 0%    ~     (p=0.968 n=9+10)
GRPCPing/bytes=__65536/rpc=UnaryUnary-24       873kB ± 0%     872kB ± 0%    ~     (p=0.780 n=9+10)
GRPCPing/bytes=__65536/rpc=StreamStream-24     868kB ± 0%     868kB ± 0%    ~     (p=1.000 n=9+9)
GRPCPing/bytes=_262144/rpc=UnaryUnary-24      3.50MB ± 0%    3.51MB ± 0%    ~     (p=0.436 n=10+10)
GRPCPing/bytes=_262144/rpc=StreamStream-24    3.49MB ± 0%    3.50MB ± 0%    ~     (p=0.436 n=10+10)
GRPCPing/bytes=1048576/rpc=UnaryUnary-24      13.5MB ± 0%    13.5MB ± 0%    ~     (p=0.515 n=8+10)
GRPCPing/bytes=1048576/rpc=StreamStream-24    13.5MB ± 0%    13.5MB ± 0%    ~     (p=0.549 n=10+9)
GRPCPing/bytes=______1/rpc=StreamStream-24    4.08kB ± 3%    4.18kB ± 3%  +2.28%  (p=0.008 n=9+10)

name                                        old allocs/op  new allocs/op  delta
GRPCPing/bytes=_262144/rpc=UnaryUnary-24         282 ± 4%       286 ± 4%    ~     (p=0.223 n=10+10)
GRPCPing/bytes=_262144/rpc=StreamStream-24       147 ± 3%       149 ± 3%    ~     (p=0.053 n=9+8)
GRPCPing/bytes=1048576/rpc=UnaryUnary-24         510 ± 2%       513 ± 3%    ~     (p=0.656 n=8+9)
GRPCPing/bytes=1048576/rpc=StreamStream-24       370 ± 6%       377 ± 3%    ~     (p=0.168 n=9+9)
GRPCPing/bytes=____256/rpc=UnaryUnary-24         183 ± 0%       184 ± 0%  +0.71%  (p=0.000 n=8+10)
GRPCPing/bytes=______1/rpc=UnaryUnary-24         183 ± 0%       184 ± 0%  +0.77%  (p=0.000 n=10+8)
GRPCPing/bytes=__32768/rpc=UnaryUnary-24         211 ± 0%       213 ± 0%  +0.95%  (p=0.000 n=10+10)
GRPCPing/bytes=__16384/rpc=UnaryUnary-24         195 ± 0%       197 ± 0%  +1.03%  (p=0.000 n=10+10)
GRPCPing/bytes=___8192/rpc=UnaryUnary-24         184 ± 0%       186 ± 0%  +1.09%  (p=0.000 n=10+10)
GRPCPing/bytes=___2048/rpc=UnaryUnary-24         183 ± 0%       185 ± 0%  +1.09%  (p=0.000 n=10+10)
GRPCPing/bytes=___4096/rpc=UnaryUnary-24         183 ± 0%       185 ± 0%  +1.09%  (p=0.000 n=10+10)
GRPCPing/bytes=___1024/rpc=UnaryUnary-24         182 ± 0%       184 ± 0%  +1.10%  (p=0.000 n=10+10)
GRPCPing/bytes=__65536/rpc=UnaryUnary-24         219 ± 0%       221 ± 0%  +1.10%  (p=0.000 n=10+8)
GRPCPing/bytes=__32768/rpc=StreamStream-24      75.0 ± 0%      77.0 ± 0%  +2.67%  (p=0.000 n=10+10)
GRPCPing/bytes=__65536/rpc=StreamStream-24      83.0 ± 0%      85.3 ± 1%  +2.77%  (p=0.000 n=9+10)
GRPCPing/bytes=__16384/rpc=StreamStream-24      57.0 ± 0%      59.0 ± 0%  +3.51%  (p=0.000 n=10+10)
GRPCPing/bytes=___8192/rpc=StreamStream-24      51.0 ± 0%      53.0 ± 0%  +3.92%  (p=0.000 n=10+10)
GRPCPing/bytes=___4096/rpc=StreamStream-24      49.0 ± 0%      51.0 ± 0%  +4.08%  (p=0.000 n=10+10)
GRPCPing/bytes=___2048/rpc=StreamStream-24      48.0 ± 0%      50.0 ± 0%  +4.17%  (p=0.000 n=10+10)
GRPCPing/bytes=______1/rpc=StreamStream-24      47.0 ± 0%      49.0 ± 0%  +4.26%  (p=0.000 n=10+10)
GRPCPing/bytes=____256/rpc=StreamStream-24      47.0 ± 0%      49.0 ± 0%  +4.26%  (p=0.000 n=10+10)
GRPCPing/bytes=___1024/rpc=StreamStream-24      47.0 ± 0%      49.0 ± 0%  +4.26%  (p=0.000 n=10+10)

Epic: None
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg
Copy link
Member Author

tbg commented Jan 6, 2025

This builds just fine but bazel-remote seems to throw a spanner in the works:

$ go mod tidy -v
go: finding module for package google.golang.org/genproto/googleapis/bytestream
go: found google.golang.org/genproto/googleapis/bytestream in google.golang.org/genproto/googleapis/bytestream v0.0.0-20250102185135-69823020774d
unused cloud.google.com/go/compute
$ go mod why google.golang.org/genproto/googleapis/bytestream
# google.golang.org/genproto/googleapis/bytestream
github.com/cockroachdb/cockroach/pkg/cmd/import-tools
github.com/buchgr/bazel-remote
github.com/buchgr/bazel-remote/server
google.golang.org/genproto/googleapis/bytestream

https://github.com/buchgr/bazel-remote/blob/v1.3.3/go.mod#L24

When we get that version of bytestream it forces the grpc upgrade:

$ go get google.golang.org/genproto/googleapis/bytestream@v0.0.0-20241219192143-6b3ec007d9bb
go: downloading google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb
go: downloading google.golang.org/genproto/googleapis/bytestream v0.0.0-20241219192143-6b3ec007d9bb
go: upgraded google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 => v0.0.0-20240814211410-ddb44dafa142
go: added google.golang.org/genproto/googleapis/bytestream v0.0.0-20241219192143-6b3ec007d9bb
go: upgraded google.golang.org/grpc v1.57.2 => v1.67.1

because of this require:

https://github.com/googleapis/go-genproto/blob/6b3ec007d9bb/googleapis/bytestream/go.mod#L6

I don't think that requirement is particularly hard. bytestream.pb.go only references grpc's codes and status packages, which I don't think change much.

https://github.com/googleapis/go-genproto/blame/6b3ec007d9bb/googleapis/bytestream/bytestream.pb.go#L29-L30

Looking at the git blame, it seems like it's auto-updated all the time. Not useful imo.

So one thing we could do is to fork google.golang.org/genproto and lower the required version in go.mod of googleapis/bytestream. We could also probably add a replace directive for the grpc version.

@rickystewart what do you think?

@tbg tbg mentioned this pull request Jan 8, 2025
16 tasks
@rickystewart
Copy link
Collaborator

Hmm. I'm pretty uncertain about upgrading grpc just to replace it with a previous version... it's going to have an impact on all of our dependency resolution going forward, in a way that seems unintuitive to me. i.e., if we're going to be using grpc v1.57.2, we should be using the go.mod at that version. I'm not totally ruling it out now but I don't understand what problem it solves.

I don't fully understand the train of thought in your comment. The goal is to upgrade grpc to v1.57.2. Why does that necessitate updating bytestream and what does bazel-remote have to do with it?

@rickystewart
Copy link
Collaborator

FYI, it looks like the staticcheck errors introduced in this PR are pretty severe.

@tbg
Copy link
Member Author

tbg commented Jan 10, 2025

Hmm. I'm pretty uncertain about upgrading grpc just to replace it with a previous version... it's going to have an impact on all of our dependency resolution going forward, in a way that seems unintuitive to me. i.e., if we're going to be using grpc v1.57.2, we should be using the go.mod at that version. I'm not totally ruling it out now but I don't understand what problem it solves.

I don't like this either. The problem is that I find myself unable to upgrade to v1.57.2 without hacks.

I don't fully understand the train of thought in your comment. The goal is to upgrade grpc to v1.57.2. Why does that necessitate updating bytestream and what does bazel-remote have to do with it?

It's less a train of thought than a reaction to circumstances beyond my grasp. I did the following:

  1. checkout master

  2. go get go get google.golang.org/grpc@v1.57.2. You end up with, well, exactly the first commit. Note that this upgrades the dependency on google.golang.org/genproto and also picks up one on google.golang.org/genproto/googleapis/rpc.

  3. go mod tidy -v and you see this (simply copy-pasted from my earlier comment):

$ go get google.golang.org/genproto/googleapis/bytestream@v0.0.0-20241219192143-6b3ec007d9bb
go: downloading google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb
go: downloading google.golang.org/genproto/googleapis/bytestream v0.0.0-20241219192143-6b3ec007d9bb
go: upgraded google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 => v0.0.0-20240814211410-ddb44dafa142
go: added google.golang.org/genproto/googleapis/bytestream v0.0.0-20241219192143-6b3ec007d9bb
go: upgraded google.golang.org/grpc v1.57.2 => v1.67.1

I can never quite follow what go mod tidy does so here I am out of my depth. But note how it's adding a dependency on google.golang.org/genproto/googleapis/bytestream v0.0.0-20250102185135-69823020774d.

The only import for this package is through bazel-remote. As of the first commit (pre go mod tidy):

$ go mod why google.golang.org/genproto/googleapis/bytestream
# google.golang.org/genproto/googleapis/bytestream
github.com/cockroachdb/cockroach/pkg/cmd/import-tools
github.com/buchgr/bazel-remote
github.com/buchgr/bazel-remote/server
google.golang.org/genproto/googleapis/bytestream

and this matches what happens on master as well. So, my reading is: bazel-remote depends on bytestream. By upgrading grpc, we are slightly changing dependencies. Very likely we are running into a situation in which bytestream used to be a package inside google.golang.org/genproto and then they made it a proper package under import path google.golang.org/genproto/googleapis/bytestream (note how we have both in go.mod). Upgrading grpc pokes this house of cards ever so slightly, and likely forces us across this boundary, and we end up in dependency hell where some deps want the old one, and some deps want the new one.

Sadly, google.golang.org/genproto/googleapis/bytestream's dependencies are updated by some bot, and it pretty much always requires the "latest and greatest" of everything. This includes grpc, which it depends on (since bytestream exposes a grpc service definition for, well, a byte stream):

https://github.com/googleapis/go-genproto/blob/6b3ec007d9bbc2c59cfbe49919d03c804b56fa86/googleapis/bytestream/go.mod#L6

so go mod tidy dutifully concludes that we ought to have grpc at least at v1.67.1, which we empathically don't want.

It's not fair to blame bazel-remote for this, though. The version we're depending on has very sane (read: old) dependencies:

https://github.com/buchgr/bazel-remote/blob/400101af9d14bae5fb400b80b8dbd279b4b30075/go.mod#L23-L24

but just the fact that it depends on bytestream, which very eagerly upgrades dependencies, is a problem.

I'm unsure how to proceed, but I hope that I've given you an idea of what's going on here.

@tbg
Copy link
Member Author

tbg commented Jan 10, 2025

Btw: upgrading genproto was the point of the entire exercise, see this comment by @andreimatei:

#136278 (comment)

@tbg
Copy link
Member Author

tbg commented Jan 10, 2025

I think I'm on to something. Give me a minute.

Another attempt at refining the narrative.

Upgrading gRPC forces google.golang.org/genproto past the point at which they made a number of former packages proper submodules. bytestream is among them.

However, nobody seems to really depend on bytestream from the module. Our bazel-remote specifies genproto: https://github.com/buchgr/bazel-remote/blob/400101af9d14bae5fb400b80b8dbd279b4b30075/go.mod#L23-L24

Something is nudging us into the bytestream submodule, and at that point, things go downhill since a fairly recent version gets picked, that then depends on "too new" grpc. Who's forcing us into this?

After the grpc bump (before the go mod tidy that screws everything up), we depend on this genproto:

https://github.com/googleapis/go-genproto/tree/0005af68ea5

Before (i.e. master), it was this one:

https://github.com/googleapis/go-genproto/tree/daa745c078e1

In the old one, bytestream is not a submodule. In the new one, it is. So far so good.

Who depends on the package? I think it's just bazel-remote:

$ go mod why google.golang.org/genproto/googleapis/bytestream
# google.golang.org/genproto/googleapis/bytestream
github.com/cockroachdb/cockroach/pkg/cmd/import-tools
github.com/buchgr/bazel-remote
github.com/buchgr/bazel-remote/server
google.golang.org/genproto/googleapis/bytestream

and in particular nobody imports the module (yet):

crdb grpc157tmp$ go mod why -m google.golang.org/genproto/googleapis/bytestream
# google.golang.org/genproto/googleapis/bytestream
(main module does not need module google.golang.org/genproto/googleapis/bytestream)

however, this isn't stable. Because genproto was bumped, it no longer has the googleapis/bytestream subpackage. tidy realizes this is now a proper module, and adds a dependency. Maybe it just picks a pretty new one because why not?

Let's feed it a sane one, the oldest possible one in fact: googleapis/go-genproto@2805bf8

$ go get google.golang.org/genproto/googleapis/bytestream@2805bf891e895db98bfa8bf3202ceb2862953e06
go: downloading google.golang.org/genproto v0.0.0-20230525234009-2805bf891e89
go: downloading google.golang.org/genproto/googleapis/bytestream v0.0.0-20230525234009-2805bf891e89
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
go: added google.golang.org/genproto/googleapis/bytestream v0.0.0-20230525234009-2805bf891e89

This is good! It didn't mess with grpc yet. We keep v1.57.2 and go.mod doesn't have any unexpected changes.

$ go mod tidy -v

Omg I think this did the trick.

A few former subpackages are now proper modules, which
requires some gazelle/bzl wrangling.

This caused a few spurious diffs where unrelated lines
got reordered. I didn't do this manually.
@tbg tbg marked this pull request as ready for review January 13, 2025 09:26
@tbg tbg requested review from a team as code owners January 13, 2025 09:26
@tbg tbg requested review from dhartunian and removed request for a team January 13, 2025 09:26
@dhartunian dhartunian removed their request for review January 13, 2025 16:23
Copy link
Collaborator

@rickystewart rickystewart left a comment

Choose a reason for hiding this comment

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

Nice!

@tbg
Copy link
Member Author

tbg commented Jan 14, 2025

Added benchmark results - I wouldn't call them "favorable" exactly (more small allocs), but at least it's not a major regression and the single-thread latency is same or slightly better in the areas where we most care about it.

Given the pain this saves with the deps, I'll have to say it's worth it.
TFTR!

bors r+

@craig craig bot merged commit 2857e2b into cockroachdb:master Jan 14, 2025
22 checks passed
@andrewbaptist
Copy link
Contributor

@tbg I think this commit is causing a problem.

On my GCE worker:

baptist_cockroachlabs_com@gceworker-abaptist:~/go/src/github.com/cockroachdb/cockroach$ git log -1 --oneline
2857e2b75b4 (HEAD -> master, origin/master, origin/HEAD) Merge #137916 #138283 #138939
baptist_cockroachlabs_com@gceworker-abaptist:~/go/src/github.com/cockroachdb/cockroach$ ./dev build
Configuring cache...
ERROR: no such package '@@org_golang_google_genproto//googleapis/bytestream': BUILD file not found in directory 'googleapis/bytestream' of external repository @@org_golang_google_genproto. Add a BUILD file to a directory to mark it as a package.
ERROR: /home/baptist_cockroachlabs_com/.cache/bazel/_bazel_baptist_cockroachlabs_com/c4b51e1172eebd24640c1a006851f929/external/com_github_buchgr_bazel_remote/server/BUILD.bazel:3:11: no such package '@@org_golang_google_genproto//googleapis/bytestream': BUILD file not found in directory 'googleapis/bytestream' of external repository @@org_golang_google_genproto. Add a BUILD file to a directory to mark it as a package. and referenced by '@@com_github_buchgr_bazel_remote//server:go_default_library'
ERROR: Analysis of target '@@com_github_buchgr_bazel_remote//:bazel-remote' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.112s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: exit status 1

tbg added a commit to tbg/cockroach that referenced this pull request Jan 14, 2025
This broke silently in cockroachdb#138283.
craig bot pushed a commit that referenced this pull request Jan 14, 2025
139041: DEPS: fix build when cache clear r=tbg a=tbg

This broke silently in #138283. As of that PR, you'd get

```
$ ./dev cache --down; ./dev cache --clear; bazel clean --expunge; ./dev build short
```

fail with

```
ERROR: no such package '`@@org_golang_google_genproto_googleapis//rpc/code':` The repository '`@@org_golang_google_genproto_googleapis'` could not be resolved: Repository '`@@org_golang_google_genproto_googleapis'` is not defined
ERROR: /private/var/tmp/_bazel_tbg/b1346cddcc70d57afdaa90f7f09f9b2c/external/com_github_buchgr_bazel_remote/server/BUILD.bazel:3:11: no such package '`@@org_golang_google_genproto_googleapis//rpc/code':` The repository '`@@org_golang_google_genproto_googleapis'` could not be resolved: Repository '`@@org_golang_google_genproto_googleapis'` is not defined and referenced by '`@@com_github_buchgr_bazel_remote//server:go_default_library'`
ERROR: Analysis of target '`@@com_github_buchgr_bazel_remote//:bazel-remote'` failed; build aborted: Analysis failed
```

Now it works.

Closes #139038.

Epic: none
Release note: none

Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
@tbg tbg deleted the grpc-1.57.2 branch January 14, 2025 20:27
mohini-crl pushed a commit to mohini-crl/cockroach that referenced this pull request Jan 17, 2025
This broke silently in cockroachdb#138283.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants