Skip to content

Add x-goog-meta-uncompressed-size to uploaded artifacts #2422

@jleibs

Description

@jleibs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🕸️ webregarding running the viewer in a browser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions