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/01/25 17:27:31 UTC

[GitHub] [flink] gaoyunhaii opened a new pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

gaoyunhaii opened a new pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951
 
 
   ## What is the purpose of the change
   
   When uploading the test detail outputs onto [transfer.sh](https://transfer.sh), occasionally we meet with the error `Could not save metadata`. The error makes the unstable tests might not be able to be located since the test logs are missing.
   
   This PR tries to enable retrying if the uploading fails. It first check that the uploading returns a valid URL and then it checks if the URL is accessible. If either is not, it will retry. The retry will stop if the maximum allowed times is reached.
   
   
   ## Brief change log
   
   - b60b8d03e20dc1c49acc48e69cfc73c6abba100d added retries when uploading fails.
   
   ## Verifying this change
   
     - Manually verified the cases when the upload is successful, the uploading does not return a valid URL and the returned URL is not accessible.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): **no**
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no**
     - The serializers: **no**
     - The runtime per-record code paths (performance sensitive): **no**
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: **no**
     - The S3 file system connector: **no**
   
   ## Documentation
   
     - Does this pull request introduce a new feature? **no**
     - If yes, how is the feature documented? **not applicable**

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578427078
 
 
   <!--
   Meta data
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   -->
   ## CI report:
   
   * b60b8d03e20dc1c49acc48e69cfc73c6abba100d 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


With regards,
Apache Git Services

[GitHub] [flink] KarmaGYZ commented on a change in pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
KarmaGYZ commented on a change in pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#discussion_r370967049
 
 

 ##########
 File path: tools/travis_watchdog.sh
 ##########
 @@ -132,8 +135,23 @@ upload_artifacts_s3() {
 	fi
 
 	# upload to https://transfer.sh
-	echo "Uploading to transfer.sh"
-	curl --upload-file $ARTIFACTS_FILE --max-time 60 https://transfer.sh
+	echo "Uploading to transfer.sh, maximum retries is ${TRANSFER_UPLOAD_MAX_RETRIES}"
+	for i in $(seq 1 ${TRANSFER_UPLOAD_MAX_RETRIES});do
+		url_or_error=$(curl --upload-file $ARTIFACTS_FILE --max-time 60 https://transfer.sh)
+		echo ${url_or_error}
+
+		if grep -q "^http" <<< ${url_or_error};then
+			# Check if the uploaded file can be accessed successfully
+			access_response=$(curl --max-time 60 -o /dev/null -w "%{http_code}" -H "Accept: text/html" ${url_or_error} 2>/dev/null)
+			if [[ "$access_response" = "200" ]];then
+				break
+			fi
+		fi
+
+		if [[ "$i" -lt "$TRANSFER_UPLOAD_MAX_RETRIES" ]];then
+			echo "Failed to upload to transfer.sh and will retry..."
+		fi
+	done
 
 Review comment:
   Does the native "retry" mechanism of `curl` works here?

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578427078
 
 
   <!--
   Meta data
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146066781 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:ffbb60362f7bddb6356b54940793fe14210ecad3 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:ffbb60362f7bddb6356b54940793fe14210ecad3
   -->
   ## CI report:
   
   * b60b8d03e20dc1c49acc48e69cfc73c6abba100d Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146066781) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621) 
   * ffbb60362f7bddb6356b54940793fe14210ecad3 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


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann closed pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
tillrohrmann closed pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578427078
 
 
   <!--
   Meta data
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146066781 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   -->
   ## CI report:
   
   * b60b8d03e20dc1c49acc48e69cfc73c6abba100d Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146066781) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] gaoyunhaii commented on a change in pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#discussion_r370973068
 
 

 ##########
 File path: tools/travis_watchdog.sh
 ##########
 @@ -132,8 +135,23 @@ upload_artifacts_s3() {
 	fi
 
 	# upload to https://transfer.sh
-	echo "Uploading to transfer.sh"
-	curl --upload-file $ARTIFACTS_FILE --max-time 60 https://transfer.sh
+	echo "Uploading to transfer.sh, maximum retries is ${TRANSFER_UPLOAD_MAX_RETRIES}"
+	for i in $(seq 1 ${TRANSFER_UPLOAD_MAX_RETRIES});do
+		url_or_error=$(curl --upload-file $ARTIFACTS_FILE --max-time 60 https://transfer.sh)
+		echo ${url_or_error}
+
+		if grep -q "^http" <<< ${url_or_error};then
+			# Check if the uploaded file can be accessed successfully
+			access_response=$(curl --max-time 60 -o /dev/null -w "%{http_code}" -H "Accept: text/html" ${url_or_error} 2>/dev/null)
+			if [[ "$access_response" = "200" ]];then
+				break
+			fi
+		fi
+
+		if [[ "$i" -lt "$TRANSFER_UPLOAD_MAX_RETRIES" ]];then
+			echo "Failed to upload to transfer.sh and will retry..."
+		fi
+	done
 
 Review comment:
   According to curl's man page, the native retry mechanism should works for response code 4xx or 500 used by transfer.sh (according to [the server's source code](https://github.com/dutchcoders/transfer.sh/blob/2e33f7c7163c9b804e626a5f9ffc0b24b1510ca2/server/handlers.go) and the observation yesterday for failed uploading) , and it will be simpler. Have updated the PR accordingly. Very thanks for the tips. 👍  

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578427078
 
 
   <!--
   Meta data
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146066781 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:ffbb60362f7bddb6356b54940793fe14210ecad3 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4622 TriggerType:PUSH TriggerID:ffbb60362f7bddb6356b54940793fe14210ecad3
   Hash:ffbb60362f7bddb6356b54940793fe14210ecad3 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146088907 TriggerType:PUSH TriggerID:ffbb60362f7bddb6356b54940793fe14210ecad3
   -->
   ## CI report:
   
   * b60b8d03e20dc1c49acc48e69cfc73c6abba100d Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146066781) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621) 
   * ffbb60362f7bddb6356b54940793fe14210ecad3 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146088907) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4622) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578427078
 
 
   <!--
   Meta data
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146066781 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:ffbb60362f7bddb6356b54940793fe14210ecad3 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4622 TriggerType:PUSH TriggerID:ffbb60362f7bddb6356b54940793fe14210ecad3
   Hash:ffbb60362f7bddb6356b54940793fe14210ecad3 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/146088907 TriggerType:PUSH TriggerID:ffbb60362f7bddb6356b54940793fe14210ecad3
   -->
   ## CI report:
   
   * b60b8d03e20dc1c49acc48e69cfc73c6abba100d Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146066781) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621) 
   * ffbb60362f7bddb6356b54940793fe14210ecad3 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/146088907) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4622) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578425382
 
 
   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 b60b8d03e20dc1c49acc48e69cfc73c6abba100d (Sat Jan 25 17:29:38 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578427078
 
 
   <!--
   Meta data
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/146066781 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   -->
   ## CI report:
   
   * b60b8d03e20dc1c49acc48e69cfc73c6abba100d Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/146066781) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10951: [FLINK-15701][Travis] Retries when uploading to transfer.sh fails
URL: https://github.com/apache/flink/pull/10951#issuecomment-578427078
 
 
   <!--
   Meta data
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:b60b8d03e20dc1c49acc48e69cfc73c6abba100d Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146066781 TriggerType:PUSH TriggerID:b60b8d03e20dc1c49acc48e69cfc73c6abba100d
   Hash:ffbb60362f7bddb6356b54940793fe14210ecad3 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4622 TriggerType:PUSH TriggerID:ffbb60362f7bddb6356b54940793fe14210ecad3
   Hash:ffbb60362f7bddb6356b54940793fe14210ecad3 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146088907 TriggerType:PUSH TriggerID:ffbb60362f7bddb6356b54940793fe14210ecad3
   -->
   ## CI report:
   
   * b60b8d03e20dc1c49acc48e69cfc73c6abba100d Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146066781) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4621) 
   * ffbb60362f7bddb6356b54940793fe14210ecad3 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146088907) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4622) 
   
   <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


With regards,
Apache Git Services