Skip to content

deps: update grpc to 1.78.1 - #434

Closed
santigimeno wants to merge 1 commit into
node-v24.x-nsolid-v6.xfrom
santi/upgrade_grpc
Closed

deps: update grpc to 1.78.1#434
santigimeno wants to merge 1 commit into
node-v24.x-nsolid-v6.xfrom
santi/upgrade_grpc

Conversation

@santigimeno

@santigimeno santigimeno commented Mar 12, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added configurable maximum connections per subchannel for improved connection scaling
    • Enhanced keepalive throttling and propagation across subchannels
    • Expanded channelz diagnostics to include per-filter and per-call properties
    • Improved HTTP/2 protocol compliance with stricter frame and header validation
  • Bug Fixes

    • Fixed keepalive time management and synchronization
    • Improved connection state handling and error propagation
  • Version Updates

    • Updated gRPC C++ version to 1.78.1
    • Updated core version to 52.0.0

@santigimeno
santigimeno requested a review from RafaelGSS March 12, 2026 22:09
@santigimeno santigimeno self-assigned this Mar 12, 2026
@coderabbitai

coderabbitai Bot commented Mar 12, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

Updates vendored gRPC to C/CPP 52.0.0/1.78.1, introducing allocator-aware message serialization, client/channel refactors (buffered calls, connection-scaling cap, keepalive throttling), expanded Channelz (call-level properties), significant HTTP/2 transport changes (GOAWAY manager, flow-control and settings notification interface), Chaotic Good transport watcher/telemetry updates, credentials HTTP token-fetcher refactor, and build/config tweaks.

Changes

Allocator-Aware Serialization and API Surface

Layer / File(s) Summary
Data Shape
include/grpcpp/impl/serialization_traits.h, include/grpcpp/support/proto_buffer_writer.h, include/grpcpp/impl/generic_serialize.h
Adds allocator-dispatch for serialization; ProtoBufferWriter and GenericSerialize accept optional MemoryAllocator*.
Core Implementation
include/grpcpp/impl/call_op_set.h
SendMessage/SendMessagePtr accept allocator and use grpc::Serialize(allocator, ...); recv uses grpc::Deserialize(...).
Wiring (Client)
include/grpcpp/impl/client_unary_call.h, include/grrcpp/support/async_*, include/grpcpp/support/client_callback.h, include/grpcpp/support/sync_stream.h
All client send paths pass channel->memory_allocator() to send ops.
Wiring (Server)
include/grpcpp/impl/server_callback_handlers.h, include/grpcpp/support/method_handler.h, include/grpcpp/support/async_unary_call.h, include/grpcpp/support/async_stream.h
Server send paths pass ctx_->memory_allocator(); request deserialization switched to grpc::Deserialize.
Interface Additions
include/grpcpp/impl/channel_interface.h, include/grpcpp/channel.h, include/grpcpp/impl/delegating_channel.h, include/grpcpp/impl/intercepted_channel.h, include/grpcpp/server.h, include/grpcpp/server_context.h
Adds memory_allocator() to channels/servers; context stores and exposes allocator.
Headers/Deps
include/grpc/event_engine/memory_allocator.h, include/grpc/event_engine/memory_request.h
Adds MemoryAllocator::IsValid() and minor include.
Build/Export
Makefile, include/grpcpp/version_info.h
CPP version to 1.78.1; new public headers wired.

Client Channel: Buffered Calls, Connection Scaling, Keepalive

Layer / File(s) Summary
Data Shape
include/grpc/impl/channel_arg_names.h, src/core/client_channel/client_channel_internal.h, src/core/client_channel/client_channel_service_config.h
Adds service-config “connection_scaling” and arg keys for max connections per subchannel and cap.
Core Implementation
src/core/client_channel/buffered_call.{h,cc}, src/core/client_channel/client_channel_filter.{h,cc}
Introduces BufferedCall and refactors call flow to enqueue/fail/resume batches; unifies LoadBalancedCall; integrates max-connections-per-subchannel and keepalive throttling propagation.
Subchannel/Connector
src/core/client_channel/subchannel.{h,cc}, src/core/client_channel/connector.h
Watcher interface gains keepalive and connection-limit hooks; transport watcher path; connector result adds max_concurrent_streams.
Config Parsing
src/core/client_channel/client_channel_service_config.{h,cc}
Parses gated connection_scaling.maxConnectionsPerSubchannel.
Wiring/Maps
src/core/client_channel/client_channel.{h,cc}
Replaces refcount maps with subchannel→wrapper sets; computes per-subchannel connection max with cap; Duration-based keepalive storage.
Retry Integration
src/core/client_channel/retry_filter_*
Switches to new LoadBalancedCall type throughout.
Build
Makefile, grpc.gyp
Adds buffered_call.cc to builds.

HTTP/2 Transport and Settings/GOAWAY/Flow-Control

Layer / File(s) Summary
Data Shape
src/core/ext/transport/chttp2/transport/frame.h, flow_control.h, flow_control_manager.h, header_assembler.h
Expands frame/flag types, adds debugging strings, test-only accessors, helpers for dequeue/tokens, header assembler initialization API.
Core Implementation
transport/frame.cc, flow_control.cc, header_assembler.h
Adds detailed frame tracing, stricter validations, gRPC header flag parsing, flow-control diagnostics, new header assembler/disassembler flows.
GOAWAY Manager
transport/goaway.{h,cc}
Introduces stateful GOAWAY manager with graceful/immediate flows and serialization hooks.
Settings Notification API
transport/chttp2_transport.{h,cc}, client/chttp2_connector.{h,cc}, server/chttp2_server.{h,cc}
Replaces grpc_closure* with absl::AnyInvocable<StatusOr<uint32_t>>; updates client/server handshake paths; adds watcher notifications for disconnect and peer max streams.
Telemetry/Writes
transport/chttp2_transport.cc, .../data_endpoints.cc
Enables TCP telemetry when plugin group available; extends write metrics/ztrace recording.
Build/Docs
Makefile, src/core/ext/transport/chttp2/GEMINI.md
Adds new sources and updates docs to include GOAWAY.

Chaotic Good Transports (v2 and legacy): Watchers and Telemetry

Layer / File(s) Summary
Interfaces
.../client_transport.{h,cc}, .../server_transport.{h,cc}
Adds StartWatch/StopWatch on client/server; client dispatch holds EventEngine, notifies watcher on disconnect.
Connector
.../client/chaotic_good_connector.{h,cc}, .../legacy/client/chaotic_good_connector.{h,cc}
Sets max_concurrent_streams to uint32 max; handshake deadline gating by config.
Endpoints/Telemetry
.../data_endpoints.cc, .../legacy/data_endpoints.cc
Enables TCP telemetry only if plugin group exists; sets tracer under that condition.
Server Auth Context
.../server/chaotic_good_server.{h,cc}, .../pending_connection.h
Data-connection requests carry handshake args; finish path validates matching auth contexts.

Channelz Expansion and Call Tracing Hooks

Layer / File(s) Summary
Data Shape
src/core/channelz/channelz.h, .../property_list.h, .../channelz_registry.h
Adds new entity types (metrics domain/storage), PropertyList::empty(), and descendants API.
Core Implementation
src/core/call/call_spine.{h,cc}, src/core/call/call_filters.h, src/core/call/client_call.{h,cc}
Call becomes a Channelz data source; filters expose ChannelzProperties; client/server calls mark source constructed/destructing and add call-state properties.
Metadata to Properties
src/core/call/metadata_channelz.{h,cc}, src/core/call/metadata_batch.{h,cc}
Adds conversion from metadata batches to Channelz property lists and explicit allowlist helper.
Filter Stubs
src/core/ext/filters/*/*_filter.h
Adds empty ChannelzProperties() in many filters; compression/stateful_session include richer properties.

Credentials: HTTP Token Fetcher Refactor and Defaults

Layer / File(s) Summary
Abstraction
src/core/credentials/call/token_fetcher/token_fetcher_credentials.{h,cc}
Introduces HttpTokenFetcherCredentials with nested HttpFetchRequest handling HTTP status→absl::Status mapping.
Refactors
.../oauth2/oauth2_credentials.{h,cc}, .../gcp_service_account_identity/*
Switches to HttpTokenFetcherCredentials, simplifying fetch flows via lambda callbacks.
Policy Change
.../google_default/google_default_credentials.{h,cc}
Removes override that forced DNS SRV queries in Google default channel credentials.
TLS/ALTS Minor
.../tls/spiffe_utils.cc
Accepts EC in addition to RSA for kty.

Versioning, Build, Linters, Formatting

Layer / File(s) Summary
Version Bump
Makefile, include/grpcpp/version_info.h
CORE 51→52, C++ 1.76.0→1.78.1; soname updates.
Bazel/Bazelcraft
src/core/BUILD, src/compiler/BUILD, .bazelignore
Feature flags, new targets, deps updates; ignore test/bzlmod.
Protobuf Edition Support
src/compiler/*
Max edition returns 2024 when protobuf ≥6032000.
Linters/Attrs
.pylintrc*, .gitattributes, .clang-format
Ignore generated stubs; linguist updates; include ordering rules.
Headers/Cleanup
many #include reorderings
Non-functional include ordering changes for consistency.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor App as App (Credentials)
  participant Cred as HttpTokenFetcherCredentials (Fetcher)
  participant HTTP as HTTP Client
  participant Auth as Auth Server

  App->>Cred: FetchToken(deadline, on_done)
  Cred->>HTTP: StartHttpRequest(deadline, on_complete)
  HTTP-->>Cred: on_complete(StatusOr<grpc_http_response>)
  alt response.ok()
    Cred->>Cred: Parse body, compute expiration
    Cred-->>App: on_done(Token{Bearer <body>, expiry})
  else error
    Cred-->>App: on_done(error)
  end
Loading
sequenceDiagram
  autonumber
  actor CE as Control Endpoint
  participant L as DataConnectionListener
  participant S as Server (Chaotic Good)
  participant DE as Data Endpoint

  CE->>L: RequestDataConnection(handshake_args with auth_ctx)
  note right of L: Store latch + control auth_ctx
  DE->>L: FinishDataConnection(id, endpoint, data auth_ctx)
  alt auth_ctx matches
    L-->>S: Complete data connection
  else mismatch
    L-->>S: Fail with Unauthenticated
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Suggested reviewers

  • RafaelGSS

Poem

A rabbit with bytes in its burrow so deep,
Buffers and GOAWAYs tucked in a heap.
Flow-control carrots, allocator hay,
Channelz lanterns to light the way.
Tokens hop swiftly on HTTP breeze—
New trails blazed through gRPC trees. 🐇✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch santi/upgrade_grpc

@jaz239

jaz239 commented Mar 14, 2026

Copy link
Copy Markdown

Hey @santigimeno can you please make sure this PR is attached to a ticket? Currently it is not

@santigimeno
santigimeno force-pushed the santi/upgrade_protobuf branch from ea45868 to d46855d Compare May 4, 2026 14:01
@santigimeno
santigimeno force-pushed the santi/upgrade_grpc branch from 3029f64 to 412199e Compare May 4, 2026 14:02
RafaelGSS
RafaelGSS previously approved these changes May 5, 2026

@RafaelGSS RafaelGSS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@santigimeno
santigimeno force-pushed the santi/upgrade_protobuf branch from d46855d to 1dedb48 Compare May 5, 2026 18:41
Base automatically changed from santi/upgrade_protobuf to node-v24.x-nsolid-v6.x May 5, 2026 18:41
@santigimeno
santigimeno dismissed RafaelGSS’s stale review May 5, 2026 18:41

The base branch was changed.

@santigimeno
santigimeno force-pushed the santi/upgrade_grpc branch from 412199e to 4c54533 Compare May 5, 2026 18:43
@santigimeno
santigimeno requested a review from RafaelGSS May 5, 2026 18:46
PR-URL: #434
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@santigimeno
santigimeno force-pushed the santi/upgrade_grpc branch from 4c54533 to ab722c8 Compare May 5, 2026 18:47
santigimeno added a commit that referenced this pull request May 5, 2026
PR-URL: #434
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@santigimeno

Copy link
Copy Markdown
Member Author

Landed in 1023131

@santigimeno santigimeno closed this May 5, 2026
santigimeno added a commit that referenced this pull request May 25, 2026
PR-URL: #434
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants