Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: tools/perf/page_sets/PRESUBMIT.py

Issue 24294003: [Telemetry] Move WPR archives and credentials from src-internal to Cloud Storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test fixes and .gitignore Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/perf/page_sets/PRESUBMIT.py
diff --git a/tools/perf/page_sets/PRESUBMIT.py b/tools/perf/page_sets/PRESUBMIT.py
index f161443f8088404040710ee3fc9414ec53b1b95e..9fac2931425275b6aa5465ee3e3d356005a02b3f 100644
--- a/tools/perf/page_sets/PRESUBMIT.py
+++ b/tools/perf/page_sets/PRESUBMIT.py
@@ -1,6 +1,7 @@
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
import os
import re
import sys
@@ -20,7 +21,10 @@ def _SyncFilesToCloud(input_api, output_api):
finally:
sys.path = old_sys_path
- hashes_in_cloud_storage = cloud_storage.List(cloud_storage.DEFAULT_BUCKET)
+ # Look in both buckets, in case the user uploaded the file manually. But this
+ # script focuses on WPR archives, so it only uploads to the internal bucket.
+ hashes_in_cloud_storage = cloud_storage.List(cloud_storage.INTERNAL_BUCKET)
+ hashes_in_cloud_storage += cloud_storage.List(cloud_storage.PUBLIC_BUCKET)
results = []
for hash_path in input_api.AbsoluteLocalPaths():
@@ -49,7 +53,7 @@ def _SyncFilesToCloud(input_api, output_api):
continue
try:
- cloud_storage.Insert(cloud_storage.DEFAULT_BUCKET, file_hash, file_path)
+ cloud_storage.Insert(cloud_storage.INTERNAL_BUCKET, file_hash, file_path)
except cloud_storage.CloudStorageError:
results.append(output_api.PresubmitError(
'Unable to upload to Cloud Storage: %s' % hash_path))

Powered by Google App Engine
This is Rietveld 408576698