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/12/15 13:04:29 UTC

[GitHub] [flink] rmetzger opened a new pull request #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   
   ## What is the purpose of the change
   
   This PR is an extension of https://github.com/apache/flink/pull/14204. I'm building the full docs (en, zh) now, and then run the dead link checker. 
   This should lead to broader test coverage.
   
   
   ## Verifying this change
   
   Broken docs: https://dev.azure.com/rmetzger/Flink/_build/results?buildId=8753&view=logs&j=c5d67f7d-375d-5407-4743-f9d0c4436a81&t=38411795-40c9-51fa-10b0-bd083cf9f5a5
   Stable docs: https://dev.azure.com/rmetzger/Flink/_build/results?buildId=8751&view=logs&s=ae4f8708-9994-57d3-c2d7-b892156e7812&j=c5d67f7d-375d-5407-4743-f9d0c4436a81
   
   


----------------------------------------------------------------
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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f224f37ec212b01faa14ba44d3005a35770ac98f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895) 
   
   <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 pull request #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   /vote "Would you consider @rmetzger lazy, because he takes over other people's PRs without reviewing them" "yes" "no"
   
   I'm sorry.


----------------------------------------------------------------
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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f224f37ec212b01faa14ba44d3005a35770ac98f 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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f224f37ec212b01faa14ba44d3005a35770ac98f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895) 
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898) 
   
   <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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8a24b2bf34ced58508197f1934feb5e0b82fdae4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8a24b2bf34ced58508197f1934feb5e0b82fdae4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4885a242a0ff5077a07bd7be9c0f1a3eade3ae06",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4885a242a0ff5077a07bd7be9c0f1a3eade3ae06",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898) 
   * 367f677226c3091e2aded53c3635dd4f9f18d016 UNKNOWN
   * 8a24b2bf34ced58508197f1934feb5e0b82fdae4 UNKNOWN
   * 4885a242a0ff5077a07bd7be9c0f1a3eade3ae06 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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8a24b2bf34ced58508197f1934feb5e0b82fdae4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10926",
       "triggerID" : "8a24b2bf34ced58508197f1934feb5e0b82fdae4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4885a242a0ff5077a07bd7be9c0f1a3eade3ae06",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10923",
       "triggerID" : "4885a242a0ff5077a07bd7be9c0f1a3eade3ae06",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898) 
   * 367f677226c3091e2aded53c3635dd4f9f18d016 UNKNOWN
   * 8a24b2bf34ced58508197f1934feb5e0b82fdae4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10926) 
   * 4885a242a0ff5077a07bd7be9c0f1a3eade3ae06 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10923) 
   
   <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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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



##########
File path: docs/check_links.sh
##########
@@ -17,23 +17,36 @@
 # limitations under the License.
 ################################################################################
 
+DOCS_CHECK_DIR="`dirname \"$0\"`" # relative
+DOCS_CHECK_DIR="`( cd \"$DOCS_CHECK_DIR\" && pwd -P)`" # absolutized and normalized
+if [ -z "$DOCS_CHECK_DIR" ] ; then
+    # error; for some reason, the path is not accessible
+    # to the script (e.g. permissions re-evaled after suid)
+    exit 1  # fail
+fi
+
+echo "Check docs directory: $DOCS_CHECK_DIR"
+
 target=${1:-"http://localhost:4000"}
 
 # Crawl the docs, ignoring robots.txt, storing nothing locally
-wget --spider -r -nd -nv -e robots=off -p -o spider.log "$target"
+wget --spider -r -nd -nv -e robots=off -p -o $DOCS_CHECK_DIR/spider.log "$target"
 
 # Abort for anything other than 0 and 4 ("Network failure")
 status=$?
+echo "status = $status"
 if [ $status -ne 0 ] && [ $status -ne 4 ]; then
     exit $status
 fi
 
 # Fail the build if any broken links are found
-broken_links_str=$(grep -e 'Found [[:digit:]]\+ broken links' spider.log)
-if [ -n "$broken_links_str" ]; then
-    grep -B 1 "Remote file does not exist -- broken link!!!" spider.log
+broken_links_str=$(grep 'Found no broken links' $DOCS_CHECK_DIR/spider.log | wc -l)

Review comment:
       variable name no longer makes sense

##########
File path: tools/azure-pipelines/build-apache-repo.yml
##########
@@ -68,6 +68,35 @@ stages:
           run_end_to_end: false
           container: flink-build-container
           jdk: jdk8
+      - job: docs_404_check # run on a MSFT provided machine
+        pool:
+          vmImage: 'ubuntu-16.04'
+        steps:
+          # Skip docs check if this is a pull request doesn't contain documentation change
+          - bash: |
+              source ./tools/azure-pipelines/build_properties.sh
+              contains_docs_pullrequest
+              if [[ "$?" == 0 ]] ; then
+                echo "##[debug]This is a pull request doesn't contain documentation. Skipping docs check."

Review comment:
       ```suggestion
                   echo "##[debug]This pull request doesn't contain documentation. Skipping docs check."
   ```

##########
File path: tools/azure-pipelines/build_properties.sh
##########
@@ -40,16 +36,47 @@ function is_docs_only_pullrequest() {
 	if [[ "$GITHUB_PULL_HEAD_SHA" != "$THIS_BRANCH_SHA" ]] ; then
 		echo "INFO: SHA mismatch: GITHUB_PULL_HEAD_SHA=$GITHUB_PULL_HEAD_SHA != THIS_BRANCH_SHA=$THIS_BRANCH_SHA";
 		# sha mismatch. There's some timing issue, and we can't trust the result
-		return 1
+		return 0
 	fi
 
 	# 3. Get number of commits in PR
 	GITHUB_NUM_COMMITS=`echo $GITHUB_PULL_DETAIL | jq -r ".commits"`
 
+	return $GITHUB_NUM_COMMITS
+}
+
+#
+# Returns 0 if the change is a documentation-only pull request
+#
+function is_docs_only_pullrequest() {
+  github_num_commits
+  GITHUB_NUM_COMMITS=$?
+  if [[ $GITHUB_NUM_COMMITS == 0 ]]; then
+    return 1
+  fi
+
 	if [[ $(git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS | grep -v "docs/") == "" ]] ; then
 		echo "INFO: This is a docs only change. Changed files:"
 		git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS
 		return 0
 	fi
 	return 1
 }
+
+#
+# Returns 1 if the change contains documentation pull request

Review comment:
       ```suggestion
   # Returns 1 if the PR contains documentation changes
   ```

##########
File path: tools/azure-pipelines/build_properties.sh
##########
@@ -40,16 +36,47 @@ function is_docs_only_pullrequest() {
 	if [[ "$GITHUB_PULL_HEAD_SHA" != "$THIS_BRANCH_SHA" ]] ; then
 		echo "INFO: SHA mismatch: GITHUB_PULL_HEAD_SHA=$GITHUB_PULL_HEAD_SHA != THIS_BRANCH_SHA=$THIS_BRANCH_SHA";
 		# sha mismatch. There's some timing issue, and we can't trust the result
-		return 1
+		return 0
 	fi
 
 	# 3. Get number of commits in PR
 	GITHUB_NUM_COMMITS=`echo $GITHUB_PULL_DETAIL | jq -r ".commits"`
 
+	return $GITHUB_NUM_COMMITS
+}
+
+#
+# Returns 0 if the change is a documentation-only pull request
+#
+function is_docs_only_pullrequest() {
+  github_num_commits
+  GITHUB_NUM_COMMITS=$?
+  if [[ $GITHUB_NUM_COMMITS == 0 ]]; then
+    return 1
+  fi
+
 	if [[ $(git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS | grep -v "docs/") == "" ]] ; then
 		echo "INFO: This is a docs only change. Changed files:"
 		git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS
 		return 0
 	fi
 	return 1
 }
+
+#
+# Returns 1 if the change contains documentation pull request
+#
+function contains_docs_pullrequest() {
+  github_num_commits
+  GITHUB_NUM_COMMITS=$?
+  if [[ $GITHUB_NUM_COMMITS == 0 ]]; then
+    return 0
+  fi
+
+	if [[ $(git diff --name-only HEAD..HEAD~"$GITHUB_NUM_COMMITS" | grep "docs/") != "" ]] ; then
+		echo "INFO: This is a change contains docs. Changed files:"

Review comment:
       ```suggestion
   		echo "INFO: This PR contains changes to the documentation. Changed files:"
   ```
   😆 😆 😆 

##########
File path: tools/azure-pipelines/build-apache-repo.yml
##########
@@ -68,6 +68,35 @@ stages:
           run_end_to_end: false
           container: flink-build-container
           jdk: jdk8
+      - job: docs_404_check # run on a MSFT provided machine
+        pool:
+          vmImage: 'ubuntu-16.04'
+        steps:
+          # Skip docs check if this is a pull request doesn't contain documentation change
+          - bash: |
+              source ./tools/azure-pipelines/build_properties.sh
+              contains_docs_pullrequest
+              if [[ "$?" == 0 ]] ; then
+                echo "##[debug]This is a pull request doesn't contain documentation. Skipping docs check."
+                echo "##vso[task.setvariable variable=skip;]1"
+              else
+                echo "##[debug]This is a regular CI build. Continuing ..."

Review comment:
       ```suggestion
   ```
   I'd think this just adds confusion.

##########
File path: tools/azure-pipelines/build_properties.sh
##########
@@ -40,16 +36,47 @@ function is_docs_only_pullrequest() {
 	if [[ "$GITHUB_PULL_HEAD_SHA" != "$THIS_BRANCH_SHA" ]] ; then
 		echo "INFO: SHA mismatch: GITHUB_PULL_HEAD_SHA=$GITHUB_PULL_HEAD_SHA != THIS_BRANCH_SHA=$THIS_BRANCH_SHA";
 		# sha mismatch. There's some timing issue, and we can't trust the result
-		return 1
+		return 0
 	fi
 
 	# 3. Get number of commits in PR
 	GITHUB_NUM_COMMITS=`echo $GITHUB_PULL_DETAIL | jq -r ".commits"`
 
+	return $GITHUB_NUM_COMMITS
+}
+
+#
+# Returns 0 if the change is a documentation-only pull request
+#
+function is_docs_only_pullrequest() {
+  github_num_commits
+  GITHUB_NUM_COMMITS=$?
+  if [[ $GITHUB_NUM_COMMITS == 0 ]]; then
+    return 1
+  fi
+
 	if [[ $(git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS | grep -v "docs/") == "" ]] ; then
 		echo "INFO: This is a docs only change. Changed files:"
 		git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS
 		return 0
 	fi
 	return 1
 }
+
+#
+# Returns 1 if the change contains documentation pull request
+#
+function contains_docs_pullrequest() {

Review comment:
       ```suggestion
   function pr_contains_docs_changes() {
   ```




----------------------------------------------------------------
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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f224f37ec212b01faa14ba44d3005a35770ac98f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895) 
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b 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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f224f37ec212b01faa14ba44d3005a35770ac98f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895) 
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898) 
   
   <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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8a24b2bf34ced58508197f1934feb5e0b82fdae4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8a24b2bf34ced58508197f1934feb5e0b82fdae4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898) 
   * 367f677226c3091e2aded53c3635dd4f9f18d016 UNKNOWN
   * 8a24b2bf34ced58508197f1934feb5e0b82fdae4 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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898) 
   
   <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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   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 f224f37ec212b01faa14ba44d3005a35770ac98f (Tue Dec 15 13:06:18 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] rmetzger closed pull request #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   


----------------------------------------------------------------
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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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



##########
File path: tools/azure-pipelines/build-apache-repo.yml
##########
@@ -68,6 +68,35 @@ stages:
           run_end_to_end: false
           container: flink-build-container
           jdk: jdk8
+      - job: docs_404_check # run on a MSFT provided machine
+        pool:
+          vmImage: 'ubuntu-16.04'
+        steps:
+          # Skip docs check if this is a pull request doesn't contain documentation change
+          - bash: |
+              source ./tools/azure-pipelines/build_properties.sh
+              contains_docs_pullrequest
+              if [[ "$?" == 0 ]] ; then
+                echo "##[debug]This is a pull request doesn't contain documentation. Skipping docs check."
+                echo "##vso[task.setvariable variable=skip;]1"
+              else
+                echo "##[debug]This is a regular CI build. Continuing ..."

Review comment:
       I rephrased both messages. Since this is scoped to the docs_404_check / "Check if PR contains docs change", it will be clear what's going on. It won't confuse people checking the regular build output, because it won't show there.
   




----------------------------------------------------------------
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 #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10895",
       "triggerID" : "f224f37ec212b01faa14ba44d3005a35770ac98f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898",
       "triggerID" : "dcf8df64f76cb4839fd5c1d54805ad307b96914b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "367f677226c3091e2aded53c3635dd4f9f18d016",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dcf8df64f76cb4839fd5c1d54805ad307b96914b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10898) 
   * 367f677226c3091e2aded53c3635dd4f9f18d016 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] jbampton commented on a change in pull request #14391: [FLINK-20325][build] Move docs_404_check to CI stage

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



##########
File path: tools/azure-pipelines/build_properties.sh
##########
@@ -40,16 +36,47 @@ function is_docs_only_pullrequest() {
 	if [[ "$GITHUB_PULL_HEAD_SHA" != "$THIS_BRANCH_SHA" ]] ; then
 		echo "INFO: SHA mismatch: GITHUB_PULL_HEAD_SHA=$GITHUB_PULL_HEAD_SHA != THIS_BRANCH_SHA=$THIS_BRANCH_SHA";
 		# sha mismatch. There's some timing issue, and we can't trust the result
-		return 1
+		return 0
 	fi
 
 	# 3. Get number of commits in PR
 	GITHUB_NUM_COMMITS=`echo $GITHUB_PULL_DETAIL | jq -r ".commits"`
 
+	return $GITHUB_NUM_COMMITS
+}
+
+#
+# Returns 0 if the change is a documentation-only pull request
+#
+function is_docs_only_pullrequest() {
+  github_num_commits
+  GITHUB_NUM_COMMITS=$?
+  if [[ $GITHUB_NUM_COMMITS == 0 ]]; then
+    return 1
+  fi
+
 	if [[ $(git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS | grep -v "docs/") == "" ]] ; then
 		echo "INFO: This is a docs only change. Changed files:"
 		git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS
 		return 0
 	fi
 	return 1
 }
+
+#
+# Returns 1 if the change contains documentation pull request
+#
+function contains_docs_pullrequest() {
+  github_num_commits
+  GITHUB_NUM_COMMITS=$?
+  if [[ $GITHUB_NUM_COMMITS == 0 ]]; then
+    return 0
+  fi
+
+	if [[ $(git diff --name-only HEAD..HEAD~"$GITHUB_NUM_COMMITS" | grep "docs/") != "" ]] ; then
+		echo "INFO: This is a change contains docs. Changed files:"
+		git diff --name-only HEAD..HEAD~"$GITHUB_NUM_COMMITS"
+		return 1
+	fi
+	return 0
+}

Review comment:
       ```suggestion
   }
   
   ```




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