Reland "Use Checks to display chromium-binary-size-table-view"

This reverts commit bbaac3d6ec7a017ac7451e07f048c909bba1d7b6.

Reason for revert: fix checks issues

Original change's description:
> Revert "Use Checks to display chromium-binary-size-table-view"
>
> This reverts commit 33dd9cccaa83b40ee8f5d4677ba994e4d446528e.
>
> Reason for revert: errors in this plugin break checks summary
>
> Original change's description:
> > Use Checks to display chromium-binary-size-table-view
> >
> > Currently, the plugin only displays information in a cell format. This
> > change displays this same information using a new table under the
> > Checks tab. Both formats are still available.
> >
> > Bug: 1228935
> > Change-Id: Icaa809874a5ff1db9539a868577494425fcfde64
>
> Bug: 1228935, 1241560
> Change-Id: I7125003d918ec8dd16c7b6bbaa98096457ed1b40

Bug: 1228935, 1241560
Change-Id: Idc6699803a68dd866e287c3d23f71e956471b0d0
7 files changed
tree: e94ecaaf1ee4d6e65469de283b514c6fd80ace80
  1. java/
  2. static/
  3. test/
  4. .eslintrc.json
  5. .gitignore
  6. BUILD
  7. codereview.settings
  8. LICENSE
  9. OWNERS
  10. package-lock.json
  11. package.json
  12. README.md
  13. run-with-prod-data.sh
  14. run-with-testsite.sh
  15. wct.conf.json
README.md

Chromium Binary Size Plugin for Gerrit

How it works

The plugin queries the android-binary-size trybot for the current patchset on Gerrit, and gets the binary_size_plugin property. This property contains the metadata about the binary size metrics affected by the patchset in question. It then shows an inline table with the metric deltas + links to SuperSize output.

Usage

This plugin is configured via the chromium-binary-size.config file present in the repo‘s refs/meta/config ref, as well as the same file in all repositories in the repo’s inheritance chain (up to and including All-Projects).

An example chromium-binary-size.config is below (this enables the plugin on the chromium/src repo using the android-binary-size trybot:

[host]
  gerrit = "chromium-review.googlesource.com"

[repo "chromium/src"]
  builder = "android-binary-size"
  bucket = "try"
  project = "chromium"

All changes to chromium-binary-size.config files are instantly reflected. There is no caching period or need to restart the server.

Development

git clone --recursive https://gerrit.googlesource.com/gerrit
cd gerrit/plugins

git clone https://chromium.googlesource.com/infra/gerrit-plugins/chromium-binary-size
cd chromium-binary-size

Run the polygerrit-ui server against live data

Use the script run-with-prod-data.sh (based on polygerrit-ui/run-server.sh). You may change some paths by setting environment variables, for example:

GERRIT_DIR="$HOME/gerrit" ./run-with-prod-data.sh

Testing

npm run wct-test