Skip to content

Upload GCS release artifact (latest) fails deterministically on small files #775

Description

@kolesnikovae

The Upload GCS release artifact (latest) step in cd.yml may fail deterministically. In my case it failed 3 consecutive attempts with the same error:

google-github-actions/upload-cloud-storage failed with: the offset is lower than the number of bytes written.
The server has 0 bytes and while 10 bytes has been uploaded - thus 10 bytes are missing.
Stopping as this could result in data loss. Initiate a new upload to continue.

The failing file is a 57-byte .sha1 checksum uploaded with resumable: true and gzip: true (action defaults). The object is actually written to GCS successfully, but upload-cloud-storage@v3.0.0 reports a failure (probably due to offset tracking on the resumable upload).

The upstream action has multiple reports of this: #331, #362, #363, and an open request for retry logic at #394.

Possible fixes:

  • Set resumable: false for the latest upload (the files are small enough that resumable adds no value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    💡 Ideation

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions