[lucicfg] Add empty core.gitiles_poller, define 'triggers/triggered_by' rels.

It's a first instance of polymorphism in lucicfg: 'triggered_by' can refer to
either a builder or a gitiles_poller. As additional complication, we allow to
refer to builders via either their full names ("<bucket>/<name>") or short names
("<name>"), if the latter is non-ambiguous. Same for gitiles_poller names.

This is resolved by introduction of a new internal 'triggerer' node: it is an
entity that can be referred to in 'triggered_by' relation. Both 'builder' and
'gitiles_poller' (each) have two 'triggerer' nodes as children: a bucket-scoped
one and a global one.

This is very similar to 'builder_ref', except the direction of the relation is
reversed: a 'builder_ref' has associated builders as children, but 'triggerer'
has them as parents. This allows to catch cycles in triggering graphs.

For example, a builder that triggers itself produces the following cycle:
  core.builder_ref('b') ->
  core.builder('ci/b') ->
  core.triggerer('ci/b') ->
  core.builder_ref('b')

While such cycle doesn't necessarily mean an invalid configuration, it does
have a potential to introduce a positive feedback loop in runtime that can blow
everything up, so we forbid them.

R=tandrii@chromium.org, nodir@chromium.org
BUG=833946

Change-Id: I25b21a51fc2b355a8688182ccf55820c768ee46b
Reviewed-on: https://chromium-review.googlesource.com/c/1394188
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
10 files changed
tree: 2640fd25293bb40c96fe2273db4c5fd3afeb30c0
  1. appengine/
  2. auth/
  3. buildbucket/
  4. cipd/
  5. client/
  6. common/
  7. config/
  8. cq/
  9. dm/
  10. examples/
  11. gce/
  12. grpc/
  13. hardcoded/
  14. infra/
  15. logdog/
  16. luci_notify/
  17. lucicfg/
  18. lucictx/
  19. machine-db/
  20. milo/
  21. mmutex/
  22. mp/
  23. scheduler/
  24. scripts/
  25. server/
  26. starlark/
  27. tokenserver/
  28. tools/
  29. tumble/
  30. vpython/
  31. web/
  32. .travis.yml
  33. AUTHORS
  34. codereview.settings
  35. CONTRIBUTING.md
  36. CONTRIBUTORS
  37. LICENSE
  38. OWNERS
  39. pre-commit-go.yml
  40. PRESUBMIT.py
  41. README.md
README.md

luci-go: LUCI services and tools in Go

GoDoc

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

Contributing

Contributing uses the same flow as Chromium contributions.