You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/15 18:08:01 UTC

[GitHub] [flink] rmetzger opened a new pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

rmetzger opened a new pull request #13655:
URL: https://github.com/apache/flink/pull/13655


   
   
   ## What is the purpose of the change
   
   Due to a bug in azure pipelines, we can not see the e2e output when a run times out.
   This pull is to add some tooling for rescuing the logs before it's too late
   
   
   
   ## Verifying this change
   
   I've tested it here: https://dev.azure.com/rmetzger/Flink/_build/results?buildId=8473&view=artifacts&type=publishedArtifacts
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13655:
URL: https://github.com/apache/flink/pull/13655#issuecomment-709507897


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "117ce2ec3498d6c699063c94aa9eaca3b739c163",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7704",
       "triggerID" : "117ce2ec3498d6c699063c94aa9eaca3b739c163",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 117ce2ec3498d6c699063c94aa9eaca3b739c163 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7704) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #13655:
URL: https://github.com/apache/flink/pull/13655#discussion_r507598580



##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)
+	sleep $SLEEP_TIME
+	echo "=========================================================================================="
+	echo "=== WARNING: This E2E Run took already 80% of the allocated time budget of $DEFINED_TIMEOUT_MINUTES minutes ==="
+	echo "=========================================================================================="
+}
+
+function log_upload_watchdog {
+	SLEEP_TIME=$(($DEFINED_TIMEOUT_SECONDS-$START_LOG_UPLOAD_SECONDS_FROM_END))
+	sleep $SLEEP_TIME
+	echo "======================================================================================================="
+	echo "=== WARNING: This E2E Run will be killed in the next few minutes. Starting to upload the log output ==="
+	echo "======================================================================================================="
+
+	INDEX=0
+	while true; do
+		cp $OUTPUT_FILE "$OUTPUT_FILE.$INDEX"
+		echo "##vso[artifact.upload containerfolder=e2e-timeout-logs;artifactname=log_upload_watchdog.output;]$OUTPUT_FILE.$INDEX"
+		INDEX=$(($INDEX+1))
+		sleep 300
+	done
+}
+
+warning_watchdog &
+log_upload_watchdog &
+
+# ts from moreutils prepends the time to each line
+( $COMMAND & PID=$! ; wait $PID ) | ts | tee $OUTPUT_FILE

Review comment:
       I see, makes sense 👍 
   
   Can we not define per-stage timeouts?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rmetzger commented on a change in pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
rmetzger commented on a change in pull request #13655:
URL: https://github.com/apache/flink/pull/13655#discussion_r507670913



##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)
+	sleep $SLEEP_TIME
+	echo "=========================================================================================="
+	echo "=== WARNING: This E2E Run took already 80% of the allocated time budget of $DEFINED_TIMEOUT_MINUTES minutes ==="
+	echo "=========================================================================================="
+}
+
+function log_upload_watchdog {
+	SLEEP_TIME=$(($DEFINED_TIMEOUT_SECONDS-$START_LOG_UPLOAD_SECONDS_FROM_END))
+	sleep $SLEEP_TIME
+	echo "======================================================================================================="
+	echo "=== WARNING: This E2E Run will be killed in the next few minutes. Starting to upload the log output ==="
+	echo "======================================================================================================="
+
+	INDEX=0
+	while true; do
+		cp $OUTPUT_FILE "$OUTPUT_FILE.$INDEX"
+		echo "##vso[artifact.upload containerfolder=e2e-timeout-logs;artifactname=log_upload_watchdog.output;]$OUTPUT_FILE.$INDEX"
+		INDEX=$(($INDEX+1))
+		sleep 300
+	done
+}
+
+warning_watchdog &
+log_upload_watchdog &
+
+# ts from moreutils prepends the time to each line
+( $COMMAND & PID=$! ; wait $PID ) | ts | tee $OUTPUT_FILE

Review comment:
       We actually can. Let me investigate. I still won't introduce a hard kill, but it would make the behavior of the upload more accurate.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #13655:
URL: https://github.com/apache/flink/pull/13655#discussion_r506151116



##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)
+	sleep $SLEEP_TIME
+	echo "=========================================================================================="
+	echo "=== WARNING: This E2E Run took already 80% of the allocated time budget of $DEFINED_TIMEOUT_MINUTES minutes ==="
+	echo "=========================================================================================="
+}
+
+function log_upload_watchdog {
+	SLEEP_TIME=$(($DEFINED_TIMEOUT_SECONDS-$START_LOG_UPLOAD_SECONDS_FROM_END))
+	sleep $SLEEP_TIME
+	echo "======================================================================================================="
+	echo "=== WARNING: This E2E Run will be killed in the next few minutes. Starting to upload the log output ==="

Review comment:
       with "killed" you mean azure timing out?

##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)
+	sleep $SLEEP_TIME
+	echo "=========================================================================================="
+	echo "=== WARNING: This E2E Run took already 80% of the allocated time budget of $DEFINED_TIMEOUT_MINUTES minutes ==="
+	echo "=========================================================================================="
+}
+
+function log_upload_watchdog {
+	SLEEP_TIME=$(($DEFINED_TIMEOUT_SECONDS-$START_LOG_UPLOAD_SECONDS_FROM_END))
+	sleep $SLEEP_TIME
+	echo "======================================================================================================="
+	echo "=== WARNING: This E2E Run will be killed in the next few minutes. Starting to upload the log output ==="
+	echo "======================================================================================================="
+
+	INDEX=0
+	while true; do
+		cp $OUTPUT_FILE "$OUTPUT_FILE.$INDEX"
+		echo "##vso[artifact.upload containerfolder=e2e-timeout-logs;artifactname=log_upload_watchdog.output;]$OUTPUT_FILE.$INDEX"
+		INDEX=$(($INDEX+1))
+		sleep 300
+	done
+}
+
+warning_watchdog &
+log_upload_watchdog &
+
+# ts from moreutils prepends the time to each line
+( $COMMAND & PID=$! ; wait $PID ) | ts | tee $OUTPUT_FILE

Review comment:
       hmm...could we not actually kill PID after the timeout?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rmetzger commented on a change in pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
rmetzger commented on a change in pull request #13655:
URL: https://github.com/apache/flink/pull/13655#discussion_r506389065



##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)
+	sleep $SLEEP_TIME
+	echo "=========================================================================================="
+	echo "=== WARNING: This E2E Run took already 80% of the allocated time budget of $DEFINED_TIMEOUT_MINUTES minutes ==="
+	echo "=========================================================================================="
+}
+
+function log_upload_watchdog {
+	SLEEP_TIME=$(($DEFINED_TIMEOUT_SECONDS-$START_LOG_UPLOAD_SECONDS_FROM_END))
+	sleep $SLEEP_TIME
+	echo "======================================================================================================="
+	echo "=== WARNING: This E2E Run will be killed in the next few minutes. Starting to upload the log output ==="
+	echo "======================================================================================================="
+
+	INDEX=0
+	while true; do
+		cp $OUTPUT_FILE "$OUTPUT_FILE.$INDEX"
+		echo "##vso[artifact.upload containerfolder=e2e-timeout-logs;artifactname=log_upload_watchdog.output;]$OUTPUT_FILE.$INDEX"
+		INDEX=$(($INDEX+1))
+		sleep 300
+	done
+}
+
+warning_watchdog &
+log_upload_watchdog &
+
+# ts from moreutils prepends the time to each line
+( $COMMAND & PID=$! ; wait $PID ) | ts | tee $OUTPUT_FILE

Review comment:
       I feel uncomfortable killing here, because my whole accounting for when to start uploading the log / showing the warning is somewhat fragile: We start the timeout in the test stage, not in the compile stage, however, the overall timeout is for compile+test.
   Putting a kill here could severely affect the user experience and requires constant adjustment.
   
   What I'm proposing in this PR is a best effort logging solution that we can potentially even disable again once Azure is reliably presenting logs again even in failure cases.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #13655:
URL: https://github.com/apache/flink/pull/13655#discussion_r506150016



##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)

Review comment:
       could you explain the various bits here? Why is the `/1` necessary?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13655:
URL: https://github.com/apache/flink/pull/13655#issuecomment-709507897


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "117ce2ec3498d6c699063c94aa9eaca3b739c163",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7704",
       "triggerID" : "117ce2ec3498d6c699063c94aa9eaca3b739c163",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 117ce2ec3498d6c699063c94aa9eaca3b739c163 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7704) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13655:
URL: https://github.com/apache/flink/pull/13655#issuecomment-709507897


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "117ce2ec3498d6c699063c94aa9eaca3b739c163",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "117ce2ec3498d6c699063c94aa9eaca3b739c163",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 117ce2ec3498d6c699063c94aa9eaca3b739c163 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] leonardBang commented on pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
leonardBang commented on pull request #13655:
URL: https://github.com/apache/flink/pull/13655#issuecomment-709691404


   The e2e test failed by timeout with 280 mins, maybe improving from 240 to 280 is still not enough


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] leonardBang edited a comment on pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
leonardBang edited a comment on pull request #13655:
URL: https://github.com/apache/flink/pull/13655#issuecomment-709691404


   The e2e test failed by timeout with 280 mins, maybe improving from 260 to 280 is still not enough


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rmetzger closed pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
rmetzger closed pull request #13655:
URL: https://github.com/apache/flink/pull/13655


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rmetzger commented on a change in pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
rmetzger commented on a change in pull request #13655:
URL: https://github.com/apache/flink/pull/13655#discussion_r506387208



##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)

Review comment:
       Bash doesn't support floating point math, that's why I use bc.
   doing just "$number/0.8" will return a floating point. The division and scale is for rounding to an integer: https://stackoverflow.com/a/20562313/568695

##########
File path: tools/azure-pipelines/e2e_uploading_watchdog.sh
##########
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# 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.
+
+# This file has the following tasks
+# a) It reads the e2e timeout from the configuration file
+# b) It prints a warning if the test has reached 80% of it's execution time
+# c) N minutes before the end of the execution time, it will start uploading the current output as azure artifacts
+
+COMMAND=$1
+
+HERE="`dirname \"$0\"`"             # relative
+HERE="`( cd \"$HERE\" && pwd )`"    # absolutized and normalized
+if [ -z "$HERE" ] ; then
+	exit 1
+fi
+
+OUTPUT_FILE=/tmp/_e2e_watchdog.output
+# 30 minutes for compile + 5m buffer
+START_LOG_UPLOAD_SECONDS_FROM_END=$((35*60))
+
+DEFINED_TIMEOUT_MINUTES=`cat $HERE/jobs-template.yml | grep "timeoutInMinutes" | tail -n 1 | cut -d ":" -f 2 | tr -d '[:space:]'`
+DEFINED_TIMEOUT_SECONDS=$(($DEFINED_TIMEOUT_MINUTES*60))
+
+echo "Running command '$COMMAND' with a timeout of $DEFINED_TIMEOUT_MINUTES minutes."
+
+function warning_watchdog {
+	SLEEP_TIME=$(echo "scale=0; $DEFINED_TIMEOUT_SECONDS*0.8/1" | bc)
+	sleep $SLEEP_TIME
+	echo "=========================================================================================="
+	echo "=== WARNING: This E2E Run took already 80% of the allocated time budget of $DEFINED_TIMEOUT_MINUTES minutes ==="
+	echo "=========================================================================================="
+}
+
+function log_upload_watchdog {
+	SLEEP_TIME=$(($DEFINED_TIMEOUT_SECONDS-$START_LOG_UPLOAD_SECONDS_FROM_END))
+	sleep $SLEEP_TIME
+	echo "======================================================================================================="
+	echo "=== WARNING: This E2E Run will be killed in the next few minutes. Starting to upload the log output ==="

Review comment:
       You are right. I'll update the wording.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13655: [FLINK-19664][e2e] Upload logs before tests time out

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13655:
URL: https://github.com/apache/flink/pull/13655#issuecomment-709500338


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 117ce2ec3498d6c699063c94aa9eaca3b739c163 (Thu Oct 15 18:09:52 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org