Add support for Apache Flink 2.1.3#38961
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces support for Apache Flink 2.1.3 within the project. It involves adding the necessary build modules for the Flink 2.1 runner, updating global configuration files to recognize the new version, and ensuring that various SDKs and test suites are correctly configured to support this update. The changes ensure that Flink 2.1 is treated as a first-class citizen alongside previous versions. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for Flink 2.1 by introducing the Flink 2.1 runner build configurations and updating supported version lists across properties, documentation, and SDKs. The review feedback points out that the capability resolution strategy for lz4-java in the build files should explicitly select the at.yawk.lz4 variant rather than relying on selectHighestVersion(), which might select an incompatible version. Additionally, the default parallelism in the test configuration is set to '23', which is likely a typo for '2' and could cause resource exhaustion during local test execution.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
a877f3f to
63d6984
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #38961 +/- ##
=========================================
Coverage 55.86% 55.87%
Complexity 3912 3912
=========================================
Files 1320 1320
Lines 180905 180926 +21
Branches 2671 2671
=========================================
+ Hits 101065 101092 +27
+ Misses 76944 76938 -6
Partials 2896 2896
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
63d6984 to
9429a28
Compare
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
Explicitly prefer Flink's at.yawk.lz4:lz4-java over org.lz4:lz4-java to ensure the Flink-compatible version is always selected, regardless of version numbers. This is more robust than selectHighestVersion() which could theoretically select org.lz4 if it had a higher version number.
9429a28 to
cb59b5a
Compare
|
assign set of reviewers |
|
Assigning reviewers: R: @jrmccluskey for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Flink 2.1.3 uses at.yawk.lz4:lz4-java:1.10.3 while Kafka uses org.lz4:lz4-java:1.6.0, causing capability conflicts in configurations that depend on both (like examples:java flinkRunnerPreCommit). Add capability resolution strategy to select the highest version, consistent with the approach in runners/flink/2.1/build.gradle.
016979b to
25aafe5
Compare
| exclude group: "org.slf4j", module: "jul-to-slf4j" | ||
| exclude group: "org.slf4j", module: "slf4j-jdk14" | ||
| } | ||
| configurations.flinkRunnerPreCommit { |
There was a problem hiding this comment.
What does this chunk do?
Is it due to https://issues.apache.org/jira/browse/FLINK-38764?
We don't need this workaround in examples/java. If we really want to patch it, it should happens in module that ships for production (runners/flink/2.1). Here it's just Java examples where handling CVEs doesn't adds much value
If it's required to make Flink 2.1 working it's more concerning, as it indicates users would need the same hack here
Abacn
left a comment
There was a problem hiding this comment.
Thank you!
Are you able to run ./gradlew :runners:flink:2.1:validatesRunner locally to confirm this addition?
| @@ -0,0 +1,27 @@ | |||
| # Licensed to the Apache Software Foundation (ASF) under one | |||
There was a problem hiding this comment.
This file isn't needed. All previous versions' test resources should have been copied
Adds support for Apache Flink 2.1.3
addresses #38947
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.