Repository navigation
deps(grpc): bump optional gun to 2.8.0 - #661
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
polvalente
approved these changes
Nov 20, 2026
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.
Fixes #660.
grpcpinned{:gun, "~> 2.7.0", optional: true}. Gun 2.7.0 does not handle the value that cowlib 2.22.0 returns for DATA on a reset stream, so on cowlib 2.22.0 a client-side cancel can crash the gun connection process and fail every other RPC on that channel. Gun 2.8.0 handles it and requires cowlib 2.22.0.Changes
grpc/mix.exs:{:gun, "~> 2.8.0", optional: true}.gun2.7.0 -> 2.8.0,cowlib2.21.0 -> 2.22.0 andcowboy2.20.0 -> 2.21.0 ingrpc/mix.lock,grpc_server/mix.lockandinterop/mix.lock, made withmix deps.update gun cowlib cowboy. The rootmix.lockhas no gun dependency (its gun entry is stale, as in deps(grpc): bump optional gun to 2.7.0 #616), so I copied the new gun line fromgrpc/mix.lock; cowboy and cowlib there come from mix.window_changedreturn value. Cowboy 2.21.0 has it and requires cowlib 2.22.0. Mix also wanted to moveranch,grpc_coreandtelemetry; I left those entries as they were on master.grpc_servertests: cowlib 2.22.0 changescow_http2:parse/1to return DATA frames as a 5-tuple{data, StreamID, Fin, Data, Flow}. Two raw HTTP/2 tests matched the 4-tuple and failed (cowboy_connection_age_test.exs,cowboy_connection_idle_test.exs), and two more patterns (body_limit_flow_window_test.exs,send_backpressure_test.exs) could no longer match. They are in a second commit.Tests
Run locally on OTP 28.5 / Elixir 1.20.1, on master first and then on this branch:
mix format --check-formattedgrpc:mix testgrpc_server:mix testgrpc:elixir script/adapter_test.exs guninterop:mix run script/run.exsAlso run on the branch, matching what CI runs from the repo root:
MIX_ENV=test mix compile --warnings-as-errorspasses;mix test --warnings-as-errorspasses (grpc_core134,grpc_server373,grpc702 passed, 2 skipped);mix test --only warning_testpasses (3 tests);elixir script/adapter_test.exs mintpasses. These all pass, so I did not run them on master. With OTP 27.3.4.13 / Elixir 1.19.5 and OTP 29.0.5 / Elixir 1.20.3,grpc_serverpasses (373) on both andgrpcon 29 (705 passed, 2 skipped). On 27,grpchad one failure in one run (connection_test.exs:267, a process-leak assertion in a test that does not use gun versions); it did not come back in 3 isolated reruns or a full rerun (0 failures), and master on 27 also passed a full run, so I take it as a flaky test, not caused by this change.Before the test fix,
grpc_serveron this branch had 2 failures out of 373, reproducibly (3 of 3 reruns). They also fail with cowboy 2.20.0 and cowlib 2.22.0, so they come from cowlib 2.22.0 and not from cowboy.To check that the bump is what fixes the crash, I ran one scenario with three dependency sets, 5 runs each. One gun channel, a slow unary RPC in flight, and a bidirectional RPC that floods 16 KB messages and is cancelled client-side after 3 messages:
ok, gun process stays upcase_clause {window_changed, ...}atgun_http2.erl:323, slow RPC fails withUNAVAILABLEok, gun process stays upThe same split came out of a gun-and-cowboy-only version of the scenario. The scenario scripts are not part of this PR; I can add one as a regression test if you want it.
Notes
max_header_list_sizenow defaults to 32768, and cowlib 2.22.0 enforces it. Grpc does not set it.script/adapter_test.exs gunalready resolves gun 2.7.0 with cowlib 2.22.0, becauseMix.installhas no lock. It passes there only because it connects and never cancels a stream.grpc_server/mix.exsstill allowscowlib ~> 2.21andcowboy ~> 2.14. With cowlib 2.22.0 and cowboy older than 2.21.0 the server side lacks thewindow_changedclause (read in the source, not reproduced), and the updated tests no longer match cowlib 2.21 frames. I left the requirements alone to keep this PR small; say if you want them raised here.ranch,grpc_coreandtelemetryin some lock files. I left those entries as they were on master.Not verified
adapter_test.exs mintconnecting, and OTP 27.3 / 29.0 beyond thegrpcandgrpc_serversuites.🤖 Generated with Claude Code