commit | b051156b3f1f8f038ad2acae314f1a82c80414cc | [log] [tgz] |
---|---|---|
author | Vadim Shtayura <vadimsh@chromium.org> | Tue Jul 02 22:59:23 2024 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jul 02 22:59:23 2024 |
tree | 4409cbba314e19dc8374ad9422a54cd89f028861 | |
parent | b4e9688da592f4f8b9e747c12098492871d17fc1 [diff] |
[swarming] Refactor `monitor` implementation. This just moves code around and adds interface boundaries. The only non-trivial change is parallel `Finalize(...)` calls (will be important later). The primary motivation is to make `monitor` more extendable. In particular, there are 4 mechanisms in Swarming that need to periodically visit every bot. Instead of 4 separate crons each issuing datastore queries, we can have one query with 4 "visitors" passed to it. Existing `report-bots` cron will do that. Refactor active tasks scanner to be structured the same way for consistency (it isn't hard). There's currently no plan to extend it though. Another goal of this refactoring is to move code out of the giant main.go and make it more modular and testable. All missing tests are added as well. One minor logical change is dropping of tsmon.State after every flush instead of resetting it. We were resetting all metrics reported to the state, this is equivalent to dropping the state and starting with a new fresh state. R=chanli@chromium.org Change-Id: I15380f4e102eaced28208f424e974e6f6feddd99 Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/5671720 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.