The default gcloud upload behavior is to gzip everything and then serve it with Content-Encoding: gzip
Because of the way that content-decoding works in the browser, progress bars typically have access to the incremental bytes read out of the stream and never actually see the gzipped payload. Unfortunately the specification is also that Content-Length should be the transfer size, rather than the uncompressed content-size.
However, google lets us add our own headers, so we should be able to do something along the lines of:
gsutil setmeta -h "x-goog-meta-uncompressed-size:$(stat -c%s web_viewer/re_viewer_bg.wasm)" gs://rerun-web-viewer/commit/${{env.SHORT_SHA}}/re_viewer_bg.wasm
See: #2421 for additional context.
Also, we might want to disable the gzipping behavior for uploading rrd files since the browser will end up paying an extra, gratuitous decompression step.
The default gcloud upload behavior is to gzip everything and then serve it with
Content-Encoding: gzipBecause of the way that content-decoding works in the browser, progress bars typically have access to the incremental bytes read out of the stream and never actually see the gzipped payload. Unfortunately the specification is also that
Content-Lengthshould be the transfer size, rather than the uncompressed content-size.However, google lets us add our own headers, so we should be able to do something along the lines of:
See: #2421 for additional context.
Also, we might want to disable the gzipping behavior for uploading rrd files since the browser will end up paying an extra, gratuitous decompression step.