Replace Set<BlockingCondition> with "required" boolean

BlockingCondition was originally implemented as a checker field used to
describe conditions that block a submission. While this is useful for
Checkers, it is not useful for Checks since the frontend needs to
interpret them correctly.

This change creates an alternative field that directly indicates whether
this specific check is relevant for submit of a change. Also, this helps
the backend more accurately reflect the submit impact as considered within
the submit rule.

No storage changes are necessary and hense no mgiration is required.

Follow-up changes will have the "required" field entering another Info
entity for the purpose of having it easier to add more fields which are
in direct relation to whether a change can be submitted, by having all
those fields grouped under the same entity.

Another follow-up change will have documentation updates.

This change only adds an alternative to BlockingCondition without
removing support for it. Thus, it doesn't break the frontend.
However, the frontend should still adjust by using the new field. Once
the frontend is done, I can clean the backend by removing the legacy
BlockingCondition, as it is used only by the frontend.

Change-Id: I1790c62a6ee048fb7171b8a43ca95ca370dda210
5 files changed
tree: 2632fc5208c3331e0884a225f05f618d5e7a040b
  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.

When upgrading the plugin, please use init:

java -jar gerrit.war init -d site_path

More details about “init” in https://gerrit-review.googlesource.com/Documentation/pgm-init.html