Skip to content

fix(client): support protobuf 6 runtimes - #564

Merged
zhengluo-nv merged 1 commit into
mainfrom
zheluo/trtllm-protobuf-compat
Aug 5, 2026
Merged

zhengluo-nv merged 1 commit into
mainfrom
zheluo/trtllm-protobuf-compat

Conversation

@zhengluo-nv

@zhengluo-nv zhengluo-nv commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • widen the ModelExpress client runtime constraint to protobuf>=5.27,<7
  • keep checked-in Python stubs generated with the pinned protobuf-5-era toolchain so they remain usable on both protobuf 5 and 6
  • move grpcio-tools out of the test extra into an explicit codegen extra
  • run the full Python CI suite against both protobuf 5 and protobuf 6

Why

Current TensorRT-LLM images require protobuf 6.x, while ModelExpress declares protobuf<6. A normal ModelExpress install therefore conflicts with the TRT-LLM runtime or requires --no-deps, leaving compatibility unverified. The generated protobuf 5 bindings already run correctly on protobuf 6; the blocker is the package constraint and same-major-only test guard.

User impact

ModelExpress can be installed normally into qualified TensorRT-LLM images without downgrading their protobuf stack. Existing protobuf 5 users remain supported. Contributors changing p2p.proto use pip install -e ".[codegen]" to preserve dual-runtime bindings.

Validation

  • 184 metadata, client, source-selection, publisher, and TRT-LLM tests passed with protobuf 5.29.6
  • the same 184 tests passed with protobuf 6.33.6
  • protobuf compatibility tests: 11 passed on each major
  • source distribution and wheel build succeeded; wheel metadata contains protobuf>=5.27,<7
  • uv lock --check
  • GitHub workflow YAML parse
  • git diff --check

Summary by CodeRabbit

  • Compatibility

    • Expanded supported Python protobuf runtime versions to include major versions 5 and 6.
    • Updated compatibility checks to better support generated bindings across supported runtime versions.
  • Documentation

    • Clarified installation steps by separating development tools from optional protobuf code-generation tools.
    • Documented supported protobuf version requirements and when code-generation dependencies are needed.
  • Testing

    • CI now validates the Python package against multiple supported protobuf versions.

@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 28, 2026 19:02 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release July 28, 2026 19:02 Inactive
@github-actions github-actions Bot added the fix label Jul 28, 2026
@zhengluo-nv zhengluo-nv reopened this Aug 5, 2026
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release August 5, 2026 22:21 Inactive
@zhengluo-nv zhengluo-nv self-assigned this Aug 5, 2026
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-protobuf-compat branch from b5e6bcb to d2af351 Compare August 5, 2026 22:26
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release August 5, 2026 22:26 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release August 5, 2026 22:26 Inactive
@zhengluo-nv
zhengluo-nv marked this pull request as ready for review August 5, 2026 22:27
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The Python package now supports protobuf runtime versions 5 and 6, uses protobuf 5 generated bindings, separates code-generation tooling, and tests both runtime versions in CI.

Changes

Protobuf compatibility

Layer / File(s) Summary
Dependency and code-generation contract
.github/workflows/ci.yml, modelexpress_client/python/README.md, modelexpress_client/python/pyproject.toml
The package permits protobuf versions below 7. Code-generation tooling uses a separate codegen extra with grpcio-tools pinned to 1.66.2.
CI runtime compatibility validation
.github/workflows/ci.yml, modelexpress_client/python/tests/test_types.py
CI runs the Python tests with protobuf versions 5 and 6. The compatibility test requires protobuf 5 generated bindings and allows runtime major versions 5 or 6.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Poem

A rabbit checks the protobuf gate,
Five and six arrive in a matrix state.
Gencode five hops through the test,
Codegen tools wear a pinned vest.
“All green,” says the rabbit, “that’s best!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for protobuf 6 runtimes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modelexpress_client/python/pyproject.toml`:
- Line 31: Raise the protobuf minimum to >=5.27.2 in
modelexpress_client/python/pyproject.toml and
modelexpress_client/python/README.md, and update the protobuf 5 CI constraint in
.github/workflows/ci.yml accordingly. Add a CI job testing protobuf==5.27.2 to
validate the declared minimum version.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a614398b-6b1e-4441-a3c9-d4ddd22b77da

📥 Commits

Reviewing files that changed from the base of the PR and between a5982b1 and d2af351.

⛔ Files ignored due to path filters (1)
  • modelexpress_client/python/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • modelexpress_client/python/README.md
  • modelexpress_client/python/pyproject.toml
  • modelexpress_client/python/tests/test_types.py

Comment thread modelexpress_client/python/pyproject.toml Outdated
Signed-off-by: Zheng Luo <zheluo@nvidia.com>
@zhengluo-nv
zhengluo-nv force-pushed the zheluo/trtllm-protobuf-compat branch from d2af351 to b1829fb Compare August 5, 2026 22:36
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release August 5, 2026 22:36 Inactive
@copy-pr-bot
copy-pr-bot Bot temporarily deployed to automated-release August 5, 2026 22:36 Inactive

@AndyDai-nv AndyDai-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@zhengluo-nv
zhengluo-nv merged commit 6175ec3 into main Aug 5, 2026
50 checks passed
@zhengluo-nv
zhengluo-nv deleted the zheluo/trtllm-protobuf-compat branch August 5, 2026 23:37
nv-nmailhot pushed a commit that referenced this pull request Aug 13, 2026
Signed-off-by: Zheng Luo <zheluo@nvidia.com>
Signed-off-by: Hyunjae Woo <hwoo@nvidia.com>
Co-authored-by: Zheng Luo <zheluo@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants