cv: Make behavior consistent wrt merge commits, and improve behavior

In general, builders are triggered (and location filters are ignored)
for CLs which are merge commits.

Previously, for location_regexp the build would be triggered if there are 0 files changed total.

After this change, CV checks number of parents when determining merge commits, and ignores filters if any CLs are merge commits. With location_filters, we additionally check if host and project would match any files in the merge commit.

Bug: 1171945
Change-Id: Ibc32bf9eb3b9cb388d101eed374ecb2591957f66
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/3783951
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
5 files changed
tree: 662d7fc7654980850407d35d5063c006e6c7666a
  1. appengine/
  2. auth/
  3. auth_service/
  4. build/
  5. buildbucket/
  6. casviewer/
  7. cipd/
  8. client/
  9. cmdrunner/
  10. common/
  11. config/
  12. cv/
  13. deploy/
  14. examples/
  15. gae/
  16. gce/
  17. grpc/
  18. hacks/
  19. hardcoded/
  20. led/
  21. logdog/
  22. luci_notify/
  23. lucicfg/
  24. lucictx/
  25. luciexe/
  26. mailer/
  27. milo/
  28. mmutex/
  29. provenance/
  30. resultdb/
  31. scheduler/
  32. scripts/
  33. server/
  34. starlark/
  35. swarming/
  36. tokenserver/
  37. tools/
  38. vpython/
  39. web/
  40. .gitallowed
  41. .gitattributes
  42. .golangci.yml
  43. AUTHORS
  44. codereview.settings
  45. CONTRIBUTING.md
  46. CONTRIBUTORS
  47. go.mod
  48. go.sum
  49. LICENSE
  50. OWNERS
  51. PRESUBMIT.py
  52. README.md
  53. tools.go
  54. WATCHLISTS
README.md

luci-go: LUCI services and tools in Go

GoReference

Installing

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

Contributing uses the same flow as Chromium contributions.