Repository navigation
fix: fractional timeouts, jwt and json 3, hash-style StreamResponse - #177
Merged
Merged
Conversation
…esponse like a hash Timeouts went through to_i, so 2.5 s became 2 and 0.5 became 0. The gem pinned jwt and json to 2.x. StreamResponse answered [], key?, dig and fetch with nil because method_missing read them as field names.
👋 Thanks, 🌵! I'm on it.How to work with me
CommandsComment any of these on the PR:
|
There was a problem hiding this comment.
Round 1 · 🆕 3 new · 1 should-fix to go
| Finding | Where | |
|---|---|---|
| 🟡 Should Fix | Field reads on non-Hash response bodies now raise NoMethodError | stream_response.rb:14 |
➡️ Round 2 started on 2eb5355.
…match Hash for integer keys and dig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
https://linear.app/stream/issue/CHA-7711/generated-server-sdks-defects-found-by-the-migration-skill-eval
Problem
Timeouts went through
to_i, so2.5s became2and0.5became0. The gem pinnedjwt ~> 2.0andjson ~> 2.0, which forced customer apps to downgrade.StreamResponseanswered[],key?,digandfetchwithnil, becausemethod_missingread them as field names.Solution
request_timeout,connect_timeoutandidle_timeoutkeep fractions (to_f).jwtandjsonaccept>= 2.0, < 4. The unit suite passes on jwt 3.3.2 and json 3.2.0.StreamResponseimplements[],key?,fetchanddig. A call with arguments, a block or a?,!or=suffix now raisesNoMethodError. An unknown plain name still reads asnil, because the API omits empty optional fields.How to verify
bundle exec rspec spec/stream_response_spec.rb spec/connection_pooling_spec.rbBEGIN_COMMIT_OVERRIDE
fix: keep fractional request, connect and idle timeouts
fix: allow jwt 3 and json 3
fix: support [], key?, fetch and dig on StreamResponse
END_COMMIT_OVERRIDE