commit | 1d2b2c2887f2e1cf9d19deab313e2a138d7dd1e6 | [log] [tgz] |
---|---|---|
author | Samuel Huang <huangs@chromium.org> | Thu Nov 12 14:21:54 2020 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Nov 12 14:21:54 2020 |
tree | 1e52420ebb6e3b8d7da57555696fc8023f8089ef | |
parent | d37f5069b5b2060363168184fb674aedafd5a09d [diff] |
Reland "[Binary Size] Transition to size_config_json flow." This reverts commit f69d2267d8c7c45f1cbb8a7f4617e5ac1dfdaef2. The step "Read size config JSON" fails because the step uses |self.m.chromium.output_dir|, but it turns out that the property is initialized when self.m.chromium_checkout.ensure_checkout() is called. However, in the original implementation, the size config JSON (via version string) also controls how ensure_checkout() is called (via recent_upload_revision), leading to a chicken-and-egg problem! The new solution is cache LATEST file usage, and split its usage into: _check_for_recent_tot_analysis() (for line 1), _has_significant_binary_package_restructure() (for line 2), and then call the second check (which uses |output_dir|) after the initial self.m.chromium_checkout.ensure_checkout() call. An alternative is to call self.m.chromium_checkout.ensure_checkout() always first, so that |output_dir| becomes available. However, this approach causes more churn and causes more test file diffs, so we're not adopting it. > Revert "[Binary Size] Transition to size_config_json flow." > > This reverts commit f69d2267d8c7c45f1cbb8a7f4617e5ac1dfdaef2. > > Reason for revert: Failure Step('Read size config JSON') on android-binary-size bot. > > Original change's description: > > [Binary Size] Transition to size_config_json flow. > > > > Previously the binary_size recipe has two ways to specify SuperSize main > > file and mapping files: > > * Old flow: Using android.{apk_name, mapping_names}. > > * New flow: Using size_config_json. > > > > This CL removes the old flow and activates the new flow. The default > > size config JSON in config/MonochromePublic_size_config.json (under > > Chromium output directory) specifies the same input files as before. > > This change also activates the usage of new command line arguments in > > size scripts > > generate_commit_size_analysis.py, > > trybot_commit_size_checker.py, > > thereby allowing old command line arguments to be removed. > > > > The normal_significant_binary_package_restructure test is updated to > > perform override_analyze(), so that the test better reflect the effects > > of version string change. > > > > Bug: 1040645 > > Change-Id: I1dd6ea6cd22705b5e2e4fd41962f6efb028bc860 > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2527713 > > Commit-Queue: Samuel Huang <huangs@chromium.org> > > Reviewed-by: Andrew Grieve <agrieve@chromium.org> > > TBR=huangs@chromium.org,agrieve@chromium.org,mheikal@chromium.org,infra-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: Id0d75cd4995a1a37081b0b59120fa1ca42002f92 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 1040645 > TBR: agrieve@chromium.org > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2533600 > Auto-Submit: Samuel Huang <huangs@chromium.org> > Commit-Queue: Garrett Beaty <gbeaty@chromium.org> > Reviewed-by: Garrett Beaty <gbeaty@chromium.org> Bug: 1040645 Change-Id: Iee7cca345d5b57e8a63e4c12081f257e4958775e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2533602 Reviewed-by: Andrew Grieve <agrieve@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org>
If you're here to make a change to ‘recipes’ (the code located in scripts/slave/recipes*
), please take a look at the README for more information pertaining to recipes.
The preferred style is PEP8 with two-space indent; that is, the Chromium Python style. Functions use lowercase_with_underscores
, with the exception of the special functions RunSteps
and RunTests
in recipes. Use yapf (git cl format --no-clang-format
) to autoformat new code.