commit | 21afe0a94860218e02dc0c94b007a7bead0b839d | [log] [tgz] |
---|---|---|
author | Vadim Shtayura <vadimsh@chromium.org> | Tue Dec 03 00:44:02 2024 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Dec 03 00:44:02 2024 |
tree | 205bf6cb15a7f8552e1801bbeb69554280132028 | |
parent | 626596fb9ab131a3b50ca144119fdf7236f7ea38 [diff] |
[cas-viewer] Fix how it creates gRPC clients. It used to use context.Background() as the root context for gRPC clients and its per-RPC credentials. This worked only due to some fallback on per-request context that the auth library is doing. But it is fragile and at some point it had some changes that resulted in following error happening in this situation: > transport: per-RPC creds failed due to error: a transport or credentials provider created within a context of one user request is used within another user request, this is dangerous This CL makes the client use the root server context that is initialized to make gRPC auth working as expected. Plus some style nits. R=chanli@chromium.org Change-Id: Ib922c08dab3c6dbfc23b9e5e2ef3b86a3db06d96 Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/6065160 Reviewed-by: Chan Li <chanli@chromium.org> Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:
fetch infra cd infra/go eval `./env.py` cd src/go.chromium.org/luci
It is now possible to directly install tools with go install:
go install go.chromium.org/luci/auth/client/cmd/...@latest go install go.chromium.org/luci/buildbucket/cmd/...@latest go install go.chromium.org/luci/cipd/client/cmd/...@latest go install go.chromium.org/luci/client/cmd/...@latest go install go.chromium.org/luci/cv/cmd/...@latest go install go.chromium.org/luci/gce/cmd/...@latest go install go.chromium.org/luci/grpc/cmd/...@latest go install go.chromium.org/luci/logdog/client/cmd/...@latest go install go.chromium.org/luci/luci_notify/cmd/...@latest go install go.chromium.org/luci/lucicfg/cmd/...@latest go install go.chromium.org/luci/luciexe/legacy/cmd/...@latest go install go.chromium.org/luci/mailer/cmd/...@latest go install go.chromium.org/luci/mmutex/cmd/...@latest go install go.chromium.org/luci/resultdb/cmd/...@latest go install go.chromium.org/luci/server/cmd/...@latest go install go.chromium.org/luci/swarming/cmd/...@latest go install go.chromium.org/luci/tokenserver/cmd/...@latest go install go.chromium.org/luci/tools/cmd/...@latest
Contributing uses the same flow as Chromium contributions.