Skip to content

Add support for Apache Flink 2.1.3#38961

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

Add support for Apache Flink 2.1.3#38961
ddebowczyk92 wants to merge 2 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 on lines +35 to +39
configurations.all {
resolutionStrategy.capabilitiesResolution.withCapability('org.lz4:lz4-java') {
selectHighestVersion()
}
}

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.

medium

Using selectHighestVersion() might not guarantee that Flink's preferred at.yawk.lz4:lz4-java is selected if org.lz4:lz4-java has a higher version number. To ensure the Flink-compatible version is strictly preferred, we can explicitly find and select the candidate from at.yawk.lz4.

configurations.all {
  resolutionStrategy.capabilitiesResolution.withCapability('org.lz4:lz4-java') {
    def candidate = candidates.find { it.id.toString().contains('at.yawk.lz4') }
    if (candidate != null) {
      select(candidate)
    } else {
      selectHighestVersion()
    }
  }
}

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 57.77%. Comparing base (a88686c) to head (63d6984).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #38961   +/-   ##
=========================================
  Coverage     57.76%   57.77%           
  Complexity    13027    13027           
=========================================
  Files          2512     2512           
  Lines        261056   261076   +20     
  Branches      10722    10722           
=========================================
+ Hits         150810   150834   +24     
+ Misses       104525   104521    -4     
  Partials       5721     5721           
Flag Coverage Δ
python 79.28% <ø> (+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.

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

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.

1 participant