Commit e21ec293 authored by Mikhail Khokhlov's avatar Mikhail Khokhlov Committed by Commit Bot

[tools/perf] Make remote names url-safe

To avoid issues with quoting/unquoting cloud urls, we remove all
unsafe characters from the remote name.

Bug: 981349
Change-Id: Ia9a17642072d435141eb19d42c0692a5de86558b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899881
Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>
Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712689}
parent 61d240cf
......@@ -203,8 +203,9 @@ def UploadArtifacts(test_result, upload_bucket, run_identifier):
if name in [compute_metrics.HISTOGRAM_DICTS_FILE, MEASUREMENTS_NAME]:
continue
remote_name = '/'.join([run_identifier, test_result['testPath'], name])
urlsafe_remote_name = re.sub(r'[^A-Za-z0-9/.-]+', '_', remote_name)
artifact['remoteUrl'] = cloud_storage.Insert(
upload_bucket, remote_name, artifact['filePath'])
upload_bucket, urlsafe_remote_name, artifact['filePath'])
logging.info('Uploaded %s of %s to %s', name, test_result['testPath'],
artifact['remoteUrl'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment