Skip to content

Add support for Apache Flink 2.1.3#38961

Open
ddebowczyk92 wants to merge 3 commits into
apache:masterfrom
ddebowczyk92:flink-2.1-support
Open

Add support for Apache Flink 2.1.3#38961
ddebowczyk92 wants to merge 3 commits into
apache:masterfrom
ddebowczyk92:flink-2.1-support

Conversation

@ddebowczyk92

Copy link
Copy Markdown
Contributor

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:

  • Mention the appropriate issue in your description (for example: 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, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

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)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Apache Flink 2.1.3 Support: Added full support for Apache Flink 2.1.3 across the codebase, including necessary build configurations and dependency management.
  • Build Infrastructure Updates: Updated gradle properties and test configurations to include Flink 2.1, ensuring compatibility with existing runner logic.
  • Documentation and SDK Updates: Updated Go, Python, and TypeScript SDK references to include Flink 2.1 as a supported version.
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
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/run_rc_validation_java_quickstart.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

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.

Comment thread runners/flink/2.1/build.gradle
Comment thread runners/flink/2.1/job-server/build.gradle
Comment thread runners/flink/2.1/src/test/resources/flink-test-config.yaml
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.87%. Comparing base (b7bc937) to head (25aafe5).
⚠️ Report is 3 commits behind head on master.

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           
Flag Coverage Δ
python 79.28% <100.00%> (+0.01%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

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.
@ddebowczyk92

Copy link
Copy Markdown
Contributor Author

assign set of reviewers

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @jrmccluskey for label python.
R: @shunping for label go.
R: @damccorm for label build.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

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.
@github-actions github-actions Bot added java and removed java labels Jun 16, 2026
exclude group: "org.slf4j", module: "jul-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
}
configurations.flinkRunnerPreCommit {

@Abacn Abacn Jun 16, 2026

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.

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 Abacn 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.

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

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.

This file isn't needed. All previous versions' test resources should have been copied

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