commit | 50ae1af1c43e4ef8130566af32481fad0c32b308 | [log] [tgz] |
---|---|---|
author | Gavin Mak <gavinmak@google.com> | Fri Jan 07 00:49:57 2022 |
committer | Gavin Mak <gavinmak@google.com> | Fri Jan 07 02:03:28 2022 |
tree | 5282cb436cc5c18cc70484f0c3fc0a5b5606747a | |
parent | 475880871f86ed01e10e22ab5a5015f208d8541c [diff] |
Provide more informative summaries and messages Currently, no information about binary size is surfaced unless the user expands the result row. This CL surfaces pertinent information instead, like changes to the binary size and any failing checks. This CL also increases the visibility of build status messages like "Scheduling the android-binary-size tryjob" by placing it in the Checks summary instead of message. Bug: 1228935 Change-Id: I363acb716cff8c486e176b82e6e2bbfce6c488bc
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.
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.
This plugin must be placed inside the Gerrit plugins directory:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit/plugins git clone https://chromium.googlesource.com/infra/gerrit-plugins/chromium-binary-size
For running Java unit tests execute:
bazel test --test_output=all //plugins/chromium-binary-size:chromium-binary-size_tests
For running TypeScript unit tests execute:
bazel test --test_output=all //plugins/chromium-binary-size/web:karma_test
For checking or fixing eslint formatter problems run:
bazel test //plugins/chromium-binary-size/web:lint_test bazel run //plugins/chromium-binary-size/web:lint_bin -- --fix "$(pwd)/plugins/chromium-binary-size/web"
For testing the plugin with Gerrit FE Dev Helper build the JavaScript bundle and copy it to the plugins/chromium-binary-size
folder:
bazel build //plugins/chromium-binary-size/web:chromium-binary-size cp -f bazel-bin/plugins/chromium-binary-size/web/chromium-binary-size.js plugins/chromium-binary-size
and let the Dev Helper redirect from .+/plugins/chromium-binary-size/static/chromium-binary-size.js
to http://localhost:8081/plugins_/plugins/chromium-binary-size.js
.