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/04/20 14:32:27 UTC

[GitHub] [flink] rmetzger opened a new pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   ## What is the purpose of the change
   
   Before this change, HA tests were waiting indefinitely for certain conditions to be met.
   This change introduces a timeout in the test scripts that kills the test and prints the Flink logs for debugging.
   
   
   ## Brief change log
   
   - Change the HA watchdogs to store their state in files rather than variables (so that different bash processes can access them)
   - launch HA test and a watchdog that sleeps for 10 minutes. If the test doesn't finish in 10, the watchdog will kill the test.
   


----------------------------------------------------------------
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 #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161065652",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/162165250",
       "triggerID" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=292",
       "triggerID" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a791d09c9e7e494f6f6b177564d83e35a7d03148",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a791d09c9e7e494f6f6b177564d83e35a7d03148",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 963297592d941acfb5ee77e1c495de3efd638a43 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/162165250) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=292) 
   * a791d09c9e7e494f6f6b177564d83e35a7d03148 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] flinkbot edited a comment on pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161065652",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/162165250",
       "triggerID" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=292",
       "triggerID" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a791d09c9e7e494f6f6b177564d83e35a7d03148",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a791d09c9e7e494f6f6b177564d83e35a7d03148",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161065652) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795) 
   * 963297592d941acfb5ee77e1c495de3efd638a43 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/162165250) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=292) 
   * a791d09c9e7e494f6f6b177564d83e35a7d03148 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] flinkbot edited a comment on issue #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161065652",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161065652) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795) 
   
   <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 issue #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8 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] flinkbot commented on issue #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   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 8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8 (Mon Apr 20 14:36:20 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



[GitHub] [flink] flinkbot edited a comment on issue #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161065652",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161065652) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795) 
   
   <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] ifndef-SleePy commented on a change in pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

Posted by GitBox <gi...@apache.org>.
ifndef-SleePy commented on a change in pull request #11831:
URL: https://github.com/apache/flink/pull/11831#discussion_r415576635



##########
File path: flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh
##########
@@ -148,4 +149,23 @@ STATE_BACKEND_TYPE=${1:-file}
 STATE_BACKEND_FILE_ASYNC=${2:-true}
 STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
 
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC} ${STATE_BACKEND_ROCKS_INCREMENTAL}
+function kill_test_watchdog() {
+    local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+    echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+    kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+( 
+    cmdpid=$BASHPID; 
+    (sleep $TEST_TIMEOUT_SECONDS; # set a timeout of 10 minutes for this test
+    echo "Test (pid: $cmdpid) did not finish after $TEST_TIMEOUT_SECONDS seconds."
+    echo "Printing Flink logs and killing it:"
+    cat ${FLINK_DIR}/log/* 
+    kill "$cmdpid") & watchdog_pid=$!

Review comment:
       That's OK for me :)

##########
File path: flink-end-to-end-tests/test-scripts/test_ha_datastream.sh
##########
@@ -100,4 +102,21 @@ STATE_BACKEND_FILE_ASYNC=${2:-true}
 STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
 ZOOKEEPER_VERSION=${4:-3.4}
 
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC} ${STATE_BACKEND_ROCKS_INCREMENTAL} ${ZOOKEEPER_VERSION}
+function kill_test_watchdog() {
+    local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+    echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+    kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+( 
+    cmdpid=$BASHPID; 

Review comment:
       Ah, you are right. It's in another sub-process.
   
   I come up with a work-around way. It probably works that executing the watchdog in original main process and executing the testing scripts in sub-process. We can get the sub-process pid in main process.
   
   But I guess it's not a big deal, as MacOS is not a main scenario. I hope this PR could be merged asap. I would help a lot.




----------------------------------------------------------------
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 pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   Thanks a lot for your review. I rebased to current master and added a comment for the Bash 4+ requirement.


----------------------------------------------------------------
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 #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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



##########
File path: flink-end-to-end-tests/test-scripts/common_ha.sh
##########
@@ -23,10 +23,9 @@ source "${END_TO_END_DIR}"/test-scripts/common.sh
 # flag indicating if we have already cleared up things after a test
 CLEARED=0
 
-JM_WATCHDOG_PID=0

Review comment:
       The `JM_WATCHDOG_PID` is used in the `stop_watchdogs` function, which is called from different bash-processes.
   Because of that, if the variable is set in one process, it's not available in the other one.
   
   That's why I decided to store the PID in a file.




----------------------------------------------------------------
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 #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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



##########
File path: flink-end-to-end-tests/test-scripts/test_ha_datastream.sh
##########
@@ -100,4 +102,21 @@ STATE_BACKEND_FILE_ASYNC=${2:-true}
 STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
 ZOOKEEPER_VERSION=${4:-3.4}
 
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC} ${STATE_BACKEND_ROCKS_INCREMENTAL} ${ZOOKEEPER_VERSION}
+function kill_test_watchdog() {
+    local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+    echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+    kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+( 
+    cmdpid=$BASHPID; 

Review comment:
       Yes, these changes require bash 4. Bash on mac is pretty outdated sadly.
   
   I think `$$` won't work, as it will return the PID of the bash-process, not of the subshell I'm launching there:
   
   > When you want to find out the PID of your current shell session, even from subshells, that’s when you use $$. Any subshell has its own PID as well, and you can access it via the $BASHPID variable.
   
   https://bashwizard.com/shells-subshells-pids/
   
   But I will add a warning to the script, that is requires at least bash 4




----------------------------------------------------------------
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] ifndef-SleePy commented on a change in pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

Posted by GitBox <gi...@apache.org>.
ifndef-SleePy commented on a change in pull request #11831:
URL: https://github.com/apache/flink/pull/11831#discussion_r415003793



##########
File path: flink-end-to-end-tests/test-scripts/common_ha.sh
##########
@@ -23,10 +23,9 @@ source "${END_TO_END_DIR}"/test-scripts/common.sh
 # flag indicating if we have already cleared up things after a test
 CLEARED=0
 
-JM_WATCHDOG_PID=0

Review comment:
       Just a curiosity, what's the reason of this change?

##########
File path: flink-end-to-end-tests/test-scripts/test_ha_datastream.sh
##########
@@ -100,4 +102,21 @@ STATE_BACKEND_FILE_ASYNC=${2:-true}
 STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
 ZOOKEEPER_VERSION=${4:-3.4}
 
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC} ${STATE_BACKEND_ROCKS_INCREMENTAL} ${ZOOKEEPER_VERSION}
+function kill_test_watchdog() {
+    local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+    echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+    kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+( 
+    cmdpid=$BASHPID; 

Review comment:
       `BASHPID` does not work on my Mac. It's introduced in Bash 4, however the version of Bash on my Mac is 3.2. Maybe we could use `$$` when `BASHPID` is not supported? `$$` is more general, however sometimes it does not work well as expected, like executing in background.

##########
File path: flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh
##########
@@ -148,4 +149,23 @@ STATE_BACKEND_TYPE=${1:-file}
 STATE_BACKEND_FILE_ASYNC=${2:-true}
 STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
 
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC} ${STATE_BACKEND_ROCKS_INCREMENTAL}
+function kill_test_watchdog() {
+    local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+    echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+    kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+( 
+    cmdpid=$BASHPID; 
+    (sleep $TEST_TIMEOUT_SECONDS; # set a timeout of 10 minutes for this test
+    echo "Test (pid: $cmdpid) did not finish after $TEST_TIMEOUT_SECONDS seconds."
+    echo "Printing Flink logs and killing it:"
+    cat ${FLINK_DIR}/log/* 
+    kill "$cmdpid") & watchdog_pid=$!

Review comment:
       Another curiosity, is there any magic of inline `watchdog_pid=$!`?




----------------------------------------------------------------
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 pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   Since this error can happen also on travis, we should probably set the timeout to 9 minutes (as Travis has a timeout of 10 minutes)
   


----------------------------------------------------------------
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 pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   Thanks for the review. Let's wait till Azure is green, then I'll merge it.


----------------------------------------------------------------
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 #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161065652",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/162165250",
       "triggerID" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=292",
       "triggerID" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a791d09c9e7e494f6f6b177564d83e35a7d03148",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a791d09c9e7e494f6f6b177564d83e35a7d03148",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 963297592d941acfb5ee77e1c495de3efd638a43 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/162165250) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=292) 
   * a791d09c9e7e494f6f6b177564d83e35a7d03148 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] rmetzger commented on a change in pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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



##########
File path: flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh
##########
@@ -148,4 +149,23 @@ STATE_BACKEND_TYPE=${1:-file}
 STATE_BACKEND_FILE_ASYNC=${2:-true}
 STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
 
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC} ${STATE_BACKEND_ROCKS_INCREMENTAL}
+function kill_test_watchdog() {
+    local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+    echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+    kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+( 
+    cmdpid=$BASHPID; 
+    (sleep $TEST_TIMEOUT_SECONDS; # set a timeout of 10 minutes for this test
+    echo "Test (pid: $cmdpid) did not finish after $TEST_TIMEOUT_SECONDS seconds."
+    echo "Printing Flink logs and killing it:"
+    cat ${FLINK_DIR}/log/* 
+    kill "$cmdpid") & watchdog_pid=$!

Review comment:
       That's a good question. I don't know if this has to be in the same line or not. Probably not.
   It is okay for you, I would not change this, because it would mean that I have to test the scripts again (I manually tested that they are behaving as expected in failure / timeout / success 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] flinkbot edited a comment on pull request #11831: [FLINK-16423][e2e] Introduce timeouts for HA tests

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161065652",
       "triggerID" : "8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "963297592d941acfb5ee77e1c495de3efd638a43",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8c3475f5f7883314d609c4ea126dbf7bd9cc8cc8 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161065652) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7795) 
   * 963297592d941acfb5ee77e1c495de3efd638a43 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