Apache DataFusion SQL Query Engine
ARROW-8133: [CI] Github Actions sometimes fail to checkout Arrow
Krisztián Szűcsbb46854c4b0e
diff --git a/.github/workflows/archery.yml b/.github/workflows/archery.ymlindex 8e60239042..0c3158f396 100644--- a/.github/workflows/archery.yml+++ b/.github/workflows/archery.yml@@ -34,9 +34,12 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Setup Pythonuses: actions/setup-python@v1with:@@ -46,4 +49,4 @@ jobs:run: pip install pytest responses ruamel.yaml -e .- name: Testworking-directory: dev/archery- run: pytest -v archery\ No newline at end of file+ run: pytest -v archerydiff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.ymlindex 58d179b364..e543d828cd 100644--- a/.github/workflows/cpp.yml+++ b/.github/workflows/cpp.yml@@ -39,9 +39,12 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures conda-cpp@@ -74,9 +77,12 @@ jobs:UBUNTU: ${{ matrix.ubuntu }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures ubuntu-cpp-sanitizer@@ -124,9 +130,12 @@ jobs:Protobuf_SOURCE: BUNDLEDsteps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Install Dependenciesshell: bashrun: brew bundle --file=cpp/Brewfile@@ -198,9 +207,12 @@ jobs:- name: Install Dependenciesrun: choco install -y --no-progress openssl boost-msvc-14.1- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/cpp_build.sh $(pwd) $(pwd)/build@@ -256,9 +268,11 @@ jobs:/f- name: Checkout Arrowuses: actions/checkout@v2- - name: Checkout submodules- run: |- git submodule update --init --force --recursive --depth 1+ with:+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Bootstrap MSYS2run: |ci\scripts\msys2_bootstrap.ps1 ${{ matrix.mingw-n-bits }}diff --git a/.github/workflows/cpp_cron.yml b/.github/workflows/cpp_cron.ymlindex e47f1a7f74..74bf4f4758 100644--- a/.github/workflows/cpp_cron.yml+++ b/.github/workflows/cpp_cron.yml@@ -45,9 +45,12 @@ jobs:DEBIAN: ${{ matrix.debian }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures debian-cpp@@ -80,9 +83,12 @@ jobs:FEDORA: ${{ matrix.fedora }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures fedora-cpp@@ -115,9 +121,12 @@ jobs:UBUNTU: ${{ matrix.ubuntu }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures ubuntu-cpp@@ -144,9 +153,12 @@ jobs:UBUNTU: ${{ matrix.ubuntu }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -181,10 +193,12 @@ jobs:ubuntu: [18.04]steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- path: arrow- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Checkout OSS-Fuzzuses: actions/checkout@v1with:diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.ymlindex 95c472293f..3e2e5988d1 100644--- a/.github/workflows/csharp.yml+++ b/.github/workflows/csharp.yml@@ -44,9 +44,12 @@ jobs:with:dotnet-version: ${{ matrix.dotnet }}- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/csharp_build.sh $(pwd)@@ -67,9 +70,12 @@ jobs:with:dotnet-version: ${{ matrix.dotnet }}- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/csharp_build.sh $(pwd)@@ -91,9 +97,12 @@ jobs:with:dotnet-version: ${{ matrix.dotnet }}- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/csharp_build.sh $(pwd)diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.ymlindex 738ea9f753..adee030c19 100644--- a/.github/workflows/dev.yml+++ b/.github/workflows/dev.yml@@ -29,9 +29,12 @@ jobs:runs-on: ubuntu-lateststeps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures ubuntu-cpp@@ -61,9 +64,12 @@ jobs:GIT_COMMITTER_EMAIL: github@actionssteps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Install Pythonuses: actions/setup-python@v1with:@@ -96,9 +102,12 @@ jobs:if: github.event_name == 'push'steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures ubuntu-cppdiff --git a/.github/workflows/go.yml b/.github/workflows/go.ymlindex 3749c944e2..4ad316ad92 100644--- a/.github/workflows/go.yml+++ b/.github/workflows/go.yml@@ -42,9 +42,12 @@ jobs:GO: ${{ matrix.go }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullrun: docker-compose pull --ignore-pull-failures debian-go- name: Docker Build@@ -73,9 +76,12 @@ jobs:with:go-version: ${{ matrix.go }}- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/go_build.sh .@@ -97,9 +103,12 @@ jobs:with:go-version: ${{ matrix.go }}- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/go_build.sh .diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.ymlindex 623ee7493a..7ad5409652 100644--- a/.github/workflows/integration.yml+++ b/.github/workflows/integration.yml@@ -50,9 +50,12 @@ jobs:MAVEN: 3.5steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures conda-cppdiff --git a/.github/workflows/java.yml b/.github/workflows/java.ymlindex b6953b8709..3cbd46e67e 100644--- a/.github/workflows/java.yml+++ b/.github/workflows/java.yml@@ -76,9 +76,12 @@ jobs:with:java-version: ${{ matrix.jdk }}- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/java_build.sh $(pwd) $(pwd)/builddiff --git a/.github/workflows/java_jni.yml b/.github/workflows/java_jni.ymlindex 6f7410a584..7fd66b3f1b 100644--- a/.github/workflows/java_jni.yml+++ b/.github/workflows/java_jni.yml@@ -46,9 +46,12 @@ jobs:MAVEN: ${{ matrix.maven }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures debian-javadiff --git a/.github/workflows/js.yml b/.github/workflows/js.ymlindex 0b916530b2..5a05c0421d 100644--- a/.github/workflows/js.yml+++ b/.github/workflows/js.yml@@ -42,9 +42,12 @@ jobs:NODE: ${{ matrix.node }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullrun: docker-compose pull --ignore-pull-failures debian-js- name: Docker Build@@ -70,9 +73,12 @@ jobs:node: [11]steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Install NodeJSuses: actions/setup-node@v1with:diff --git a/.github/workflows/python.yml b/.github/workflows/python.ymlindex 6c15e0a212..944e7c7fea 100644--- a/.github/workflows/python.yml+++ b/.github/workflows/python.yml@@ -45,9 +45,12 @@ jobs:UBUNTU: ${{ matrix.ubuntu }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -82,9 +85,12 @@ jobs:PANDAS: lateststeps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -122,9 +128,12 @@ jobs:PYTHON: ${{ matrix.python }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -169,9 +178,12 @@ jobs:CMAKE_ARGS: "-DPYTHON_EXECUTABLE=/usr/local/bin/python3"steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Install Dependenciesshell: bashrun: |diff --git a/.github/workflows/python_cron.yml b/.github/workflows/python_cron.ymlindex 6b6d6a64f9..a6ac6cb9be 100644--- a/.github/workflows/python_cron.yml+++ b/.github/workflows/python_cron.yml@@ -41,9 +41,12 @@ jobs:DEBIAN: ${{ matrix.debian }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -77,9 +80,12 @@ jobs:FEDORA: ${{ matrix.fedora }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -145,9 +151,12 @@ jobs:KARTOTHEK: ${{ matrix.kartothek || 'latest' }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |diff --git a/.github/workflows/r.yml b/.github/workflows/r.ymlindex faaac7e40d..645da835af 100644--- a/.github/workflows/r.yml+++ b/.github/workflows/r.yml@@ -53,9 +53,12 @@ jobs:UBUNTU: ${{ matrix.ubuntu }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -97,7 +100,12 @@ jobs:R_TAG: ${{ matrix.r_version }}-${{ matrix.r_image }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2+ with:+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures r@@ -136,7 +144,13 @@ jobs:- uses: numworks/setup-msys2@v1with:update: true- - uses: actions/checkout@v2+ - name: Checkout Arrow+ uses: actions/checkout@v2+ with:+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- uses: r-lib/actions/setup-r@masterwith:rtools-version: ${{ matrix.rtools }}diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.ymlindex b2e31f16c0..237eaf62cf 100644--- a/.github/workflows/ruby.yml+++ b/.github/workflows/ruby.yml@@ -48,9 +48,12 @@ jobs:UBUNTU: ${{ matrix.ubuntu }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullshell: bashrun: |@@ -97,9 +100,12 @@ jobs:XML_CATALOG_FILES: /usr/local/etc/xml/catalogsteps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Install Dependenciesshell: bashrun: |@@ -170,9 +176,11 @@ jobs:/f- name: Checkout Arrowuses: actions/checkout@v2- - name: Checkout submodules- run: |- git submodule update --init --force --recursive --depth 1+ with:+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Setup Rubyuses: actions/setup-ruby@v1with:diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex dc0b532abf..77f8ed9598 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -42,9 +42,12 @@ jobs:RUST: ${{ matrix.rust }}steps:- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Docker Pullrun: docker-compose pull --ignore-pull-failures debian-rust- name: Docker Build@@ -77,9 +80,12 @@ jobs:shell: bashrun: choco install flatc- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/rust_build.sh $(pwd) $(pwd)/build@@ -104,9 +110,12 @@ jobs:shell: bashrun: brew install flatbuffers- name: Checkout Arrow- uses: actions/checkout@v1+ uses: actions/checkout@v2with:- submodules: true+ fetch-depth: 0+ - name: Fetch Submodules and Tags+ shell: bash+ run: ci/scripts/util_checkout.sh- name: Buildshell: bashrun: ci/scripts/rust_build.sh $(pwd) $(pwd)/builddiff --git a/ci/scripts/util_checkout.sh b/ci/scripts/util_checkout.shnew file mode 100755index 0000000000..384aa49a10--- /dev/null+++ b/ci/scripts/util_checkout.sh@@ -0,0 +1,29 @@+#!/usr/bin/env bash+#+# Licensed to the Apache Software Foundation (ASF) under one+# or more contributor license agreements. See the NOTICE file+# distributed with this work for additional information+# regarding copyright ownership. The ASF licenses this file+# to you under the Apache License, Version 2.0 (the+# "License"); you may not use this file except in compliance+# with the License. You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing,+# software distributed under the License is distributed on an+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+# KIND, either express or implied. See the License for the+# specific language governing permissions and limitations+# under the License.++# this script is github actions specific++# checkout the submodules, remove it once the "submodules: recursive" feature+# gets released again+auth_header="$(git config --local --get http.https://github.com/.extraheader)"+git submodule sync --recursive+git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1++# fetch all the tags+git fetch --depth=1 origin +refs/tags/*:refs/tags/*