Skip to content

fix: set MD5 on GCS writer before first Write call in putContent#4803

Merged
milosgajdos merged 2 commits intodistribution:mainfrom
joonas:fix/gcs-putcontent-md5-before-write
Mar 17, 2026
Merged

fix: set MD5 on GCS writer before first Write call in putContent#4803
milosgajdos merged 2 commits intodistribution:mainfrom
joonas:fix/gcs-putcontent-md5-before-write

Conversation

@joonas
Copy link
Contributor

@joonas joonas commented Mar 1, 2026

Per the comment on storage.Writer:

// ObjectAttrs are optional attributes to set on the object. Any attributes
// must be initialized before the first Write call. Nil or zero-valued
// attributes are ignored.

Therefore, MD5 has to be set before the first to call to Write.

Signed-off-by: Joonas Bergius <joonas@defenseunicorns.com>
@joonas joonas force-pushed the fix/gcs-putcontent-md5-before-write branch from 9079c0f to 2957c89 Compare March 1, 2026 23:49
@milosgajdos
Copy link
Member

PTAL @thaJeztah

@milosgajdos milosgajdos requested a review from squizzi March 17, 2026 15:12
Co-authored-by: Kyle Squizzato <kyle@replicated.com>
Signed-off-by: Joonas Bergius <joonas@users.noreply.github.com>
@milosgajdos milosgajdos merged commit 83dd820 into distribution:main Mar 17, 2026
21 checks passed
@joonas joonas deleted the fix/gcs-putcontent-md5-before-write branch March 17, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants