This is an automated email from the ASF dual-hosted git repository. hxb pushed a commit to branch release-1.17 in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.17 by this push: new dfc85f6544c [FLINK-34202][python] Optimize Python nightly CI time (#24321) dfc85f6544c is described below commit dfc85f6544cf196c6e6e09c3f9e71c936b89d45c Author: HuangXingBo <h...@apache.org> AuthorDate: Wed Feb 21 14:44:26 2024 +0800 [FLINK-34202][python] Optimize Python nightly CI time (#24321) --- flink-python/dev/lint-python.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flink-python/dev/lint-python.sh b/flink-python/dev/lint-python.sh index 1c0452b3cff..1a0235db491 100755 --- a/flink-python/dev/lint-python.sh +++ b/flink-python/dev/lint-python.sh @@ -596,7 +596,16 @@ function tox_check() { # Only run test in latest python version triggered by a Git push $TOX_PATH -vv -c $FLINK_PYTHON_DIR/tox.ini -e ${LATEST_PYTHON} --recreate 2>&1 | tee -a $LOG_FILE else - $TOX_PATH -vv -c $FLINK_PYTHON_DIR/tox.ini --recreate 2>&1 | tee -a $LOG_FILE + # Only run random selected python version in nightly CI. + ENV_LIST_STRING=`$TOX_PATH -l -c $FLINK_PYTHON_DIR/tox.ini` + _OLD_IFS=$IFS + IFS=$'\n' + ENV_LIST=(${ENV_LIST_STRING}) + IFS=$_OLD_IFS + + ENV_LIST_SIZE=${#ENV_LIST[@]} + index=$(($RANDOM % ENV_LIST_SIZE)) + $TOX_PATH -vv -c $FLINK_PYTHON_DIR/tox.ini -e ${ENV_LIST[$index]} --recreate 2>&1 | tee -a $LOG_FILE fi TOX_RESULT=$((grep -c "congratulations :)" "$LOG_FILE") 2>&1)