You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2020/09/15 07:43:16 UTC
[flink] branch release-1.11 updated: [FLINK-16768][tests][backport]
Let the watchdog also monitor mvn logs
This is an automated email from the ASF dual-hosted git repository.
rmetzger pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.11 by this push:
new 4087297 [FLINK-16768][tests][backport] Let the watchdog also monitor mvn logs
4087297 is described below
commit 408729731440d67b1d6399019bacc91c2a06fcc2
Author: Robert Metzger <rm...@apache.org>
AuthorDate: Mon Sep 14 13:07:57 2020 +0200
[FLINK-16768][tests][backport] Let the watchdog also monitor mvn logs
---
tools/travis_watchdog.sh | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/tools/travis_watchdog.sh b/tools/travis_watchdog.sh
index 6a47db8..1861508 100755
--- a/tools/travis_watchdog.sh
+++ b/tools/travis_watchdog.sh
@@ -51,6 +51,8 @@ TRANSFER_UPLOAD_MAX_RETRIES=2
# backoff algorithm should be too long for the last several retries.
TRANSFER_UPLOAD_RETRY_DELAY=5
+WATCHDOG_ADDITIONAL_MONITORING_FILES="$ARTIFACTS_DIR/mvn-*.log"
+
LOG4J_PROPERTIES=${HERE}/log4j-travis.properties
PYTHON_TEST="./flink-python/dev/lint-python.sh"
@@ -191,13 +193,26 @@ put_yarn_logs_to_artifacts() {
done
}
+max_of() {
+ local max number
+
+ max="$1"
+
+ for number in "${@:2}"; do
+ if ((number > max)); then
+ max="$number"
+ fi
+ done
+
+ printf '%d\n' "$max"
+}
+
+# Returns the highest modification time out of $CMD_OUT (which is the command output file)
+# and any file(s) named "mvn-*.log" (which are logging files created by Flink's tests)
mod_time () {
- if [[ `uname` == 'Darwin' ]]; then
- eval $(stat -s $CMD_OUT)
- echo $st_mtime
- else
- echo `stat -c "%Y" $CMD_OUT`
- fi
+ CMD_OUT_MOD_TIME=`stat -c "%Y" $CMD_OUT`
+ ADDITIONAL_FILES_MOD_TIMES=`stat -c "%Y" $WATCHDOG_ADDITIONAL_MONITORING_FILES 2> /dev/null`
+ echo `max_of $CMD_OUT_MOD_TIME $ADDITIONAL_FILES_MOD_TIMES`
}
the_time() {