tree: a9a91c09d54ffe178315f883aa382f86ac52e6a3 [path history] [tgz]
  1. .coveragerc
  2. .expect_tests.cfg
  3. .gitignore
  4. .style.yapf
  5. OWNERS
  6. README.md
  7. app.yaml
  8. appengine_config.py
  9. backend_main.py
  10. common/
  11. coverage_main.py
  12. cron.yaml
  13. default_main.py
  14. dispatch.yaml
  15. docs/
  16. dto/
  17. endpoint_api.py
  18. findit_backend_main.py
  19. findit_v2/
  20. first_party/
  21. frontend_main.py
  22. gae_libs/
  23. handlers/
  24. index.yaml
  25. infra_api_clients/
  26. libs/
  27. local_libs/
  28. makefile
  29. model/
  30. module-auto-action-backend.yaml
  31. module-code-coverage-backend.yaml
  32. module-code-coverage-frontend.yaml
  33. module-disabled-test-detection-backend.yaml
  34. module-findit-backend.yaml
  35. module-flake-detection-backend.yaml
  36. module-frontend.yaml
  37. module-waterfall-backend.yaml
  38. package-lock.json
  39. package.json
  40. pipelines/
  41. queue.yaml
  42. services/
  43. static/
  44. templates/
  45. test/
  46. third_party/
  47. ui/
  48. util_scripts/
  49. waterfall/
appengine/findit/README.md

Assumptions

The Current Working Directory is $SRC_ROOT/infra/appengine/findit, i.e. the directory that contains this file. Please cd into it for the commands below to work.

Note:

  1. For Mac, if GoogleAppEngineLauncher is used to run Findit locally, you may have to set the field “Extra Flags” under “Launch Settings” with value “$SRC_ROOT/infra/appengine/findit/waterfall-backend.yaml $SRC_ROOT/infra/appengine/findit/waterfall-frontend.yaml”.
  2. For Windows, you may have to read the contents of the makefile to learn how to run all of the commands manually.

How to run Findit locally?

From command line, run: make run

Then open http://localhost:8080 for the home page.

How to run unit tests for Findit?

From command line, run: make test to run all tests; make test TEST_GLOB=<path to a sub dir> to run tests in a sub directory; ‘make test TEST_GLOB=:’ to run a given test.

If a code path branch is not tested and no line number is shown in the command line output, you could check the code coverage report shown in the output.

How to automatically format python code?

YAPF is used to format the code in chromium style, and it is expected to format the code before uploading a CL for review. To install YAPF, please refer to https://github.com/google/yapf.

From command line, run: make format

How to deploy to appengine?

Staging

Deploy to the staging instance (and make it default): make clean && make deploy-staging

Production

Deploy to analysis.chromium.org (production): make clean && make deploy-prod

To make the new version the default: make migrate

Code Structure

  • services/ contains service-layer code for the core analysis logic for compile failures, reliable test failures, and flaky tests.
  • pipelines/ contains code for the pipeline flows that connect the different analysis units from the service layer. We are refactoring waterfall/ into services/ and pipelines/ to separate analysis logic from pipeline flow.

BQ Event Tables

Contact wylieb@ with any questions about this.

To get bqchemaupdater installed run

  cd infra/go
  eval `./env.py`
  ./deps.py update
  ./deps.py install

This should install it in your path.

In the event that you need to create a table, run a command like this:

bqschemaupdater -message-dir <absolute findit dir>/model/proto/
                -table "findit-for-me.events.test"
                -message findit.TestAnalysisCompletionEvent
                -dry-run

From findit/ this command may be out of date. Refer to bqschemaupdater --help.

WARNING: Consult with chrome-findit@ before running any commands that may affect production data. Once you're confident that the command does what you want, remove the -dry-run argument.