Commit 296c1e24 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Make SuperSize reports for official builds require auth

Bug: 1123778
Change-Id: I5c0b7b4e91c7b01907ae5b59523f7d3db1b0ca22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387341
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarMohamed Heikal <mheikal@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803469}
parent f77c6a17
......@@ -73,7 +73,8 @@ _DESIRED_VERSIONS = [
'81.0.4044.138',
'83.0.4103.60',
'84.0.4147.89',
'85.0.4183.25', # Canary
'85.0.4183.81',
'86.0.4240.11', # Canary
]
......@@ -205,14 +206,15 @@ def main():
_WriteMilestonesJson(os.path.join(staging_dir, 'milestones.json'))
if args.sync:
subprocess.check_call([
_GSUTIL, '-m', 'rsync', '-J', '-a', 'public-read', '-r', staging_dir,
_PUSH_URL
])
subprocess.check_call([
_GSUTIL, 'setmeta', '-h', 'Cache-Control:no-cache',
_PUSH_URL + 'milestones.json'
])
subprocess.check_call(
[_GSUTIL, '-m', 'rsync', '-J', '-r', staging_dir, _PUSH_URL])
milestones_json = _PUSH_URL + 'milestones.json'
# The main index.html page has no authentication code, so make .json file
# world-readable.
subprocess.check_call(
[_GSUTIL, 'acl', 'set', '-a', 'public-read', milestones_json])
subprocess.check_call(
[_GSUTIL, 'setmeta', '-h', 'Cache-Control:no-cache', milestones_json])
else:
logging.warning('Finished dry run. Run with --sync to upload.')
......
......@@ -61,7 +61,7 @@ def _UploadSizeFile(size_path, version, arch):
dst_url = os.path.join(_REPORTS_GS_URL, version, arch,
report_basename + '.size')
cmd = [_GSUTIL, 'cp', '-a', 'public-read', size_path, dst_url]
cmd = [_GSUTIL, 'cp', size_path, dst_url]
logging.warning(' '.join(cmd))
subprocess.check_call(cmd)
......
......@@ -29,7 +29,8 @@ function setSubmitListener(form, fetchDataUrl) {
form.addEventListener('submit', event => {
event.preventDefault();
const dataUrl = fetchDataUrl();
window.open(`${FIREBASE_HOST}/viewer.html?load_url=${dataUrl}`);
window.open(
`${FIREBASE_HOST}/viewer.html?load_url=${dataUrl}&authenticate=1`);
});
}
......
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