Skip to content

[codex] Upgrade protobuf to 4.34.0#17995

Merged
xiangfu0 merged 9 commits intoapache:masterfrom
xiangfu0:codex/upgrade-protobuf-4-34-0
Mar 29, 2026
Merged

[codex] Upgrade protobuf to 4.34.0#17995
xiangfu0 merged 9 commits intoapache:masterfrom
xiangfu0:codex/upgrade-protobuf-4-34-0

Conversation

@xiangfu0
Copy link
Copy Markdown
Contributor

@xiangfu0 xiangfu0 commented Mar 27, 2026

Summary

  • Upgrade the shared protobuf.version to 4.34.0.
  • Upgrade the shared confluent.version to 8.2.0, which publishes protobuf 4.x artifacts.
  • Add an explicit com.google.code.findbugs:jsr305 dependency to pinot-confluent-protobuf so the module still gets javax.annotation types after the shared protobuf upgrade.
  • Fix the Confluent Avro schema-registry integration test for the Confluent 8.2 serializer API change.

Why

Pinot should move its shared protobuf dependency to 4.x without leaving the Confluent input plugins on an older serializer stack. Confluent 8.2.0 now aligns with protobuf 4.x, so the repo can move both versions forward together instead of carrying a plugin-local protobuf 3.x carve-out.

The version bump also surfaced one direct source-level compatibility issue in tests: Confluent 8.2 removed AbstractKafkaAvroSerDeConfig, so Pinots Avro schema-registry integration test needs to use AbstractKafkaSchemaSerDeConfig instead.

User / Developer Impact

  • Pinot now builds against protobuf 4.34.0 and Confluent 8.2.0.
  • pinot-confluent-protobuf stays on the shared protobuf 4.x line instead of maintaining a separate protobuf 3.x island.
  • The Confluent Avro integration test matches the current Confluent serializer API.
  • pinot-confluent-protobuf no longer relies on transitive resolution for javax.annotation types.

Root Cause

  1. pinot-confluent-protobuf referenced javax.annotation.Nullable and javax.annotation.ParametersAreNonnullByDefault without declaring JSR-305 directly.
  2. Confluent 8.2 removed io.confluent.kafka.serializers.AbstractKafkaAvroSerDeConfig, but Pinot integration test code still imported it.

How To Reproduce

  1. Start from current master.
  2. Upgrade the shared protobuf.version to a protobuf 4.x release and the shared confluent.version to 8.2.0.
  3. Run ./mvnw -pl pinot-plugins/pinot-input-format/pinot-confluent-protobuf -am -DskipITs -Dskip.integration.tests=true -DskipTests compile.
  4. Observe missing javax.annotation compilation failures unless jsr305 is declared explicitly.
  5. Run a build that compiles pinot-integration-tests and observe the stale AbstractKafkaAvroSerDeConfig import fail against Confluent 8.2.

Validation

  • ./mvnw -pl pinot-integration-tests spotless:apply
  • ./mvnw -pl pinot-integration-tests checkstyle:check
  • ./mvnw -pl pinot-integration-tests license:format
  • ./mvnw -pl pinot-integration-tests license:check
  • ./mvnw -pl pinot-common,pinot-server,pinot-query-planner,pinot-query-runtime -am -DskipITs -Dskip.integration.tests=true -DskipTests compile
  • ./mvnw -pl pinot-plugins/pinot-input-format/pinot-confluent-protobuf -am -DskipITs -Dskip.integration.tests=true -DskipTests compile
  • ./mvnw -pl pinot-plugins/pinot-input-format/pinot-confluent-avro,pinot-plugins/pinot-input-format/pinot-confluent-json,pinot-plugins/pinot-input-format/pinot-confluent-protobuf -am -DskipITs -Dskip.integration.tests=true -DskipTests compile

Known Test Limitation

  • The Docker-backed Confluent protobuf schema-registry tests still cannot run in this environment because there is no Docker socket for Testcontainers.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades Apache Pinot’s shared Protocol Buffers dependency to the 4.x line and fixes a build break in the pinot-confluent-protobuf module by making its javax.annotation (JSR-305) annotations dependency explicit.

Changes:

  • Bump root protobuf.version from 3.25.9 to 4.34.0 (affecting protobuf BOM / protoc usage across the build).
  • Add an explicit com.google.code.findbugs:jsr305 dependency to pinot-confluent-protobuf to restore access to javax.annotation.Nullable / ParametersAreNonnullByDefault under protobuf 4.x.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pom.xml Updates the shared protobuf version property used by protobuf BOM and protoc artifact resolution.
pinot-plugins/pinot-input-format/pinot-confluent-protobuf/pom.xml Declares jsr305 directly so the module compiles without relying on removed transitive annotations.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.27%. Comparing base (c23b8fd) to head (9c0b140).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17995      +/-   ##
============================================
- Coverage     63.37%   63.27%   -0.10%     
  Complexity     1543     1543              
============================================
  Files          3200     3200              
  Lines        194169   194169              
  Branches      29915    29915              
============================================
- Hits         123051   122867     -184     
- Misses        61466    61650     +184     
  Partials       9652     9652              
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.25% <ø> (-0.02%) ⬇️
java-21 63.25% <ø> (-0.09%) ⬇️
temurin 63.27% <ø> (-0.10%) ⬇️
unittests 63.27% <ø> (-0.10%) ⬇️
unittests1 55.52% <ø> (-0.03%) ⬇️
unittests2 34.19% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

@xiangfu0 xiangfu0 force-pushed the codex/upgrade-protobuf-4-34-0 branch from 3a3fda2 to a0964fa Compare March 27, 2026 22:55
@xiangfu0 xiangfu0 requested a review from Copilot March 27, 2026 22:55
@xiangfu0 xiangfu0 marked this pull request as ready for review March 27, 2026 22:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

Can you try also bumping google cloud version? I think it should also be bumped after upgrading protobuf

<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client</artifactId>
</dependency>
<dependency>
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.

Is this necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is necessary. The module directly uses @Nullable from javax.annotation in KafkaConfluentSchemaRegistryProtoBufMessageDecoder.java (4 usages). Without it, compilation fails with 5 errors. After protobuf 4.x, protobuf-java no longer transitively pulls in jsr305 at compile scope.

That said, I've added <scope>provided</scope> since it's only needed at compile time for annotations and shouldn't be bundled into the shaded plugin JAR.

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.

Should we just include it in pinot-spi? This is a very basic dependency which should be included in all modules

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

jsr305 is already transitively available to all core modules via Guava in pinot-spi (guava -> jsr305:3.0.2:compile). The reason pinot-confluent-protobuf needs it explicitly is that plugin modules declare pinot-spi with provided scope, which makes its transitive dependencies (including jsr305 via Guava) unavailable at compile time.

So adding jsr305 to pinot-spi explicitly wouldn't change anything for plugins — they'd still need their own declaration. The current approach (explicit jsr305 with provided scope in this plugin module) is the minimal correct fix.

@Jackie-Jiang Jackie-Jiang added the dependencies Pull requests that update a dependency file label Mar 29, 2026
xiangfu0 and others added 9 commits March 28, 2026 22:56
- Bump google.cloud.libraries.version from 26.74.0 to 26.79.0 to align
  with protobuf 4.x upgrade
- Add provided scope to jsr305 dependency in pinot-confluent-protobuf
  since it is only needed at compile time for javax.annotation annotations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@xiangfu0 xiangfu0 force-pushed the codex/upgrade-protobuf-4-34-0 branch from 8f64c7a to 9c0b140 Compare March 29, 2026 06:24
@xiangfu0
Copy link
Copy Markdown
Contributor Author

Bumped google.cloud.libraries.version from 26.74.0 to 26.79.0 (latest stable). It uses protobuf 4.33.2 internally which is compatible with our 4.34.0 since Pinot's protobuf-bom takes precedence. GCS plugin compiles cleanly.

@xiangfu0 xiangfu0 merged commit ecaf0f8 into apache:master Mar 29, 2026
30 of 32 checks passed
@xiangfu0 xiangfu0 deleted the codex/upgrade-protobuf-4-34-0 branch March 29, 2026 09:32
xiangfu0 added a commit to xiangfu0/pinot that referenced this pull request Mar 30, 2026
* Upgrade protobuf to 4.34.0

* Scope Confluent protobuf plugin to protobuf 3.x

* Align Confluent protobuf plugin with shared protobuf version

* Stabilize protobuf upgrade CI

* Upgrade Confluent schema registry to 8.2.0

* Drop unrelated controller test tweak

* Fix protobuf upgrade CI regressions

* Revert sqlparser CI script changes

* Address PR review comments: bump Google Cloud libs, scope jsr305

- Bump google.cloud.libraries.version from 26.74.0 to 26.79.0 to align
  with protobuf 4.x upgrade
- Add provided scope to jsr305 dependency in pinot-confluent-protobuf
  since it is only needed at compile time for javax.annotation annotations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants