Require size_bytes for first class GCS dep

GCS deps will require a size_bytes field of type `int`. If gclient
sees that the actual byte size is different than the noted size, it
will raise an exception.

Bug: b/328065441
Change-Id: If61496eae39cd372966d7e64ba4a84759708c60b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5367540
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
This commit is contained in:
Stephanie Kim
2024-03-18 17:28:47 +00:00
committed by LUCI CQ
parent 59c1900dd6
commit d71daa7bd8
3 changed files with 19 additions and 1 deletions

View File

@@ -896,12 +896,14 @@ deps = {
'object_name': 'deadbeef',
'dep_type': 'gcs',
'sha256sum': 'abcd123',
'size_bytes': 10000,
},
'src/another_gcs_dep': {
'bucket': '456bucket',
'object_name': 'Linux/llvmfile.tar.gz',
'dep_type': 'gcs',
'sha256sum': 'abcd123',
'size_bytes': 10000,
},
'src/gcs_dep_with_output_file': {
'bucket': '789bucket',
@@ -909,6 +911,7 @@ deps = {
'dep_type': 'gcs',
'sha256sum': 'abcd123',
'output_file': 'clang-format-no-extract',
'size_bytes': 10000,
},
}"""),
'origin':
@@ -943,6 +946,7 @@ deps = {
'object_name': 'path_to_file.tar.gz',
'dep_type': 'gcs',
'sha256sum': 'abcd123',
'size_bytes': 10000,
},
}
""",