-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[FLINK-38547] [flink-protobuf] Upgrade protobuf to 4.32.1 #27137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| <py4j.version>0.10.9.7</py4j.version> | ||
| <beam.version>2.54.0</beam.version> | ||
| <protoc.version>3.21.7</protoc.version> | ||
| <protoc.version>4.32.1</protoc.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This upgrade sounds like a great idea. I think we should update the docs to draw users attention to this new support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I'll update the relevant docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the protobuf format docs and add a section to the 2.1 release ntoes.
| vulnerability found in [CVE-2025-30065](https://nvd.nist.gov/vuln/detail/CVE-2025-30065). | ||
| vulnerability found in [CVE-2025-30065](https://nvd.nist.gov/vuln/detail/CVE-2025-30065). | ||
|
|
||
| #### Upgrade Protocol Buffers to 4.32.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be moved to a new flink-2.2.md release notes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik the release notes are generated by the release manager when doing the actual release based on the "release notes" section you put into the jira ticket when closing it.
It's definitely worthwhile mentioning this change so please put it into the ticket release notes so the it's showing up in the 2.2 release notes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. I just came back from PTO. Thanks a lot for doing this upgrade and great idea with the patched proto writer supports.
Overall looks good to me left two inline comments.
| vulnerability found in [CVE-2025-30065](https://nvd.nist.gov/vuln/detail/CVE-2025-30065). | ||
| vulnerability found in [CVE-2025-30065](https://nvd.nist.gov/vuln/detail/CVE-2025-30065). | ||
|
|
||
| #### Upgrade Protocol Buffers to 4.32.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik the release notes are generated by the release manager when doing the actual release based on the "release notes" section you put into the jira ticket when closing it.
It's definitely worthwhile mentioning this change so please put it into the ticket release notes so the it's showing up in the 2.2 release notes :)
| * <p>The original source can be found here: | ||
| * https://github.com/apache/parquet-java/blob/apache-parquet-1.15.2/parquet-protobuf/src/main/java/org/apache/parquet/proto/ProtoWriteSupport.java | ||
| */ | ||
| class PatchedProtoWriteSupport<T extends MessageOrBuilder> extends WriteSupport<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you mark the code blocks you have patched in the code to easier distinguish what is copied.
What is the purpose of the change
Flink currently uses protobuf-java 3.x, causing compatibility issues for applications requiring protobuf 4.x. This upgrade to protobuf 4.32.1 enables:
The
parquet-protobufintegration required a compatibility patch (PatchedProtoWriteSupport) because upstream parquet-java 1.15.2 still uses protobuf 3.x APIs. This patch can be removed once parquet-java adds native protobuf 4.x support (apache/parquet-java#3175).Brief change log
PatchedProtoWriteSupportto maintain compatibility with parquet-java 1.15.2 (which still uses protobuf 3.x APIs)Verifying this change
This change added tests and can be verified as follows:
PatchedProtoWriteSupportTestwith 6 tests:ParquetProtoWritersDoes this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation