grafana / grafana/plugin-ci-workflows
Upload GCS release artifact (latest) fails deterministically on small files
- Dominant language
- Go
- Stars
- 10
- Forks
- 6
- Avg merge
- 19h 51m
- Merged PRs (30d)
- 97
Description
The `Upload GCS release artifact (latest)` step in `cd.yml` may fail deterministically. In [my case](https://github.com/grafana/grafana-assistant-app/actions/runs/27253827766) 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](https://github.com/google-github-actions/upload-cloud-storage/issues/331), [#362](https://github.com/google-github-actions/upload-cloud-storage/issues/362), [#363](https://github.com/google-github-actions/upload-cloud-storage/issues/363), and an open request for retry logic at [#394](https://github.com/google-github-actions/upload-cloud-storage/issues/394).
Possible fixes:
- Set `resumable: false` for the latest upload (the files are small enough that resumable adds no value)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.