Skip to content

Conversation

@tritone
Copy link
Contributor

@tritone tritone commented Mar 31, 2025

Writer.Flush was panicking due to blocking content sniffing logic if Writer.Flush was called before 512 bytes.

Re-ordering calls here allows Flush to signal EOF and unblock the content sniffer if a flush happens that early.

Add a test with multiple small Flushes to validate that this works as expected.

Writer.Flush was panicking due to blocking content sniffing logic if
Writer.Flush was called before 512 bytes.

Re-ordering calls here allows Flush to signal EOF and unblock the
content sniffer if a flush happens that early.
@tritone tritone marked this pull request as ready for review March 31, 2025 22:25
@tritone tritone requested review from a team as code owners March 31, 2025 22:25
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Mar 31, 2025
@tritone tritone added the automerge Merge the pull request once unit tests and other checks pass. label Apr 2, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit 7d0b8a7 into googleapis:main Apr 2, 2025
8 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 2, 2025
gcf-merge-on-green bot pushed a commit that referenced this pull request Apr 22, 2025
🤖 I have created a release *beep* *boop*
---


## [1.52.0](https://togithub.com/googleapis/google-cloud-go/compare/storage/v1.51.0...storage/v1.52.0) (2025-04-22)


### Features

* **storage/control:** Add Anywhere cache control APIs ([#11807](https://togithub.com/googleapis/google-cloud-go/issues/11807)) ([12bfa98](https://togithub.com/googleapis/google-cloud-go/commit/12bfa984f87099dbfbd5abf3436e440e62b04bad))
* **storage:** Add CurrentState function to determine state of stream in MRD ([#11688](https://togithub.com/googleapis/google-cloud-go/issues/11688)) ([14e8e13](https://togithub.com/googleapis/google-cloud-go/commit/14e8e132d9d5808d1ca789792e7e39f0857991da))
* **storage:** Add OwnerEntity to bucketAttrs ([#11857](https://togithub.com/googleapis/google-cloud-go/issues/11857)) ([4cd4a0c](https://togithub.com/googleapis/google-cloud-go/commit/4cd4a0ca1f6132ea6ed9df7b27310a3238a9c3fd))
* **storage:** Takeover appendable object ([#11977](https://togithub.com/googleapis/google-cloud-go/issues/11977)) ([513b937](https://togithub.com/googleapis/google-cloud-go/commit/513b937420b945c4a76e20711f305c6ad8a77812))
* **storage:** Unfinalized appendable objects. ([#11647](https://togithub.com/googleapis/google-cloud-go/issues/11647)) ([52c0218](https://togithub.com/googleapis/google-cloud-go/commit/52c02183fabf43fcba3893f493140ac28a7836d1))


### Bug Fixes

* **storage:** Fix Attrs for append takeover ([#11989](https://togithub.com/googleapis/google-cloud-go/issues/11989)) ([6db35b1](https://togithub.com/googleapis/google-cloud-go/commit/6db35b10567b7f1463bfef722b0fd72257190ee7))
* **storage:** Fix panic when Flush called early ([#11934](https://togithub.com/googleapis/google-cloud-go/issues/11934)) ([7d0b8a7](https://togithub.com/googleapis/google-cloud-go/commit/7d0b8a75ae55731ae765c01f24920f9f11038f44))
* **storage:** Fix unfinalized write size ([#12016](https://togithub.com/googleapis/google-cloud-go/issues/12016)) ([6217f8f](https://togithub.com/googleapis/google-cloud-go/commit/6217f8fd3cd8680a7e6b7b46fc9b7bda6ee6292e))
* **storage:** Force first message on next sendBuffer when nothing sent on current ([#11871](https://togithub.com/googleapis/google-cloud-go/issues/11871)) ([a1a2292](https://togithub.com/googleapis/google-cloud-go/commit/a1a22927d6a4399e7392787bccb9707bc9e8f149))
* **storage:** Populate Writer.Attrs after Flush() ([#12021](https://togithub.com/googleapis/google-cloud-go/issues/12021)) ([8e56f74](https://togithub.com/googleapis/google-cloud-go/commit/8e56f745e7f2175660838f96c1a12a46841cac40))
* **storage:** Remove check for FinalizeOnClose ([#11992](https://togithub.com/googleapis/google-cloud-go/issues/11992)) ([2664b8c](https://togithub.com/googleapis/google-cloud-go/commit/2664b8cec00a606001184cb17c074fd0e79e66b8))
* **storage:** Wrap read response parsing errors ([#11951](https://togithub.com/googleapis/google-cloud-go/issues/11951)) ([d2e6583](https://togithub.com/googleapis/google-cloud-go/commit/d2e658387b80ec8a3e41e048a9d520b8dd13dd00))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants