Skip to content

build(deps): Align protobuf and related dependencies with the gRPC v1.81.1 bump - #908

Merged
mc-nv merged 7 commits into
mainfrom
mchornyi/TRI-1608/cinightly-fix-broken-build
Jul 23, 2026
Merged

build(deps): Align protobuf and related dependencies with the gRPC v1.81.1 bump#908
mc-nv merged 7 commits into
mainfrom
mchornyi/TRI-1608/cinightly-fix-broken-build

Conversation

@mc-nv

@mc-nv mc-nv commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What does the PR do?

Fixes the nightly client build against the gRPC v1.81.1 / protobuf v33 third_party bump:

  • Pass utf8_range_DIR to the cc-clients and python-clients sub-builds — protobuf v33's CMake package config now requires the utf8_range package config to resolve.
  • Mark the protobuf and gRPC include directories as SYSTEM: the deprecation warnings introduced by gRPC v1.81.1 / protobuf v33 fire inside the vendor headers themselves (no client code uses the deprecated APIs), and SYSTEM suppresses them while keeping full -Wall -Wextra -Werror enforcement for client code.
  • Dependency bumps flagged by the same nightly: jackson-databind 2.21.2 → 2.21.4 (Java client) and @grpc/grpc-js ^1.8.20 → ^1.14.4 (Node.js gRPC example).

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Related PRs:

Where should the reviewer start?

  • src/c++/library/CMakeLists.txt-Wno-error=deprecated-declarations on client targets
  • cc-clients / python-clients sub-build args — utf8_range_DIR propagation

Test plan:

Nightly build pipeline on internal GitLab CI.

  • CI Pipeline ID: 58489960

Caveats:

None.

Background

The gRPC v1.81.1 / protobuf v33 update in triton-inference-server/third_party#76 broke the nightly build across the Triton repos; this PR chain repairs it.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Resolves: TRI-1608
CI (internal): [#58489960](http://tritonserver.local/ci/pipelines/58489960)

mc-nv added 4 commits July 17, 2026 19:15
The protobuf bundled with gRPC v1.81.1 (v33.5) installs utf8_range as a
separate CMake package and protobuf-config.cmake references the
utf8_range::utf8_validity imported target. find_package(Protobuf CONFIG)
with only Protobuf_DIR set fails at generate time with 'the target was
not found'. Provide utf8_range_DIR alongside Protobuf_DIR.
gRPC v1.81.1 headers internally reference their own deprecated
IdentityKeyCertPair / set_certificate_provider symbols, and protobuf
v33.5 map_field.h references a deprecated RepeatedPtrField constructor.
With the third-party include dirs on the -I path these header-internal
deprecation warnings become hard errors under -Werror and break the
grpc-client-library build. Keep the warnings visible but non-fatal.
… 1.14.4

Resolves open high-severity Dependabot alerts:
- jackson-databind 2.21.2 -> 2.21.4: CVE-2026-54512, CVE-2026-54513
- @grpc/grpc-js 1.14.3 -> 1.14.4: CVE-2026-48068, CVE-2026-48069
Revert the -Wno-error=deprecated-declarations relaxation and instead
mark the protobuf and gRPC include directories as SYSTEM. The
deprecation warnings that broke the -Werror build fire inside the gRPC
v1.81.1 / protobuf v33 headers themselves (their declarations reference
their own deprecated symbols); no client code uses the deprecated APIs.
SYSTEM includes suppress vendor-header warnings while keeping full
-Werror enforcement for our own code.
mc-nv added 2 commits July 17, 2026 20:27
protobuf v33's public message headers (exposed to consumers through the
exported 'inference*' generated types) inline abseil CHECK/LOG(FATAL)
calls. On aarch64 the inlined fast-path parser
google::protobuf::internal::VarintParseSlowArm drags these into the
consumer translation unit, so a program linking only -lgrpcclient
against the shared library failed to resolve absl::*::log_internal::*
(LogMessageFatal, CheckOpMessageBuilder, ...) — breaking the
L0_sdk--SBSA--client shared-link test. Add the log_internal symbols to
the version script's export list (glob keeps it abseil-version
agnostic). x86 is unaffected: its consumer TU never references these
symbols, so the extra exports sit unused.
…settings

protobuf v33 makes DebugString() output intentionally unstable (injects a
'goo.gle/debugstr' marker), breaking the trace-settings string comparisons
in the GRPCTraceTest cases. Serialize with TextFormat::PrintToString for
stable, comparable output.
@mc-nv
mc-nv marked this pull request as ready for review July 18, 2026 17:31
@mc-nv
mc-nv requested review from nv-rinig, whoisj and yinggeh July 18, 2026 17:31
@mc-nv
mc-nv requested a review from Vinya567 July 18, 2026 17:31
@mc-nv
mc-nv requested review from mattwittwer and pskiran1 July 22, 2026 15:11
@Vinya567

Copy link
Copy Markdown

@greptileai

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR repairs the nightly build against the gRPC v1.81.1 / protobuf v33 third-party bump by threading the new utf8_range CMake package config into both cc-clients and python-clients sub-builds, marking vendor include directories as SYSTEM to stop in-header deprecation warnings from failing -Werror, and exporting the abseil log_internal symbol glob needed for aarch64 consumers of libgrpcclient.so.

  • utf8_range_DIR propagation (CMakeLists.txt): two new _FINDPACKAGE_UTF8_RANGE_CONFIG_DIR variables are passed as -Dutf8_range_DIR to both ExternalProject sub-builds, satisfying protobuf v33's new transitive CMake dependency.
  • Vendor header isolation (src/c++/CMakeLists.txt): include_directories(SYSTEM ...) applied at directory scope, covering library, examples, and tests subtrees.
  • ABI fix for aarch64 (libgrpcclient.ldscript): absl::*log_internal* glob added so programs linking only -lgrpcclient can resolve abseil log symbols inlined by protobuf v33 message headers.
  • Test compatibility (cc_client_test.cc): DebugString() replaced by TextFormat::PrintToString() because protobuf v33 makes DebugString() output intentionally unstable.
  • Dependency bumps: jackson-databind 2.21.2 → 2.21.4 and @grpc/grpc-js ^1.8.20 → ^1.14.4.

Confidence Score: 4/5

The changes are targeted build-fix plumbing; no runtime logic is altered and the dependency bumps are minor patch-level increments.

The directory-scoped SYSTEM on vendor headers and the unchecked PrintToString return value are both non-blocking, but the SYSTEM breadth means future deprecation calls inside client code would compile silently. Everything else — utf8_range propagation, ldscript ABI fix, dep bumps — is straightforward and well-commented.

src/c++/CMakeLists.txt (directory-scoped SYSTEM include trade-off) and src/c++/library/libgrpcclient.ldscript (broad abseil symbol export glob).

Important Files Changed

Filename Overview
CMakeLists.txt Adds utf8_range_DIR variable (Win32 and non-Win32 paths) and passes it to both ExternalProject sub-builds to satisfy protobuf v33's new CMake package config dependency.
src/c++/CMakeLists.txt Switches protobuf and gRPC include_directories to SYSTEM; applied at directory scope covering library, examples, and tests sub-directories.
src/c++/library/libgrpcclient.ldscript Exports absl::log_internal symbols via glob for aarch64 consumers that only link -lgrpcclient.
src/c++/tests/cc_client_test.cc Replaces DebugString() with TextFormat::PrintToString() for stable proto v33 output; return value of PrintToString is not checked.
src/grpc_generated/javascript/package-lock.json Lock file updated to resolve @grpc/grpc-js 1.14.4 with correct npm integrity hash.
src/grpc_generated/javascript/package.json Bumps @grpc/grpc-js minimum required version from ^1.8.20 to ^1.14.4.
src/java/pom.xml Bumps jackson-databind from 2.21.2 to 2.21.4.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CMakeLists.txt top-level] -->|ExternalProject -Dutf8_range_DIR| B[cc-clients sub-build]
    A -->|ExternalProject -Dutf8_range_DIR| C[python-clients sub-build]
    B -->|find_package Protobuf CONFIG| D[protobuf v33 - utf8_range resolved]
    B -->|find_package gRPC CONFIG| E[gRPC v1.81.1]
    B -->|include_directories SYSTEM| F[Protobuf headers - deprecation warnings suppressed]
    B -->|include_directories SYSTEM| G[gRPC headers - deprecation warnings suppressed]
    F & G --> H[library / examples / tests inherit SYSTEM dirs]
    I[libgrpcclient.ldscript] -->|absl::*log_internal* glob| J[aarch64 consumers linking only -lgrpcclient]
    K[cc_client_test.cc] -->|TextFormat::PrintToString| L[Stable proto text output]
Loading

Reviews (1): Last reviewed commit: "Update headers" | Re-trigger Greptile

// deliberately makes DebugString() output unstable (it injects a
// "goo.gle/debugstr" marker) to discourage parsing, which breaks the
// string comparisons below. PrintToString gives stable text format.
google::protobuf::TextFormat::PrintToString(response, str);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 TextFormat::PrintToString returns false when serialisation fails (e.g. a required field is unset in proto2, or an internal error occurs). The return value is silently discarded here. While proto3 messages rarely fail, ignoring the result means a serialisation error would leave str unchanged and the subsequent string comparison would either pass spuriously or produce a misleading assertion failure rather than a clear "serialisation failed" message.

Suggested change
google::protobuf::TextFormat::PrintToString(response, str);
ASSERT_TRUE(google::protobuf::TextFormat::PrintToString(response, str))
<< "TextFormat::PrintToString failed";

Comment thread src/c++/CMakeLists.txt
Comment on lines 116 to +130
@@ -122,7 +124,10 @@ endif() # TRITON_ENABLE_CC_GRPC
if(TRITON_ENABLE_CC_GRPC)
find_package(gRPC CONFIG REQUIRED)
message(STATUS "Using gRPC ${gRPC_VERSION}")
include_directories($<TARGET_PROPERTY:gRPC::grpc,INTERFACE_INCLUDE_DIRECTORIES>)
# SYSTEM so header-internal deprecation warnings in gRPC do not fail
# the -Werror build.
include_directories(
SYSTEM $<TARGET_PROPERTY:gRPC::grpc,INTERFACE_INCLUDE_DIRECTORIES>)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Directory-scope SYSTEM suppresses client-code deprecation warnings too

include_directories(SYSTEM ...) applies to every target in the current CMakeLists.txt and all add_subdirectory children (library, examples, tests). The SYSTEM flag suppresses [[deprecated]] warnings that fire when client code calls a deprecated protobuf or gRPC API — not only in-header warnings. A future call to a deprecated API in the client library or examples will silently compile clean under -Werror. The more targeted fix would be target_include_directories(<target> SYSTEM PRIVATE ...) on each affected target.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@mc-nv
mc-nv merged commit 0b46354 into main Jul 23, 2026
4 checks passed
@mc-nv
mc-nv deleted the mchornyi/TRI-1608/cinightly-fix-broken-build branch July 23, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants