afdo: Use CWP and Benchmark versions as orderfile name.

We used to use chrome version as the orderfile name. As we switch
to async AFDO generate/update, the version of AFDO (benchmark and
CWP) might be different than the Chrome version number. Using
the AFDO version number should be a better representation of the
orderfile. So this patch changes the way we construct orderfile
name.

BUG=chromium:950627
BUG=chromium:988167
TEST=Tryjob passes https://ci.chromium.org/p/chromeos/builders/general/Try/b8906476557547189376

Change-Id: I77357eb2f8d6f454652e5d0f222cff84e94b76c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1725231
Commit-Queue: Tiancong Wang <tcwang@google.com>
Tested-by: Tiancong Wang <tcwang@google.com>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>
diff --git a/api/controller/artifacts.py b/api/controller/artifacts.py
index c35760c..b61f40c 100644
--- a/api/controller/artifacts.py
+++ b/api/controller/artifacts.py
@@ -335,12 +335,9 @@
   # Required args.
   build_target_name = input_proto.build_target.name
   output_dir = input_proto.output_dir
-  chrome_version = input_proto.chrome_version
 
   if not build_target_name:
     cros_build_lib.Die('build_target.name is required.')
-  if not chrome_version:
-    cros_build_lib.Die('chrome_version is required.')
   if not output_dir:
     cros_build_lib.Die('output_dir is required.')
   elif not os.path.isdir(output_dir):
@@ -350,7 +347,7 @@
 
   try:
     results = artifacts.BundleOrderfileGenerationArtifacts(
-        chroot, input_proto.build_target, chrome_version, output_dir)
+        chroot, input_proto.build_target, output_dir)
   except artifacts.Error as e:
     cros_build_lib.Die('Error %s raised in BundleSimpleChromeArtifacts: %s',
                        type(e), e)