Reapply "Refactor: Inject RegressionRefiner into detector and consumers"

This reverts commit 8ee19fefe5b2e70686f9f5129068a5dede3dbf77.

Change-Id: Ie4192f7ca4b92b23a27989ae437f900c11f6510d
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/1183903
Reviewed-by: Marcin Mordecki <mordeckimarcin@google.com>
Commit-Queue: Viktar Zinkou <viktarzinkou@google.com>
12 files changed
tree: b739f7d6ba8cc7b9e2216f5be9d70eee8159cd2a
  1. am/
  2. android_ingest/
  3. android_stats/
  4. api/
  5. attest/
  6. autoroll/
  7. bash/
  8. bazel/
  9. blamer/
  10. bugs-central/
  11. cabe/
  12. cbb/
  13. cd/
  14. cdn/
  15. cherrypick-watcher/
  16. cmd/
  17. codesize/
  18. comments/
  19. cq_watcher/
  20. ct/
  21. datahopper/
  22. debugger-app/
  23. demos/
  24. docker/
  25. docs/
  26. docsyserver/
  27. ds/
  28. elements-sk/
  29. external/
  30. fiddlek/
  31. firestore/
  32. get_service_account/
  33. gitsync/
  34. go/
  35. gold-client/
  36. golden/
  37. helloworld/
  38. infra/
  39. infra-sk/
  40. jsdoc/
  41. jsfiddle/
  42. k8s-checker/
  43. k8s-deployer/
  44. kube/
  45. leasing/
  46. licenses/
  47. machine/
  48. make/
  49. mcp/
  50. modules/
  51. named-fiddles/
  52. new_element/
  53. npm-audit-mirror/
  54. perdiff/
  55. perf/
  56. periodic-trigger/
  57. pinpoint/
  58. proberk/
  59. promk/
  60. puppeteer-tests/
  61. rag/
  62. sa-keys-checker/
  63. scrap/
  64. scripts/
  65. shaders/
  66. sk/
  67. skbug/
  68. skcq/
  69. skfe/
  70. skolo/
  71. skottie/
  72. static_server/
  73. status/
  74. task_driver/
  75. task_scheduler/
  76. temporal/
  77. test-service/
  78. tool/
  79. tools/
  80. tree_status/
  81. trybot_updater/
  82. .bazelignore
  83. .bazelrc
  84. .bazelversion
  85. .eslintrc.js
  86. .gitattributes
  87. .gitignore
  88. .mockery.yaml
  89. .npmrc
  90. .prettierignore
  91. .prettierrc.json
  92. .puppeteerrc.js
  93. .pylintrc
  94. .vpython
  95. BAZEL_CHEATSHEET.md
  96. BUILD.bazel
  97. build_infra_prod.sh
  98. CDB.md
  99. codereview.settings
  100. DATASTORE.md
  101. demopage.sh
  102. DEPS
  103. elements.d.ts
  104. go.mod
  105. go.sum
  106. karmatest.sh
  107. launch.md
  108. LICENSE
  109. LINT.md
  110. Makefile
  111. MODULE.bazel
  112. MODULE.bazel.lock
  113. OWNERS
  114. package-lock.json
  115. package.json
  116. pnpm-lock.yaml
  117. PRESUBMIT.py
  118. PRIVACY_POLICY.md
  119. puppeteerrc.bzl
  120. puppeteerrc.js.tpl
  121. README.md
  122. requirements.txt
  123. run_lint.sh
  124. STYLEGUIDE.md
  125. tools.go
  126. tsconfig.json
  127. whitespace.txt
README.md

Skia-Buildbot Repository

This repo contains infrastructure code for Skia.

Supported Infrastucture Platforms

The infrastructure code is generally built to run on x86 linux. Running on other platforms may be possible but is not officially supported and success will vary depending on the command.

Getting the Source Code

The main source code repository is a Git repository hosted at https://skia.googlesource.com/buildbot.git. It is possible to check out this repository directly with git clone or via go get.

Using git clone allows you to work in whatever directory you want. You will still need to set GOPATH in order to build some apps (recommended to put this in a cache dir). E.g.:

$ cd ${WORKDIR}
$ git clone https://skia.googlesource.com/buildbot.git
$ export GOPATH=${HOME}/.cache/gopath/$(basename ${WORKDIR})
$ mkdir $GOPATH
$ cd buildbot

Install dependencies

Almost all applications are built with Bazel, and bazelisk is the recommended tool to ensure you have the right version of bazel installed:

go install github.com/bazelbuild/bazelisk@latest
go install github.com/bazelbuild/buildtools/buildifier@latest
go install github.com/kisielk/errcheck@latest
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/mikefarah/yq/v4@latest
go install go.chromium.org/luci/client/cmd/...@latest

Add bazelisk to path

export PATH=$PATH:$(go env GOPATH)/bin

Install Node.js and npm

You will need Node.js and npm installed to run web infrastructure tests and linters. We recommend using nvm to manage Node versions.

After installing Node.js, run the following command to install repository dependencies (including linter tools):

npm install

Install other dependencies:

sudo apt-get install jq

Build ~everything

bazelisk build --config=mayberemote //...

Test everything

Set up environ variables

This step might be an optional step, but some test requires these enviornment variables.

Runs

./scripts/run_emulators/run_emulators start

The following are example of environment variables.

Emulators started. Set environment variables as follows:
export DATASTORE_EMULATOR_HOST=localhost:8891
export BIGTABLE_EMULATOR_HOST=localhost:8892
export PUBSUB_EMULATOR_HOST=localhost:8893
export FIRESTORE_EMULATOR_HOST=localhost:8894
export COCKROACHDB_EMULATOR_HOST=localhost:8895

And stores these environment variables to ~/.bashrc file.

Execute tests

bazelisk test --config=mayberemote //...

Generated Code

To update generated code run the following in any directory:

go generate ./...

Running unit tests

Install Cloud SDK.

Use this command to run the presubmit tests:

./run_unittests --small