Releases: grpc/grpc-go
Releases · grpc/grpc-go
Release list
Release 1.84.0
Behavior Changes
- stats/otel: The
grpc.lb.pick_first.*metrics have been removed and replaced withgrpc.subchannel.*metrics. See gRFC A94 for more details. (#9215)
New Features
Bug Fixes
- client: Fix a bug where a
ClientConncould get permanently stuck in IDLE when an RPC was canceled during stream creation. Previously, such cancellations triggered stream cleanup twice, corrupting the channel's idleness state and causing subsequent RPCs to fail with deadline exceeded errors. (#9191)- Special Thanks: @utkuozdemir
- client: Fix a bug where non-gRPC HTTP responses ending with an empty DATA frame failed the RPC with status code
Internalinstead of preserving the HTTP-mapped status code and response body. (#9217)- Special Thanks: @chengxilo
- credentials: Validate metadata returned by per-RPC credentials, failing the RPC with status code
Internalif invalid keys or values are found. Previously, invalid metadata from credentials was sent to the server in outgoing HTTP/2 requests. (#9202)- Special Thanks: @buger
- credentials/sts: Prevent potential token leakage by disallowing HTTP redirects during STS token exchange. Previously, 3xx redirects were followed automatically, replaying the request body containing authentication tokens to the redirect destination. (#9299)
- Special Thanks: @nvxbug
- randomsubsetting: Ignore endpoints that contain no addresses. Previously, this could cause the policy to panic while computing hashes. (#9259)
- Special Thanks: @fallintoplace
- stats/otel: Ensure method names are populated in trace spans when metrics are disabled. Previously, running with tracing enabled and metrics disabled resulted in server trace spans lacking the RPC method name (recording only "Recv."). (#9262)
- transport: Return
io.ErrUnexpectedEOFwhen EOF is encountered after partial header or message body reads. Previously, partial reads could return a plainio.EOF, failing to distinguish truncated data from a clean end of stream. (#9204)- Special Thanks: @buger
- transport: Validate metadata supplied by balancers (in
PickResult.Metadata) and resolver addresses, failing the RPC with status codeInternalif invalid keys or values are found. Previously, invalid metadata from these sources was sent to the server in outgoing HTTP/2 requests. (#9203)- Special Thanks: @buger
- xds: Fix a rare corner case that could prevent a cluster from being removed when it is no longer in use. (#9140)
- xds: Fix panic during route matching for routes containing header matchers with empty
exact_matchstrings. (#9223)- Special Thanks: @nvxbug
- xds: Reject routes containing header matchers with empty
prefix_matchorsuffix_matchstrings. Previously, this caused a panic during route matching. (#9223)- Special Thanks: @nvxbug
- xds: Fix EDS drop policies being applied at a much lower rate than configured due to an integer overflow. (#9257)
- Special Thanks: @nvxbug
- xds: Reject EDS resources containing drop policies with unsupported denominators. Previously, such resources caused the client to panic when calculating drop rates. (#9218)
- Special Thanks: @nvxbug
- xds/rbac: Reject RBAC configurations containing nested
PrincipalorPermissionrules with:schemeorgrpc-prefixed header matchers. Previously, such configurations could cause DENY policies to fail open. (#9258)- Special Thanks: @nvxbug
- xds/rbac: Rewrite
hostheader matchers to:authorityin nestedPrincipalandPermissionrules. Previously, this rewrite only applied to top-level rules, causing nestedhostmatchers to never match incoming requests and DENY policies to fail open. (#9258)- Special Thanks: @nvxbug
- xds/rbac: Reject
CidrRangeswith an unset prefix length. Previously, an omittedprefix_lenfield caused a panic during RBAC configuration parsing. (#9250)- Special Thanks: @nvxbug
Performance Improvements
- transport: Avoid a heap allocation when flushing shared write buffers. (#9233)
- Special Thanks: @zaidoon1
- credentials/alts: Support dynamic frame size negotiation and add the
GRPC_GO_EXPERIMENTAL_ALTS_MAX_FRAME_SIZEenvironment variable (default 4KiB, max 512KiB) to configure the maximum ALTS record frame size. (#9268)
Release 1.83.2
Security
- server: Reject requests missing both
:authorityandHostheaders with HTTP 400 and statusInternal. (#9365)- Special Thanks: @winklemad
Release 1.82.2
Security
- server: Reject requests missing both
:authorityandHostheaders with HTTP 400 and statusInternal. (#9365)- Special Thanks: @winklemad
Release 1.83.1
Security
- xds/rbac: Fix a bug where nested
PrincipalorPermissionrules with:schemeorgrpc-prefixed header matchers were not rejected, which could cause DENY rules to fail open. (#9258)- Special Thanks: @nvxbug
- xds/rbac: Fix a bug where the
hostheader matcher was not being replaced with:authorityin nestedPrincipalorPermissionrules. (#9258)- Special Thanks: @nvxbug
- xds/rbac: Fix a bug where a header matcher whose name was not lowercase, such as
X-Role, matched no header, which could cause DENY rules to fail open. (#9332)- Special Thanks: @alimony
- xds/rbac: Fix a bug where a
:schemeorgrpc-prefixed header matcher was accepted when its name was not lowercase. (#9332)- Special Thanks: @alimony
- xds/rbac: Fix a bug where a
Hostheader matcher was not replaced with:authority. (#9332)- Special Thanks: @alimony
Performance
- transport: Restrict memory overhead of buffering small data frames. (#9331)
Release 1.83.0
Security
- server: Stop reading from connections when flooded by HTTP/2 frames to mitigate resource exhaustion. The default value for this limit is 100 frames, excluding DATA and HEADERS, and may be changed by setting environment variable
GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT. - xds/rbac: Support
MetadataandRequestedServerNamepermissions matcher fields. If present in a DENY rule, previously these would be ignored and fail-open. - xds/rbac: Fix panic when parsing unsupported fields in
NotRule/NotIdpermissions. - xds/rbac: Support the deprecated
source_ipprincipal identifier by treating it as equivalent todirect_remote_ip. - xds: Fix panic when parsing route header matchers configured with empty
exact_match,prefix_match, orsuffix_matchstrings. (#9223)
New Features
- xds/googlec2p: Enable DirectPath over Interconnect support for on-premises clients via the
force-xdstarget URI query parameter. (#9133) - xds: Enable xDS configuration to control which fields get propagated from ORCA backend metric reports to LRS load reports. (#9145)
- authz: Add
OnPolicyUpdatecallback toFileWatcherOptionsto notify when an authz policy is loaded or updated. (#9142)- Special Thanks: @hnefatl
- xds: Add support for the GCP Authentication HTTP Filter, which automatically fetches and attaches GCP Service Account Identity JWT tokens to outgoing RPCs.
- This feature can be enabled by setting environment variable
GRPC_EXPERIMENTAL_XDS_GCP_AUTHENTICATION_FILTER=true. (#9119)
- This feature can be enabled by setting environment variable
- xds: Add support for xDS-based HTTP CONNECT proxies.
- This feature can be enabled by setting environment variable
GRPC_EXPERIMENTAL_XDS_HTTP_CONNECT=true. (#9151)
- This feature can be enabled by setting environment variable
- xds: Add support for
contains_matchin route header matchers. (#9223)
Bug Fixes
- credentials/alts: Fix panic when processing malformed frames by validating that the message frame length exceeds the message type field size. (#9197)
- grpc: Fix compilation on Plan 9 targets (
GOOS=plan9), broken since v1.81.0. (#9255)- Special Thanks: @Yusufihsangorgel
Release 1.82.1
Security
- server: Stop reading from the connection when flooded by HTTP/2 frames. The default value for this limit is 100 frames, excluding DATA and HEADERS, and may be changed by setting environment variable
GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT. - xds/rbac: Support
MetadataandRequestedServerNamepermissions matcher fields. If present in a DENY rule, previously these would be ignored and fail-open. - xds/rbac: Fix panic when parsing unsupported fields in
NotRule/NotIdpermissions. - xds/rbac: Support the deprecated
source_ipprincipal identifier by treating it as equivalent todirect_remote_ip.
Release 1.82.0
Behavior Changes
- server: Remove support for
GRPC_GO_EXPERIMENTAL_DISABLE_STRICT_PATH_CHECKINGenvironment varibale. Strict incoming RPC path validation (which has been the default sincev1.79.3) can no longer be disabled. (#9112) - transport: Add environment variable to change the default max header list size from
16MBto8KB. This may be enabled by settingGRPC_GO_EXPERIMENTAL_ENABLE_8KB_DEFAULT_HEADER_LIST_SIZE=true. This will be enabled by default in a subsequent release. (#9019) - balancer: Load Balancing policy registry is now case-sensitive. Set
GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES=false(and file an issue) to revert to case-insensitive behavior. (#9017)
New Features
- experimental/stats: Expose a new API,
NewContextWithLabelCallback, to register a callback that is invoked when telemetry labels are added. (#8877)- Special Thanks: @seth-epps
- client: Return a portion of the response body in the error message, when the client receives an unexpected non-gRPC HTTP response, to make debugging easier. (#8929)
- Special Thanks: @chengxilo
- server: Add environment variable
GRPC_GO_SERVER_GOROUTINE_LABELSthat controls settingruntime/pprof.Labelson goroutines spawned by the server. SetGRPC_GO_SERVER_GOROUTINE_LABELS=grpc.method=trueto add thegrpc.methodlabel on goroutines spawned to handle incoming requests. (#9082)- Special Thanks: @dfinkel
Bug Fixes
- xds/server: Fix a memory leak of HTTP filter instances occurring when route configurations are updated in-place during a Route Discovery Service (RDS) update. (#9138)
- grpc: In the deprecated
gzipCompressor (used via the deprecatedWithCompressordial option), enforce theMaxRecvMsgSizelimit on the decompressed message buffer, preventing excessive memory allocation from highly compressed payloads. (#9114)- Special Thanks: @evilgensec
- stats/opentelemetry: Record retry attempts,
grpc.previous-rpc-attempts, at the call level and not the attempt level. (#8923) - encoding: Ensure
Close()is always called on readers returned fromCompressor.Decompressif possible. (#9135) - channelz: Fix the
LastMessageSentTimestampandLastMessageReceivedTimestampfields inSocketMetricsto ensure they contain correct timestamp values. (#9109)
Release 1.81.1
Security
- xds/rbac: Fix a potential authorization bypass caused by incorrectly falling through URI/DNS SANs to Subject Distinguished Name (DN) when matching the authenticated principal name. With this fix, only the first non-empty identity source will be used, as per gRFC A41. (#9111)
- Special Thanks: @al4an444
Bug Fixes
- otel: Segregate client and server RPC information used for metrics and traces, to avoid one overwriting the other. (#9081)
protoc-gen-go-grpc v1.6.2
Dependencies
- Upgrade dependencies to latest.
Release 1.81.0
Behavior Changes
- balancer/rls: Switch gauge metrics to asynchronous emission (once per collection cycle) to reduce telemetry noise and align with other gRPC language implementations. (#8808)
Dependencies
- Minimum supported Go version is now 1.25. (#8969)
Bug Fixes
- xds: Use the leaf cluster's security config for the TLS handshake instead of the aggregate cluster's config. (#8956)
- transport: Send a
RST_STREAMwhen receiving anEND_STREAMwhen the stream is not already half-closed. (#8832) - xds: Fix ADS resource name validation to prevent a panic. (#8970)
New Features
- grpc/stats: Add support for custom labels in per-call metrics (gRFC A108). (#9008)
- xds: Add support for Server Name Indication (SNI) and SAN validation (gRFC A101). Disabled by default. To enable, set
GRPC_EXPERIMENTAL_XDS_SNI=trueenvironment variable. (#9016) - xds: Add support to control which fields get propagated from ORCA backend metric reports to LRS load reports (gRFC A85). Disabled by default. To enable, set
GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION=true. (#9005) - xds: Add metrics to track xDS client connectivity and cached resource state (gRFC A78). (#8807)
- stats/otel: Enhance
grpc.subchannel.disconnectionsmetric by adding disconnection reason to thegrpc.disconnect_errorlabel (gRFC A94). This provides granular insights into why subchannels are closing. (#8973) - mem: Add
mem.Buffer.Slice()API to slice the buffer like a slice. (#8977)- Special Thanks: @ash2k
Performance Improvements
- alts: Pool read buffers to lower memory utilization when sockets are unreadable. (#8964)
- transport: Pool HTTP/2 framer read buffers to reduce idle memory consumption. Currently limited to Linux for ALTS and non-encrypted transports (TCP, Unix). To disable, set
GRPC_GO_EXPERIMENTAL_HTTP_FRAMER_READ_BUFFER_POOLING=falseand report any issues. (#9032)