diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 198c1452c..6d27d2ec4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 diff --git a/dist/flink-2.2/pom.xml b/dist/flink-2.2/pom.xml index 4cdb742fc..151d2eafc 100644 --- a/dist/flink-2.2/pom.xml +++ b/dist/flink-2.2/pom.xml @@ -28,6 +28,50 @@ under the License. flink-agents-dist-flink-2.2 Flink Agents : Dist : Flink 2.2 + + ${flink.2.2.version} + + + + + + org.apache.flink + flink-streaming-java + ${flink.version} + provided + + + org.apache.flink + flink-runtime + ${flink.version} + provided + + + org.apache.flink + flink-clients + ${flink.version} + provided + + + org.apache.flink + flink-table-api-java + ${flink.version} + provided + + + org.apache.flink + flink-table-api-java-bridge + ${flink.version} + provided + + + org.apache.flink + flink-python + ${flink.version} + provided + + + diff --git a/dist/flink-2.3/pom.xml b/dist/flink-2.3/pom.xml new file mode 100644 index 000000000..8deaaf883 --- /dev/null +++ b/dist/flink-2.3/pom.xml @@ -0,0 +1,101 @@ + + + + 4.0.0 + + org.apache.flink + flink-agents-dist + 0.3-SNAPSHOT + + + flink-agents-dist-flink-2.3 + Flink Agents : Dist : Flink 2.3 + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-shared-resources + generate-resources + + copy-resources + + + ${project.build.outputDirectory} + + + ${project.parent.basedir}/src/main/resources + + META-INF/** + + + + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + shade-flink-agents-thin + package + + shade + + + false + true + thin + + + + org.apache.flink:flink-agents-* + + + + + + *:* + + org/apache/flink/agents/** + + + + + + + true + + + + + + + + + + diff --git a/dist/pom.xml b/dist/pom.xml index 47d393edd..9ee655bb2 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -34,6 +34,7 @@ under the License. 2.0.2 2.1.3 2.2.1 + 2.3.0 @@ -42,6 +43,7 @@ under the License. flink-2.0 flink-2.1 flink-2.2 + flink-2.3 diff --git a/docs/content/docs/development/memory/long_term_memory.md b/docs/content/docs/development/memory/long_term_memory.md index 46ffc3ac6..727e5b445 100644 --- a/docs/content/docs/development/memory/long_term_memory.md +++ b/docs/content/docs/development/memory/long_term_memory.md @@ -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 diff --git a/docs/content/docs/faq/faq.md b/docs/content/docs/faq/faq.md index 76ed3e03a..bc0cb279c 100644 --- a/docs/content/docs/faq/faq.md +++ b/docs/content/docs/faq/faq.md @@ -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.3.0, which includes the fix, so cross-language async is enabled by default; on older Flink versions it falls back to synchronous execution automatically. ### Native Integration Support Matrix diff --git a/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml b/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml index bfbdf1e6a..479a47ba5 100644 --- a/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml +++ b/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml @@ -33,9 +33,10 @@ under the License. 2.0.2 2.1.3 2.2.1 + 2.3.0 - ${flink.2.2.version} - flink-agents-dist-flink-2.2 + ${flink.2.3.version} + flink-agents-dist-flink-2.3 @@ -199,6 +200,15 @@ under the License. flink-agents-dist-flink-2.1 + + + + flink-2.2 + + ${flink.2.2.version} + flink-agents-dist-flink-2.2 + + diff --git a/pom.xml b/pom.xml index 4728fa589..108841acd 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ under the License. ${target.java.version} 2.27.1 false - 2.2.1 + 2.3.0 4.0.0 0.9.0-incubating 5.10.1 diff --git a/python/_build_backend/tests/test_backend.py b/python/_build_backend/tests/test_backend.py index a8fc9b6d3..9bec750f0 100644 --- a/python/_build_backend/tests/test_backend.py +++ b/python/_build_backend/tests/test_backend.py @@ -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: @@ -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) diff --git a/python/jar_manifest.json b/python/jar_manifest.json index 5077c4d1a..4ee74ddc3 100644 --- a/python/jar_manifest.json +++ b/python/jar_manifest.json @@ -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" } ] } diff --git a/tools/e2e.sh b/tools/e2e.sh index bc04762eb..5a5c77131 100755 --- a/tools/e2e.sh +++ b/tools/e2e.sh @@ -15,7 +15,7 @@ # limitations under the License. # -DEFAULT_FLINK_VERSION="2.2" +DEFAULT_FLINK_VERSION="2.3" function run_test { local description="$1" diff --git a/tools/ut.sh b/tools/ut.sh index a40303e4b..76876c79f 100755 --- a/tools/ut.sh +++ b/tools/ut.sh @@ -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