Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ jobs:
- os: 'ubuntu-latest'
python-version: '3.12'
flink-version: "2.2"
- os: 'ubuntu-latest'
python-version: '3.12'
flink-version: "2.3"
steps:
- uses: actions/checkout@v4
- name: Install java
Expand Down Expand Up @@ -216,6 +219,9 @@ jobs:
- os: 'ubuntu-latest'
java-version: "21"
flink-version: "2.2"
- os: 'ubuntu-latest'
java-version: "17"
flink-version: "2.3"
steps:
- uses: actions/checkout@v4
- name: Install java
Expand Down
44 changes: 44 additions & 0 deletions dist/flink-2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,50 @@ under the License.
<artifactId>flink-agents-dist-flink-2.2</artifactId>
<name>Flink Agents : Dist : Flink 2.2</name>

<properties>
<flink.version>${flink.2.2.version}</flink.version>
</properties>

<dependencies>
<!-- Flink dependencies -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-api-java</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-api-java-bridge</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-python</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand Down
101 changes: 101 additions & 0 deletions dist/flink-2.3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.flink</groupId>
<artifactId>flink-agents-dist</artifactId>
<version>0.3-SNAPSHOT</version>
</parent>

<artifactId>flink-agents-dist-flink-2.3</artifactId>
<name>Flink Agents : Dist : Flink 2.3</name>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-shared-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>${project.parent.basedir}/src/main/resources</directory>
<includes>
<include>META-INF/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<!-- Build thin jar for Python wheel (only flink-agents code) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-flink-agents-thin</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadeTestJar>false</shadeTestJar>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>thin</shadedClassifierName>
<!-- Only include flink-agents artifacts -->
<artifactSet>
<includes>
<include>org.apache.flink:flink-agents-*</include>
</includes>
</artifactSet>
<filters>
<!-- Only include flink-agents classes -->
<filter>
<artifact>*:*</artifact>
<includes>
<include>org/apache/flink/agents/**</include>
</includes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2 changes: 2 additions & 0 deletions dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ under the License.
<flink.2.0.version>2.0.2</flink.2.0.version>
<flink.2.1.version>2.1.3</flink.2.1.version>
<flink.2.2.version>2.2.1</flink.2.2.version>
<flink.2.3.version>2.3.0</flink.2.3.version>
</properties>

<modules>
Expand All @@ -42,6 +43,7 @@ under the License.
<module>flink-2.0</module>
<module>flink-2.1</module>
<module>flink-2.2</module>
<module>flink-2.3</module>
</modules>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/development/memory/long_term_memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Declare the following resources in your agent plan:
- An [EmbeddingModel]({{< ref "docs/development/embedding_models" >}}) for vector generation
- A [VectorStore]({{< ref "docs/development/vector_stores" >}}) for persistent storage

> **Java prerequisite:** Mem0 invokes the chat and embedding models on its own thread executor, which relies on the async-friendly pemja fix. When Mem0 Long-Term Memory is configured together with Java actions, the runtime requires a Flink version of `1.20.5`, `2.0.2`, `2.1.3`, `2.2.1` or higher; otherwise it throws at startup. Either upgrade Flink or use the Python API.
> **Java prerequisite:** Mem0 invokes the chat and embedding models on its own thread executor, which relies on the async-friendly pemja fix. When Mem0 Long-Term Memory is configured together with Java actions, the runtime requires a Flink version of `1.20.5`, `2.0.2`, `2.1.3`, `2.2.1`, `2.3.0` or higher; otherwise it throws at startup. Either upgrade Flink or use the Python API.

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This is important because:
- **For Java users on JDK 21+**: Async execution is available.
- **For Java users on JDK < 21**: Async execution is not available and falls back to synchronous execution.

> **Cross-language async note**: Async execution for cross-language resources requires the pemja 0.5.7 fix, available in Flink 1.20.5+ / 2.0.2+ / 2.1.3+ / 2.2.1+. Current builds target Flink 2.2.0, so cross-language calls still run synchronously for now; this is resolved automatically once running on a Flink version that includes the fix.
> **Cross-language async note**: Async execution for cross-language resources requires the pemja 0.5.7 fix, available in Flink 1.20.5+ / 2.0.2+ / 2.1.3+ / 2.2.1+ / 2.3+. Current builds target Flink 2.2.1, which includes the fix, so cross-language async is enabled by default; on older Flink versions it falls back to synchronous execution automatically.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This line still reads Current builds target Flink 2.2.1, but the root flink.version now defaults to 2.3.0 (pom.xml:44) — looks like the version number didn't follow the default bump. Should it be 2.3.0? The rest of the sentence (the fix is present, so async is on by default) holds either way.


### Native Integration Support Matrix

Expand Down
14 changes: 12 additions & 2 deletions e2e-test/flink-agents-end-to-end-tests-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ under the License.
<flink.2.0.version>2.0.2</flink.2.0.version>
<flink.2.1.version>2.1.3</flink.2.1.version>
<flink.2.2.version>2.2.1</flink.2.2.version>
<flink.2.3.version>2.3.0</flink.2.3.version>

<flink.version>${flink.2.2.version}</flink.version>
<flink.agents.dist.artifactId>flink-agents-dist-flink-2.2</flink.agents.dist.artifactId>
<flink.version>${flink.2.3.version}</flink.version>
<flink.agents.dist.artifactId>flink-agents-dist-flink-2.3</flink.agents.dist.artifactId>
</properties>

<dependencies>
Expand Down Expand Up @@ -199,6 +200,15 @@ under the License.
<flink.agents.dist.artifactId>flink-agents-dist-flink-2.1</flink.agents.dist.artifactId>
</properties>
</profile>

<!-- Flink 2.2 Profile -->
<profile>
<id>flink-2.2</id>
<properties>
<flink.version>${flink.2.2.version}</flink.version>
<flink.agents.dist.artifactId>flink-agents-dist-flink-2.2</flink.agents.dist.artifactId>
</properties>
</profile>
</profiles>

</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ under the License.
<maven.compiler.target>${target.java.version}</maven.compiler.target>
<spotless.version>2.27.1</spotless.version>
<spotless.skip>false</spotless.skip>
<flink.version>2.2.1</flink.version>
<flink.version>2.3.0</flink.version>
<kafka.version>4.0.0</kafka.version>
<fluss.version>0.9.0-incubating</fluss.version>
<junit5.version>5.10.1</junit5.version>
Expand Down
7 changes: 7 additions & 0 deletions python/_build_backend/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def maven_server(tmp_path_factory) -> tuple[str, Path]:
("flink-agents-dist-flink-2.0", "thin"),
("flink-agents-dist-flink-2.1", "thin"),
("flink-agents-dist-flink-2.2", "thin"),
("flink-agents-dist-flink-2.3", "thin"),
]

for artifact_id, classifier in artifacts:
Expand Down Expand Up @@ -243,6 +244,12 @@ def test_download_jars_from_local_server(tmp_path, monkeypatch, maven_server) ->
"dest": "flink_agents/lib/flink-2.2/",
"sha256": expected_sha,
},
{
"artifact_id": "flink-agents-dist-flink-2.3",
"classifier": "thin",
"dest": "flink_agents/lib/flink-2.3/",
"sha256": expected_sha,
},
],
}
_write_manifest(tmp_path / "jar_manifest.json", manifest)
Expand Down
6 changes: 6 additions & 0 deletions python/jar_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
"classifier": "thin",
"dest": "flink_agents/lib/flink-2.2/",
"sha256": "PLACEHOLDER"
},
{
"artifact_id": "flink-agents-dist-flink-2.3",
"classifier": "thin",
"dest": "flink_agents/lib/flink-2.3/",
"sha256": "PLACEHOLDER"
}
]
}
2 changes: 1 addition & 1 deletion tools/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

DEFAULT_FLINK_VERSION="2.2"
DEFAULT_FLINK_VERSION="2.3"

function run_test {
local description="$1"
Expand Down
4 changes: 2 additions & 2 deletions tools/ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Options:
-e, --e2e Run e2e tests
-b, --both Run both Java and Python tests (default)
-f, --flink Specify Flink version to test (can be used multiple times)
Supported versions: 2.2, 1.20
Examples: -f 2.2, -f 1.20, -f 2.2 -f 1.20
Supported versions: 2.3, 2.2, 2.1, 2.0, 1.20
Examples: -f 2.3, -f 1.20, -f 2.3 -f 1.20
Default: run all versions if not specified
-v, --verbose Show verbose output
-h, --help Display this help message
Expand Down
Loading