Skip to content

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

Merged
mc-nv merged 4 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#466
mc-nv merged 4 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 build against the gRPC v1.81.1 / protobuf v33 third_party bump:

  • Define a TRITON_THIRD_PARTY_REPO_TAG cache variable and forward it to the cc-clients and python-clients ExternalProject builds. Previously the client sub-builds fell back to their default third_party tag and picked up a revision incompatible with the rest of the build.
  • Add the protobuf install tree as an extra CMAKE_PREFIX_PATH entry so the utf8_range package config nested inside it (required by protobuf v33's package config, pulled in transitively via gRPCConfig) resolves during perf-analyzer configure.
  • Set CMAKE_CXX_STANDARD project-wide from TRITON_MIN_CXX_STANDARD (default 20). The abseil install pins its options to the standard used at build time (C++20 selects the std:: ordering types); the client-backend object libraries previously compiled at the compiler default (gnu++17) and failed against the pinned abseil headers.
  • Adapt to the protobuf v33 API: JsonPrintOptions::always_print_primitive_fields was removed — use its replacement always_print_fields_with_no_presence (triton and TFS client backends).

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?

  • CMakeLists.txtTRITON_THIRD_PARTY_REPO_TAG cache var and its forwarding to both sub-builds

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)

The cc-clients and python-clients external projects clone the client
repo but never pass a third-party tag, so the client build always uses
the third_party default (main) regardless of what the surrounding build
was pinned to. Add a TRITON_THIRD_PARTY_REPO_TAG cache variable and
forward it to both client sub-builds.
protobuf v33's protobuf-config.cmake (pulled in transitively through
gRPCConfig's find_dependency) requires the utf8_range package, whose
config is installed inside the protobuf tree at
<third-party>/protobuf/<libdir>/cmake/utf8_range. The third-party root
prefix alone cannot resolve it, so add the protobuf install tree as an
additional CMAKE_PREFIX_PATH entry.
TRITON_MIN_CXX_STANDARD (default 20) governs the third-party build, and
the abseil install pins its options.h to the standard used at build
time — with C++20 it selects the std:: ordering types. Only the
perf_analyzer executable requested cxx_std_20 via
target_compile_features; the client-backend object libraries compiled
at the compiler default (gnu++17) and failed against the pinned abseil
headers ('partial_ordering' has not been declared in 'std'). Set
CMAKE_CXX_STANDARD project-wide so every target matches the third-party
stack.
JsonPrintOptions::always_print_primitive_fields was removed in protobuf
v33 (bundled with gRPC v1.81.1); use its designated replacement
always_print_fields_with_no_presence. Also updated in the (currently
disabled) TensorFlow Serving backend for when it returns.
@mc-nv
mc-nv marked this pull request as ready for review July 18, 2026 00:43
@mc-nv
mc-nv marked this pull request as draft July 18, 2026 00:50
@mc-nv
mc-nv marked this pull request as ready for review 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 aligns the perf_analyzer build system with the gRPC v1.81.1 / protobuf v33 third-party bump by fixing missing tag forwarding, a missing CMAKE_PREFIX_PATH entry, a C++ standard mismatch, and deprecated protobuf API calls.

  • Introduces TRITON_THIRD_PARTY_REPO_TAG in the root CMakeLists.txt and forwards it to both cc-clients and python-clients ExternalProject builds so all sub-builds clone a consistent third-party revision.
  • Extends CMAKE_PREFIX_PATH in src/CMakeLists.txt with the protobuf sub-directory of the install prefix, enabling CMake to resolve the nested utf8_range package config required by protobuf v33 / gRPCConfig.
  • Sets CMAKE_CXX_STANDARD project-wide from TRITON_MIN_CXX_STANDARD (default 20) so the perf-analyzer object libraries compile against the same standard as abseil, and replaces the removed always_print_primitive_fields field with always_print_fields_with_no_presence across the Triton and TFS client backends.

Confidence Score: 5/5

The changes are tightly scoped to build-system wiring and a well-understood API rename; the nightly CI pipeline confirms the build succeeds end-to-end.

All four changes are mechanical and narrowly targeted: cache variable forwarding, a CMake prefix path addition, a C++ standard propagation, and a protobuf API rename that compiles cleanly. No runtime logic was altered beyond the JSON serialization option swap, and the semantic implications of that swap are already documented in a prior review thread.

src/CMakeLists.txt — the TRITON_MIN_CXX_STANDARD guard has no fallback default, so a standalone inner-build invocation would silently skip the C++ standard setting.

Important Files Changed

Filename Overview
CMakeLists.txt Adds TRITON_THIRD_PARTY_REPO_TAG cache variable and forwards it to cc-clients and python-clients ExternalProject builds so all sub-builds use a consistent third-party tag.
src/CMakeLists.txt Sets CMAKE_CXX_STANDARD from TRITON_MIN_CXX_STANDARD (guarded) and adds the protobuf install sub-tree to CMAKE_PREFIX_PATH for utf8_range resolution; guard has no fallback default.
src/client_backend/triton/triton_client_backend.cc Replaces removed always_print_primitive_fields with always_print_fields_with_no_presence at two call sites (ModelMetadata and ModelConfig) to adapt to protobuf v33 API.
src/client_backend/tensorflow_serving/tfserve_client_backend.cc Same protobuf v33 API adaptation as the Triton backend — replaces always_print_primitive_fields with always_print_fields_with_no_presence for the TFS ModelMetadata call.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Root["CMakeLists.txt (root)\nTRITON_THIRD_PARTY_REPO_TAG\nTRITON_MIN_CXX_STANDARD"]

    Root -->|ExternalProject| CC["cc-clients\n(triton/client.git)\n+ TRITON_THIRD_PARTY_REPO_TAG ✅"]
    Root -->|ExternalProject| PA["perf-analyzer\n(local src/)\n+ TRITON_MIN_CXX_STANDARD ✅"]
    Root -->|ExternalProject| PY["python-clients\n(triton/client.git)\n+ TRITON_THIRD_PARTY_REPO_TAG ✅"]

    CC -->|"builds & installs\nthird-party libs"| TP["TRITON_THIRD_PARTY_INSTALL_PREFIX\n(cc_clients/third-party/)"]
    TP --> PA

    PA -->|"src/CMakeLists.txt\nCMAKE_PREFIX_PATH"| PB["${INSTALL_PREFIX}\n${INSTALL_PREFIX}/protobuf ✅\n(utf8_range resolution)"]
    PB -->|"find_package"| Proto["protobuf v33\ngRPC v1.81.1\nabseil (C++20)"]

    PA -->|"CMAKE_CXX_STANDARD\n= TRITON_MIN_CXX_STANDARD (20)"| ABIFix["ABI aligned with\nabseil headers ✅"]
Loading

Reviews (2): Last reviewed commit: "fix: Replace removed protobuf always_pri..." | Re-trigger Greptile

Comment on lines 192 to 195
options.preserve_proto_field_names = true;
options.always_print_primitive_fields = true;
options.always_print_fields_with_no_presence = true;
::google::protobuf::util::MessageToJsonString(
model_metadata_proto, &metadata, options);

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 Subtle semantic difference from the replaced field

always_print_fields_with_no_presence is the documented protobuf v33 replacement for always_print_primitive_fields, but the two options diverge for proto3 optional scalar fields and oneof members: the old option printed those at their default value regardless of whether they were explicitly set; the new option will omit them when they are not set (because optional and oneof fields carry explicit presence).

If any field in ModelMetadataResponse or ModelConfigResponse is a proto3 optional scalar (or is a oneof member), callers that previously received a full JSON object with default-zero values will now get a sparse object and may hit missing-key errors. The same applies to the TFS GetModelMetadataResponse site. Worth confirming against the actual .proto definitions that no optional/oneof scalars are relied upon at their default values.

@Vinya567

Copy link
Copy Markdown

@greptileai

@mc-nv
mc-nv merged commit a218ec1 into main Jul 23, 2026
5 of 7 checks passed
@mc-nv
mc-nv deleted the mchornyi/TRI-1608/cinightly-fix-broken-build branch July 23, 2026 02:35
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.

4 participants