commit | 8a2853232613a9b6ad94dfcb3ea911a41861b42b | [log] [tgz] |
---|---|---|
author | Robert Iannucci <iannucci@chromium.org> | Wed Feb 08 01:49:28 2023 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Feb 08 01:49:28 2023 |
tree | d5b552ab65621324fb5f737e65359cc003ac50f5 | |
parent | 281ab7eeede5bdc13b158373df2e2e30774d0855 [diff] |
[common/errors] Correctly render regular Go errors implementing Unwrap. Previously Unwrap was mostly implemented by LUCI errors... however the stdlib adopted an identical interface (yay!) which ended up triggering a bug in the error rendering logic. Specifically, the error rendering logic buffers all wrappers until it encounters a LUCI stackframe (stackContexter) in the error. Upon encountering a stackContexter, it will then print all of the encountered wrappers in the context of that stack frame. However, this rendering logic failed to account for cases where the error is either entirely an external error, or is an annotation of an external error and would end up fully unwrapping an error, but then discarding all of that wrapper information. Now the rendering logic will keep a pointer to the last stackContexter it actually encountered. Once it finishes unwrapping the error all the way to the bottom, it will render the original error from the point in the error tree where it last saw a stackContexter. This also means that for pure Go errors (with no stack context at all), they will now be rendered without the `original error:` preamble which is part of the stack trace display. R=vadimsh Change-Id: Ifd005c52e8407c9ff90a9fe6b5dd320e56d7d831 Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/4229612 Commit-Queue: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: 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.