From 160641f4ba07242822abbc44843e6875a5f90b1d Mon Sep 17 00:00:00 2001 From: Peter Vary Date: Wed, 6 Dec 2023 12:24:20 +0100 Subject: [PATCH] Review comments --- .gitignore | 1 + flink-python/dev/integration_test.sh | 8 ++++---- flink-python/pom.xml | 19 ++++++++++++++++--- .../pyflink/pyflink_gateway_server.py | 13 +++++-------- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 586f64c74..901fd674f 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,5 @@ flink-python/dev/.stage.txt flink-python/dev/install_command.sh flink-python/dev/lint-python.sh flink-python/dev/build-wheels.sh +flink-python/dev/glibc_version_fix.h flink-python/dev/dev-requirements.txt diff --git a/flink-python/dev/integration_test.sh b/flink-python/dev/integration_test.sh index 436c43bc2..19816725a 100755 --- a/flink-python/dev/integration_test.sh +++ b/flink-python/dev/integration_test.sh @@ -42,13 +42,13 @@ FLINK_PYTHON_DIR=$(dirname "$CURRENT_DIR") FLINK_SOURCE_DIR=$(dirname "$FLINK_PYTHON_DIR") # set the FLINK_TEST_LIB_DIR to "flink-connector-kafka" -export FLINK_TEST_LIB_DIR="$FLINK_SOURCE_DIR" +export FLINK_TEST_LIBS="${FLINK_SOURCE_DIR}/flink-python/target/test-dependencies/*" # Temporarily update the installed 'pyflink_gateway_server.py' files with the new one # Needed only until Flink 1.19 release -echo "Checking ${FLINK_TEST_LIB_DIR} for 'pyflink_gateway_server.py'" -find "${FLINK_TEST_LIB_DIR}/flink-python" -name pyflink_gateway_server.py -find "${FLINK_TEST_LIB_DIR}/flink-python/.tox" -name pyflink_gateway_server.py -exec cp "${FLINK_TEST_LIB_DIR}/flink-python/pyflink/pyflink_gateway_server.py" {} \; +echo "Checking ${FLINK_SOURCE_DIR} for 'pyflink_gateway_server.py'" +find "${FLINK_SOURCE_DIR}/flink-python" -name pyflink_gateway_server.py +find "${FLINK_SOURCE_DIR}/flink-python/.tox" -name pyflink_gateway_server.py -exec cp "${FLINK_SOURCE_DIR}/flink-python/pyflink/pyflink_gateway_server.py" {} \; # python test test_all_modules diff --git a/flink-python/pom.xml b/flink-python/pom.xml index 73981d231..8390fefee 100644 --- a/flink-python/pom.xml +++ b/flink-python/pom.xml @@ -91,6 +91,7 @@ under the License. + @@ -173,7 +174,7 @@ under the License. download-single - https://raw.githubusercontent.com/apache/flink/release-${flink.version}/flink-python/dev/install_command.sh + https://raw.githubusercontent.com/pvary/flink-connector-shared-utils/ci_utils/python/install_command.sh ${project.basedir}/dev ${python.infra.download.skip} @@ -185,7 +186,7 @@ under the License. download-single - https://raw.githubusercontent.com/apache/flink/release-${flink.version}/flink-python/dev/lint-python.sh + https://raw.githubusercontent.com/pvary/flink-connector-shared-utils/ci_utils/python/lint-python.sh ${project.basedir}/dev ${python.infra.download.skip} @@ -197,7 +198,19 @@ under the License. download-single - https://raw.githubusercontent.com/apache/flink/release-${flink.version}/flink-python/dev/build-wheels.sh + https://raw.githubusercontent.com/pvary/flink-connector-shared-utils/ci_utils/python/build-wheels.sh + ${project.basedir}/dev + ${python.infra.download.skip} + + + + download-build-version-header + validate + + download-single + + + https://raw.githubusercontent.com/pvary/flink-connector-shared-utils/ci_utils/python/glibc_version_fix.h ${project.basedir}/dev ${python.infra.download.skip} diff --git a/flink-python/pyflink/pyflink_gateway_server.py b/flink-python/pyflink/pyflink_gateway_server.py index 132ec81e0..1cf25a54f 100644 --- a/flink-python/pyflink/pyflink_gateway_server.py +++ b/flink-python/pyflink/pyflink_gateway_server.py @@ -233,16 +233,13 @@ def construct_test_classpath(env): test_jars = [] # Connector tests need to add specific jars to the gateway classpath - # flink_source_root = env['FLINK_TEST_LIB_DIR'] - if 'FLINK_TEST_LIB_DIR' in env: - flink_source_root = env['FLINK_TEST_LIB_DIR'] + if 'FLINK_TEST_LIBS' in env: + test_jars += glob.glob(env['FLINK_TEST_LIBS']) else: flink_source_root = _find_flink_source_root() - - print("ROOOOT: " + flink_source_root) - for pattern in test_jar_patterns: - pattern = pattern.replace("/", os.path.sep) - test_jars += glob.glob(os.path.join(flink_source_root, pattern)) + for pattern in test_jar_patterns: + pattern = pattern.replace("/", os.path.sep) + test_jars += glob.glob(os.path.join(flink_source_root, pattern)) return os.path.pathsep.join(test_jars)