Allow for an online migration of checker ref

This commit is a follow-up to the checker ref migration. It allows
for an online migration, that is, a migration while the system is
running. To do so, we check if the legacy ref exists and use it,
if it does.
This way, we can roll out the new code without having to migrate
the refs in the same go. It also allows for rollbacks more easily.

The code will use the new ref, if the legacy ref does not exist.

We add a test to assert the behavior and apply some finishing
touches to the existing test code was well as move the migration
class from the 'api' to the 'db' package.

Change-Id: I86dea2bd1617cf0ec0db35b6cee59630e9e136a4
5 files changed
tree: 75bf0c4d1a5d208778956384a6616281b30b2dfc
  1. gr-checks/
  2. java/
  3. javatests/
  4. proto/
  5. resources/
  6. test/
  7. .eslintrc.json
  8. .gitignore
  9. .gitreview
  10. bower.json
  11. BUILD
  12. LICENSE
  13. package.json
  14. README.md
README.md

Gerrit Code Review Checks Plugin

This plugin provides a unified experience for checkers (CI systems, static analyzers, etc.) to integrate with Gerrit Code Review.

This plugin uses polymer-cli to test.

After bower install, running polymer test -l chrome will run all tests in Chrome, and running polymer serve and navigating to http://127.0.0.1:8081/components/checks/gr-checks/gr-checks-view_test.html allows for manual debugging.