commit | 30962d0f3493597f1a70bd74b0612020a736e4aa | [log] [tgz] |
---|---|---|
author | Robert Iannucci <iannucci@chromium.org> | Thu May 02 22:17:50 2024 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 02 22:17:50 2024 |
tree | 05a0cd022dbc79c07b94703dd3ec2102ae0991a9 | |
parent | 2280219f647e62fcc435017c500329e922455ea2 [diff] |
[testing/assert/result] Add proto representation for Result. This will replace the Go Result type, fixing a couple issues: 1) Currently Result carries around Go values as `any` and relies on reflect.DeepEquals to compare Result objects in tests. Using a proto will remove the temptation for the Result to carry non-primitive types. 2) Results may be rendered by multiple implementations (e.g. for CLI, log output, JSON, web). This proto tries to strike a balance between deferred rendering and complexity of the intermediate type. 3) We can remove `structuraldiff` from the library (or perhaps use it internally for some comparison functions). The lingua franca will be plain strings now. 4) Reduces the criticality of using a builder for the Result object - the proto doc will clearly describe what the responsibility of a well-formed Result is, and the builder will be helpful (but not essential) to generate a Result. 5) Rendering logic will be extracted from the core Result type and will be pushed to various output places. R=gregorynisbet@google.com Bug: 319730573 Change-Id: Ic3fb5b641ceb3f360dd0f5369367150189c8c163 Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/5512986 Commit-Queue: Robbie Iannucci <iannucci@chromium.org> Auto-Submit: Robbie Iannucci <iannucci@chromium.org> Commit-Queue: Gregory Nisbet <gregorynisbet@google.com> Reviewed-by: Gregory Nisbet <gregorynisbet@google.com>
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.