afdo: Adapt to AFDO bits moving outside of Chrome ebuild.
This patch deals with the reality that AFDO bits are no longer in
Chrome ebuild. We need to change the verification builder to:
(1) Update Chrome ebuild differently to use a created release profile;
(affects chrome-afdo-release-verify)
(2) Change the implementation we read profiles names from ebuild; now
we read the names from a file in Chromium;
(affects orderfile-generate-toolchain)
(3) Only upload a release profile to vetted bucket, i.e. we no longer
upload invidual benchmark and CWP profiles to bucket, because they are
not used (by Chrome ebuild) anymore.
(affects chrome-afdo-release-verify)
BUG=chromium:1001227
TEST=orderfile-generate-toolchain-tryjob https://ci.chromium.org/p/chromeos/builders/general/Try/b8900238346705646032
TEST=chrome-afdo-release-verify https://ci.chromium.org/p/chromeos/builders/general/Try/b8900497108143477904
Change-Id: I7cc72b29c1fd3cd9626b4226429a51e045553ff8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1828331
Tested-by: Tiancong Wang <tcwang@google.com>
Commit-Queue: Tiancong Wang <tcwang@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
diff --git a/api/controller/artifacts.py b/api/controller/artifacts.py
index 6183fc4..8974ec5 100644
--- a/api/controller/artifacts.py
+++ b/api/controller/artifacts.py
@@ -425,6 +425,7 @@
@validate.require('build_target.name', 'output_dir')
@validate.is_in('artifact_type', _VALID_ARTIFACT_TYPES)
@validate.exists('output_dir')
+@validate.exists('chroot.chrome_dir')
@validate.validation_complete
def BundleAFDOGenerationArtifacts(input_proto, output_proto, _config):
"""Generic function for creating tarballs of both AFDO and orerfile.
@@ -437,6 +438,9 @@
# Required args.
build_target = build_target_util.BuildTarget(input_proto.build_target.name)
+ chrome_root = input_proto.chroot.chrome_dir
+ if not chrome_root:
+ cros_build_lib.Die('chrome_root is not included in chroot')
output_dir = input_proto.output_dir
artifact_type = input_proto.artifact_type
@@ -445,7 +449,7 @@
try:
is_orderfile = bool(artifact_type is toolchain_pb2.ORDERFILE)
results = artifacts.BundleAFDOGenerationArtifacts(
- is_orderfile, chroot,
+ is_orderfile, chroot, chrome_root,
build_target, output_dir)
except artifacts.Error as e:
cros_build_lib.Die('Error %s raised in BundleSimpleChromeArtifacts: %s',