upload_prebuilts: Permit not syncing remote SDK
Added two new flags to `scripts/upload_prebuilts.py` in order to prevent
syncing the remote latest SDK (or to explicitly sync, which is the
default behavior):
--no-sync-remote-sdk-latest-file
--sync-remote-sdk-latest-file
In cbuildbot, disabled syncing if not `options.publish`. This should
prevent tryjobs with --no-publish-prebuilt-confs from updating the
remote latest SDK file, as in the attached bug.
BUG=b:274196697
TEST=run_tests
Change-Id: Ib15b3f600defa85fb5b36bca0a1298c459b9ad06
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4361599
Reviewed-by: Cindy Lin <xcl@google.com>
Auto-Submit: Greg Edelston <gredelston@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Greg Edelston <gredelston@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Greg Edelston <gredelston@google.com>
diff --git a/scripts/upload_prebuilts_unittest.py b/scripts/upload_prebuilts_unittest.py
index a4f096c..dc67119 100644
--- a/scripts/upload_prebuilts_unittest.py
+++ b/scripts/upload_prebuilts_unittest.py
@@ -502,7 +502,7 @@
report,
)
uploader.SyncBoardPrebuilts(
- self.key, True, True, True, None, None, None, None, None
+ self.key, True, True, True, None, None, None, None, None, True
)
determine_mock.assert_has_calls(
[
@@ -577,6 +577,7 @@
options.packages = []
options.sync_host = True
options.git_sync = True
+ options.sync_remote_latest_sdk_file = True
options.upload_board_tarball = True
options.prepackaged_tarball = None
options.toolchains_overlay_tarballs = []
@@ -641,6 +642,7 @@
"",
[],
"",
+ options.sync_remote_latest_sdk_file,
)
host_mock.assert_called_once_with(
options.key, options.git_sync, options.sync_binhost_conf
@@ -741,6 +743,7 @@
to_upload_path,
tc_tarballs,
tc_upload_path,
+ True,
)
self.upload_mock.assert_has_calls(upload_calls)