Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

fix!: allow 204 responses in REST fallback mode#1736

Merged
leahecole merged 5 commits intomainfrom
allow204fallback
Jun 10, 2025
Merged

fix!: allow 204 responses in REST fallback mode#1736
leahecole merged 5 commits intomainfrom
allow204fallback

Conversation

@leahecole
Copy link
Contributor

@leahecole leahecole commented Apr 22, 2025

This has the implementation for allowing 204s in REST fallback
I am not able to add tests to the test application because the Sequence service does not allow us to pass in a sequence of HTTP statuses - only gRPC and in gRPC world, 200 and 204 are both considered success. Additionally, I don't believe I could specify the "error" code of 204 in the Echo service, because 204 isn't an error - it's just empty.

UPDATE: I was able to add tests based on the example given in #1766. When I did a strictEqual on my example empty response and the response I'm getting from the service, I did see Values have same structure but are not reference-equal - I chose to compare the JSON stringified versions as one option of comparing, but I'm open to alternatives if we have something that feels a little less janky!

Technically a breaking change but only to two APIs, Bigquery and Compute. And, the breakage is that where they would have returned an error for a 2xx and an empty object, now they will return a success (so actually making it work).

I touched two other tests to remove imports that weren't used, but if you want me to take those out, I can!

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Apr 22, 2025
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels May 16, 2025
@leahecole leahecole marked this pull request as ready for review June 6, 2025 22:01
@leahecole leahecole requested a review from a team June 6, 2025 22:02
@leahecole leahecole requested a review from a team as a code owner June 6, 2025 22:02
@leahecole leahecole changed the title WIP - allow 204 responses in REST fallback mode feat: allow 204 responses in REST fallback mode Jun 6, 2025
sofisl
sofisl previously approved these changes Jun 6, 2025
@sofisl sofisl changed the title feat: allow 204 responses in REST fallback mode feat!: allow 204 responses in REST fallback mode Jun 6, 2025
@sofisl sofisl changed the title feat!: allow 204 responses in REST fallback mode fix!: allow 204 responses in REST fallback mode Jun 6, 2025
@leahecole leahecole dismissed stale reviews from sofisl and ghost June 9, 2025 19:26

out of date

@leahecole leahecole merged commit 6829fc1 into main Jun 10, 2025
28 checks passed
@leahecole leahecole deleted the allow204fallback branch June 10, 2025 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants