Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0, 1.2.1
    • Component/s: Documentation
    • Labels:
      None

      Issue Links

        Activity

        Hide
        plucas Patrick Lucas added a comment -

        I've actually run into quite a few broken links in the docs in the past few days. For example, there are a number of links to /dev/api_concepts which are missing .html. (In the repo, run [1])

        In many of the pages are tables, encoded in the markdown files as raw HTML, which have many broken links as well (eg. here, though here usually because they are hard-coded to start with `/` instead of prefixing `{{ site.baseurl }}` like the non-HTML links.

        I think I might put together a script to try to find broken links in the docs, as there seem to be many of them.

        [1]

        git grep -e api_concepts[^\\.]

        P.S. I'll give a dollar to anyone who can tell me how to put that git grep snippet on the same line as other text in JIRA...

        Show
        plucas Patrick Lucas added a comment - I've actually run into quite a few broken links in the docs in the past few days. For example, there are a number of links to /dev/api_concepts which are missing .html . (In the repo, run [1]) In many of the pages are tables, encoded in the markdown files as raw HTML, which have many broken links as well (eg. here , though here usually because they are hard-coded to start with `/` instead of prefixing `{{ site.baseurl }}` like the non-HTML links. I think I might put together a script to try to find broken links in the docs, as there seem to be many of them. [1] git grep -e api_concepts[^\\.] P.S. I'll give a dollar to anyone who can tell me how to put that git grep snippet on the same line as other text in JIRA...
        Hide
        plucas Patrick Lucas added a comment -

        I've identified the links as these using wget. It doesn't give the page they were found on (web crawling, pool of URLs and all that) but it's pretty easy to grep for them:

        http://localhost/flink-docs/dev/api_concepts
        http://localhost/flink-docs/dev/execution_configuration
        http://localhost/flink-docs/internals/state_backends.html
        http://localhost/flink-docs/dev/parallel
        http://localhost/flink-docs/dev/restart_strategies
        http://localhost/flink-docs/dev/state.html
        http://localhost/flink-docs/dev/stream/state
        http://localhost/flink-docs/quickstart/run_example_quickstart
        http://localhost/dev/api_concepts
        http://localhost/dev/batch/index.html
        http://localhost/flink-docs/quickstart/scala_api_quickstart
        http://localhost/flink-docs/dev/datastream_api
        http://localhost/flink-docs/quickstart/java_api_quickstart
        http://localhost/flink-docs/setup/flink_on_windows
        http://localhost/flink-docs/dev/custom_serializers
        http://localhost/flink-docs/setup/config
        http://localhost/flink-docs/api/java/org/apache/flink/table/api/Table.html
        http://localhost/flink-docs/dev/state
        
        Show
        plucas Patrick Lucas added a comment - I've identified the links as these using wget. It doesn't give the page they were found on (web crawling, pool of URLs and all that) but it's pretty easy to grep for them: http://localhost/flink-docs/dev/api_concepts http://localhost/flink-docs/dev/execution_configuration http://localhost/flink-docs/internals/state_backends.html http://localhost/flink-docs/dev/parallel http://localhost/flink-docs/dev/restart_strategies http://localhost/flink-docs/dev/state.html http://localhost/flink-docs/dev/stream/state http://localhost/flink-docs/quickstart/run_example_quickstart http://localhost/dev/api_concepts http://localhost/dev/batch/index.html http://localhost/flink-docs/quickstart/scala_api_quickstart http://localhost/flink-docs/dev/datastream_api http://localhost/flink-docs/quickstart/java_api_quickstart http://localhost/flink-docs/setup/flink_on_windows http://localhost/flink-docs/dev/custom_serializers http://localhost/flink-docs/setup/config http://localhost/flink-docs/api/java/org/apache/flink/table/api/Table.html http://localhost/flink-docs/dev/state
        Hide
        plucas Patrick Lucas added a comment -

        Down to 15 now:

        http://localhost/flink-docs/dev/stream/checkpointing
        http://localhost/flink-docs/dev/api_concepts
        http://localhost/flink-docs/dev/execution_configuration
        http://localhost/flink-docs/dev/parallel
        http://localhost/flink-docs/dev/restart_strategies
        http://localhost/flink-docs/dev/stream/state
        http://localhost/flink-docs/quickstart/run_example_quickstart
        http://localhost/dev/api_concepts
        http://localhost/dev/batch/index.html
        http://localhost/flink-docs/quickstart/scala_api_quickstart
        http://localhost/flink-docs/dev/datastream_api
        http://localhost/flink-docs/quickstart/java_api_quickstart
        http://localhost/flink-docs/dev/custom_serializers
        http://localhost/flink-docs/setup/config
        http://localhost/flink-docs/api/java/org/apache/flink/table/api/Table.html
        
        Show
        plucas Patrick Lucas added a comment - Down to 15 now: http://localhost/flink-docs/dev/stream/checkpointing http://localhost/flink-docs/dev/api_concepts http://localhost/flink-docs/dev/execution_configuration http://localhost/flink-docs/dev/parallel http://localhost/flink-docs/dev/restart_strategies http://localhost/flink-docs/dev/stream/state http://localhost/flink-docs/quickstart/run_example_quickstart http://localhost/dev/api_concepts http://localhost/dev/batch/index.html http://localhost/flink-docs/quickstart/scala_api_quickstart http://localhost/flink-docs/dev/datastream_api http://localhost/flink-docs/quickstart/java_api_quickstart http://localhost/flink-docs/dev/custom_serializers http://localhost/flink-docs/setup/config http://localhost/flink-docs/api/java/org/apache/flink/table/api/Table.html
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user patricklucas opened a pull request:

        https://github.com/apache/flink/pull/3329

        FLINK-5751 Fix some broken links in docs

        I used a wget-based script to identify broken links then manually searched and corrected as many as I found.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/patricklucas/flink FLINK-5751_fix_doc_404s

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/flink/pull/3329.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #3329


        commit 90431e9977bb616bbdb5fc0511667ee069ad1c5d
        Author: Patrick Lucas <me@patricklucas.com>
        Date: 2017-02-16T01:14:43Z

        FLINK-5751 Fix some broken links in docs


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user patricklucas opened a pull request: https://github.com/apache/flink/pull/3329 FLINK-5751 Fix some broken links in docs I used a wget-based script to identify broken links then manually searched and corrected as many as I found. You can merge this pull request into a Git repository by running: $ git pull https://github.com/patricklucas/flink FLINK-5751 _fix_doc_404s Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3329.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3329 commit 90431e9977bb616bbdb5fc0511667ee069ad1c5d Author: Patrick Lucas <me@patricklucas.com> Date: 2017-02-16T01:14:43Z FLINK-5751 Fix some broken links in docs
        Hide
        plucas Patrick Lucas added a comment -

        Opened a PR fixing as many broken links as I could find using this method.

        The script I used:

        #!/bin/bash -x
        # Don't abort on any non-zero exit code
        #set +e
        
        # Crawl the docs, ignoring robots.txt, storing nothing locally
        wget --spider -r -nd -nv -e robots=off -p -o spider.log http://localhost/flink-docs
        
        # Abort for anything other than 0 and 4 ("Network failure")
        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 link' spider.log)
        echo -e "\e[1;31m$broken_links_str\e[0m"
        if [ -n "$broken_links_str" ]; then
            exit 1
        fi
        
        Show
        plucas Patrick Lucas added a comment - Opened a PR fixing as many broken links as I could find using this method. The script I used: #!/bin/bash -x # Don't abort on any non-zero exit code #set +e # Crawl the docs, ignoring robots.txt, storing nothing locally wget --spider -r -nd -nv -e robots=off -p -o spider.log http: //localhost/flink-docs # Abort for anything other than 0 and 4 ( "Network failure" ) 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 link' spider.log) echo -e "\e[1;31m$broken_links_str\e[0m" if [ -n "$broken_links_str" ]; then exit 1 fi
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/flink/pull/3329

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3329
        Hide
        uce Ufuk Celebi added a comment -

        67e3d9d (release-1.2), 67e3d9d (master).

        Show
        uce Ufuk Celebi added a comment - 67e3d9d (release-1.2), 67e3d9d (master).
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user uce opened a pull request:

        https://github.com/apache/flink/pull/3332

        FLINK-5751 [docs] Add link check script

        This is a slightly adjusted script from @patricklucas as posted in FLINK-5751.

        I was wondering whether it makes sense to have it inside the repo, the local work flow would be:
        ```sh
        ./build_docs.sh -p
        ./check_links.sh
        ```

        You can overwrite the URL to check like `./check_links.sh https://ci.apache.org/projects/flink/flink-docs-master/`.

        @rmetzger @patricklucas Should we include this?

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/uce/flink check_links

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/flink/pull/3332.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #3332


        commit 50a879d8d18d009787fb6c67d78e0e5b79e010a9
        Author: Ufuk Celebi <uce@apache.org>
        Date: 2017-02-16T10:58:35Z

        FLINK-5751 [docs] Add link check script


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user uce opened a pull request: https://github.com/apache/flink/pull/3332 FLINK-5751 [docs] Add link check script This is a slightly adjusted script from @patricklucas as posted in FLINK-5751 . I was wondering whether it makes sense to have it inside the repo, the local work flow would be: ```sh ./build_docs.sh -p ./check_links.sh ``` You can overwrite the URL to check like `./check_links.sh https://ci.apache.org/projects/flink/flink-docs-master/ `. @rmetzger @patricklucas Should we include this? You can merge this pull request into a Git repository by running: $ git pull https://github.com/uce/flink check_links Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3332.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3332 commit 50a879d8d18d009787fb6c67d78e0e5b79e010a9 Author: Ufuk Celebi <uce@apache.org> Date: 2017-02-16T10:58:35Z FLINK-5751 [docs] Add link check script
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user patricklucas commented on a diff in the pull request:

        https://github.com/apache/flink/pull/3332#discussion_r101678241

        — Diff: docs/check_links.sh —
        @@ -0,0 +1,39 @@
        +#!/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.
        +################################################################################
        +
        +# Don't abort on any non-zero exit code
        +#set +e
        +
        +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
        — End diff –

        $target in quotes

        Show
        githubbot ASF GitHub Bot added a comment - Github user patricklucas commented on a diff in the pull request: https://github.com/apache/flink/pull/3332#discussion_r101678241 — Diff: docs/check_links.sh — @@ -0,0 +1,39 @@ +#!/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. +################################################################################ + +# Don't abort on any non-zero exit code +#set +e + +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 — End diff – $target in quotes
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user patricklucas commented on a diff in the pull request:

        https://github.com/apache/flink/pull/3332#discussion_r101678217

        — Diff: docs/check_links.sh —
        @@ -0,0 +1,39 @@
        +#!/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.
        +################################################################################
        +
        +# Don't abort on any non-zero exit code
        +#set +e
        — End diff –

        This is a vestige from me writing this as a Jenkins jobs; you can remove this line and the above comment.

        Show
        githubbot ASF GitHub Bot added a comment - Github user patricklucas commented on a diff in the pull request: https://github.com/apache/flink/pull/3332#discussion_r101678217 — Diff: docs/check_links.sh — @@ -0,0 +1,39 @@ +#!/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. +################################################################################ + +# Don't abort on any non-zero exit code +#set +e — End diff – This is a vestige from me writing this as a Jenkins jobs; you can remove this line and the above comment.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user patricklucas commented on a diff in the pull request:

        https://github.com/apache/flink/pull/3332#discussion_r101678631

        — Diff: docs/check_links.sh —
        @@ -0,0 +1,39 @@
        +#!/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.
        +################################################################################
        +
        +# Don't abort on any non-zero exit code
        +#set +e
        +
        +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
        +
        +# Abort for anything other than 0 and 4 ("Network failure")
        +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 link' spider.log)
        +echo -e "$broken_links_str"
        — End diff –

        If you're going to get rid of my pretty bold-red formatting you can drop the `-e` too.

        Actually, might as well put the `echo` line inside the `if` too.

        Show
        githubbot ASF GitHub Bot added a comment - Github user patricklucas commented on a diff in the pull request: https://github.com/apache/flink/pull/3332#discussion_r101678631 — Diff: docs/check_links.sh — @@ -0,0 +1,39 @@ +#!/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. +################################################################################ + +# Don't abort on any non-zero exit code +#set +e + +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 + +# Abort for anything other than 0 and 4 ("Network failure") +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 link' spider.log) +echo -e "$broken_links_str" — End diff – If you're going to get rid of my pretty bold-red formatting you can drop the `-e` too. Actually, might as well put the `echo` line inside the `if` too.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user uce commented on the issue:

        https://github.com/apache/flink/pull/3332

        Thanks @patricklucas, I've addressed your comments and re-added the red formatting, which is nice indeed. I'm going to merge this with you as the author. Hope that's fine.

        Show
        githubbot ASF GitHub Bot added a comment - Github user uce commented on the issue: https://github.com/apache/flink/pull/3332 Thanks @patricklucas, I've addressed your comments and re-added the red formatting, which is nice indeed. I'm going to merge this with you as the author. Hope that's fine.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/flink/pull/3332

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3332
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user patricklucas commented on the issue:

        https://github.com/apache/flink/pull/3332

        :+1:

        Show
        githubbot ASF GitHub Bot added a comment - Github user patricklucas commented on the issue: https://github.com/apache/flink/pull/3332 :+1:
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user patricklucas commented on a diff in the pull request:

        https://github.com/apache/flink/pull/3332#discussion_r101786279

        — Diff: docs/check_links.sh —
        @@ -0,0 +1,36 @@
        +#!/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.
        +################################################################################
        +
        +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"
        +
        +# Abort for anything other than 0 and 4 ("Network failure")
        +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 link(s)' spider.log)
        +if [ -n "$broken_links_str" ]; then
        + echo -e "\e[1;31m$broken_links_str\e[0m"
        — End diff –

        Mixed tabs/spaces in this file if you want to do a no-review follow-up commit.

        Show
        githubbot ASF GitHub Bot added a comment - Github user patricklucas commented on a diff in the pull request: https://github.com/apache/flink/pull/3332#discussion_r101786279 — Diff: docs/check_links.sh — @@ -0,0 +1,36 @@ +#!/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. +################################################################################ + +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" + +# Abort for anything other than 0 and 4 ("Network failure") +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 link(s)' spider.log) +if [ -n "$broken_links_str" ]; then + echo -e "\e[1;31m$broken_links_str\e[0m" — End diff – Mixed tabs/spaces in this file if you want to do a no-review follow-up commit.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user uce commented on a diff in the pull request:

        https://github.com/apache/flink/pull/3332#discussion_r101801834

        — Diff: docs/check_links.sh —
        @@ -0,0 +1,36 @@
        +#!/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.
        +################################################################################
        +
        +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"
        +
        +# Abort for anything other than 0 and 4 ("Network failure")
        +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 link(s)' spider.log)
        +if [ -n "$broken_links_str" ]; then
        + echo -e "\e[1;31m$broken_links_str\e[0m"
        — End diff –

        Thanks for catching this! Fixed in a separate commit.

        Show
        githubbot ASF GitHub Bot added a comment - Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/3332#discussion_r101801834 — Diff: docs/check_links.sh — @@ -0,0 +1,36 @@ +#!/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. +################################################################################ + +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" + +# Abort for anything other than 0 and 4 ("Network failure") +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 link(s)' spider.log) +if [ -n "$broken_links_str" ]; then + echo -e "\e[1;31m$broken_links_str\e[0m" — End diff – Thanks for catching this! Fixed in a separate commit.

          People

          • Assignee:
            Unassigned
            Reporter:
            colinbreame Colin Breame
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development