Skip to content

Apache DataFusion SQL Query Engine

ARROW-12143: [CI] R builds should timeout and fail after some threshold and dump the output.

Weston Pacee70f7db4a585
diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml
index 8869de77b3..0bdecac2d6 100644
--- a/.github/workflows/r.yml
+++ b/.github/workflows/r.yml
@@ -20,24 +20,24 @@ name: R
on:
push:
paths:
- - '.github/workflows/r.yml'
- - 'ci/scripts/r_*.sh'
- - 'ci/scripts/cpp_*.sh'
- - 'ci/scripts/PKGBUILD'
- - 'ci/etc/rprofile'
- - 'ci/docker/**'
- - 'cpp/**'
- - 'r/**'
+ - ".github/workflows/r.yml"
+ - "ci/scripts/r_*.sh"
+ - "ci/scripts/cpp_*.sh"
+ - "ci/scripts/PKGBUILD"
+ - "ci/etc/rprofile"
+ - "ci/docker/**"
+ - "cpp/**"
+ - "r/**"
pull_request:
paths:
- - '.github/workflows/r.yml'
- - 'ci/scripts/r_*.sh'
- - 'ci/scripts/cpp_*.sh'
- - 'ci/scripts/PKGBUILD'
- - 'ci/etc/rprofile'
- - 'ci/docker/**'
- - 'cpp/**'
- - 'r/**'
+ - ".github/workflows/r.yml"
+ - "ci/scripts/r_*.sh"
+ - "ci/scripts/cpp_*.sh"
+ - "ci/scripts/PKGBUILD"
+ - "ci/etc/rprofile"
+ - "ci/docker/**"
+ - "cpp/**"
+ - "r/**"
env:
DOCKER_VOLUME_PREFIX: ".docker/"
@@ -86,6 +86,15 @@ jobs:
- name: Dump install logs
run: cat r/check/arrow.Rcheck/00install.out
if: always()
+ - name: Dump test logs
+ run: cat r/check/arrow.Rcheck/tests/testthat.Rout*
+ if: always()
+ - name: Save the test output
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: test-output
+ path: r/check/arrow.Rcheck/tests/testthat.Rout*
- name: Docker Push
if: success() && github.event_name == 'push' && github.repository == 'apache/arrow'
continue-on-error: true
@@ -99,8 +108,8 @@ jobs:
fail-fast: false
matrix:
config:
- - {org: 'rstudio', image: 'r-base', tag: '4.0-centos7'}
- - {org: 'rhub', image: 'debian-gcc-devel', tag: 'latest'}
+ - { org: "rstudio", image: "r-base", tag: "4.0-centos7" }
+ - { org: "rhub", image: "debian-gcc-devel", tag: "latest" }
env:
R_ORG: ${{ matrix.config.org }}
R_IMAGE: ${{ matrix.config.image }}
@@ -134,6 +143,15 @@ jobs:
- name: Dump install logs
run: cat r/check/arrow.Rcheck/00install.out
if: always()
+ - name: Dump test logs
+ run: cat r/check/arrow.Rcheck/tests/testthat.Rout*
+ if: always()
+ - name: Save the test output
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: test-output
+ path: r/check/arrow.Rcheck/tests/testthat.Rout*
- name: Docker Push
if: success() && github.event_name == 'push' && github.repository == 'apache/arrow'
continue-on-error: true
@@ -149,7 +167,7 @@ jobs:
rtools: [35, 40]
env:
TEST_R_WITH_ARROW: "TRUE"
- ARROW_R_CXXFLAGS: '-Werror'
+ ARROW_R_CXXFLAGS: "-Werror"
_R_CHECK_TESTS_NLINES_: 0
steps:
- run: git config --global core.autocrlf false
@@ -187,13 +205,13 @@ jobs:
- uses: r-lib/actions/setup-r@master
with:
rtools-version: 40
- r-version: '4.0'
+ r-version: "4.0"
Ncpus: 2
- uses: r-lib/actions/setup-r@master
if: ${{ matrix.rtools == 35 }}
with:
rtools-version: 35
- r-version: '3.6'
+ r-version: "3.6"
Ncpus: 2
- name: Build Arrow C++
shell: bash
@@ -221,7 +239,8 @@ jobs:
build_args = '--no-build-vignettes',
args = c('--no-manual', '--as-cran', '--ignore-vignettes', '--run-donttest'),
error_on = 'warning',
- check_dir = 'check'
+ check_dir = 'check',
+ timeout = 3600
)
- name: Dump install logs
shell: cmd
diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh
index 151e71b8a7..d447bdf23d 100755
--- a/ci/scripts/r_test.sh
+++ b/ci/scripts/r_test.sh
@@ -62,7 +62,7 @@ BEFORE=$(ls -alh ~/)
SCRIPT="as_cran <- !identical(tolower(Sys.getenv('NOT_CRAN')), 'true')
if (as_cran) {
- rcmdcheck::rcmdcheck(args = c('--as-cran', '--run-donttest'), error_on = 'warning', check_dir = 'check')
+ rcmdcheck::rcmdcheck(args = c('--as-cran', '--run-donttest'), error_on = 'warning', check_dir = 'check', timeout = 3600)
} else {
if (nzchar(Sys.which('minio'))) {
message('Running minio for S3 tests (if build supports them)')
@@ -71,7 +71,7 @@ SCRIPT="as_cran <- !identical(tolower(Sys.getenv('NOT_CRAN')), 'true')
pid <- sys::exec_background('minio', c('server', minio_dir))
on.exit(tools::pskill(pid))
}
- rcmdcheck::rcmdcheck(build_args = '--no-build-vignettes', args = c('--no-manual', '--ignore-vignettes', '--run-donttest'), error_on = 'warning', check_dir = 'check')
+ rcmdcheck::rcmdcheck(build_args = '--no-build-vignettes', args = c('--no-manual', '--ignore-vignettes', '--run-donttest'), error_on = 'warning', check_dir = 'check', timeout = 3600)
}"
echo "$SCRIPT" | ${R_BIN} --no-save
diff --git a/dev/tasks/r/azure.linux.yml b/dev/tasks/r/azure.linux.yml
index c8ab8d870a..4c977fe201 100644
--- a/dev/tasks/r/azure.linux.yml
+++ b/dev/tasks/r/azure.linux.yml
@@ -15,53 +15,58 @@
# limitations under the License.
jobs:
-- job: linux
- pool:
- vmImage: ubuntu-latest
- timeoutInMinutes: 360
- steps:
- - script: |
- set -ex
- git clone --no-checkout {{ arrow.remote }} arrow
- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
- git -C arrow checkout FETCH_HEAD
- git -C arrow submodule update --init --recursive
- displayName: Clone arrow
+ - job: linux
+ pool:
+ vmImage: ubuntu-latest
+ timeoutInMinutes: 360
+ steps:
+ - script: |
+ set -ex
+ git clone --no-checkout {{ arrow.remote }} arrow
+ git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
+ git -C arrow checkout FETCH_HEAD
+ git -C arrow submodule update --init --recursive
+ displayName: Clone arrow
- - script: |
- set -ex
- docker -v
- docker-compose -v
- cd arrow
- export R_ORG={{ r_org }}
- export R_IMAGE={{ r_image }}
- export R_TAG={{ r_tag }}
- export DEVTOOLSET_VERSION={{ devtoolset_version|default("-1") }}
- docker-compose pull --ignore-pull-failures r
- docker-compose build r
- displayName: Docker build
+ - script: |
+ set -ex
+ docker -v
+ docker-compose -v
+ cd arrow
+ export R_ORG={{ r_org }}
+ export R_IMAGE={{ r_image }}
+ export R_TAG={{ r_tag }}
+ export DEVTOOLSET_VERSION={{ devtoolset_version|default("-1") }}
+ docker-compose pull --ignore-pull-failures r
+ docker-compose build r
+ displayName: Docker build
- - script: |
- set -ex
- cd arrow
- export R_ORG={{ r_org }}
- export R_IMAGE={{ r_image }}
- export R_TAG={{ r_tag }}
- # we have to export this (right?) because we need it in the build env
- export ARROW_R_DEV={{ not_cran }}
- # Note that ci/scripts/r_test.sh sets NOT_CRAN=true if ARROW_R_DEV=TRUE
- docker-compose run \
- -e ARROW_DATASET={{ arrow_dataset|default("") }} \
- -e ARROW_PARQUET={{ arrow_parquet|default("") }} \
- -e ARROW_S3={{ arrow_s3|default("") }} \
- -e ARROW_WITH_RE2={{ arrow_with_re2|default("") }} \
- -e ARROW_WITH_UTF8PROC={{ arrow_with_utf8proc|default("") }} \
- -e LIBARROW_MINIMAL={{ libarrow_minimal|default("") }} \
- r
- displayName: Docker run
+ - script: |
+ set -ex
+ cd arrow
+ export R_ORG={{ r_org }}
+ export R_IMAGE={{ r_image }}
+ export R_TAG={{ r_tag }}
+ # we have to export this (right?) because we need it in the build env
+ export ARROW_R_DEV={{ not_cran }}
+ # Note that ci/scripts/r_test.sh sets NOT_CRAN=true if ARROW_R_DEV=TRUE
+ docker-compose run \
+ -e ARROW_DATASET={{ arrow_dataset|default("") }} \
+ -e ARROW_PARQUET={{ arrow_parquet|default("") }} \
+ -e ARROW_S3={{ arrow_s3|default("") }} \
+ -e ARROW_WITH_RE2={{ arrow_with_re2|default("") }} \
+ -e ARROW_WITH_UTF8PROC={{ arrow_with_utf8proc|default("") }} \
+ -e LIBARROW_MINIMAL={{ libarrow_minimal|default("") }} \
+ r
+ displayName: Docker run
- - script: |
- set -ex
- cat arrow/r/check/arrow.Rcheck/00install.out
- displayName: Dump install logs
- condition: succeededOrFailed()
+ - script: |
+ set -ex
+ cat arrow/r/check/arrow.Rcheck/00install.out
+ displayName: Dump install logs
+ condition: succeededOrFailed()
+ - script: |
+ set -ex
+ cat arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
+ displayName: Dump test logs
+ condition: succeededOrFailed()
diff --git a/dev/tasks/r/github.linux.cran.yml b/dev/tasks/r/github.linux.cran.yml
index 1e5ed4f021..03d22dcbfe 100644
--- a/dev/tasks/r/github.linux.cran.yml
+++ b/dev/tasks/r/github.linux.cran.yml
@@ -68,3 +68,12 @@ jobs:
- name: Dump install logs
run: cat arrow/r/check/arrow.Rcheck/00install.out
if: always()
+ - name: Dump test logs
+ run: cat arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
+ if: always()
+ - name: Save the test output
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: test-output
+ path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
diff --git a/dev/tasks/r/github.linux.versions.yml b/dev/tasks/r/github.linux.versions.yml
index 9ddeb1e940..25f1f8a655 100644
--- a/dev/tasks/r/github.linux.versions.yml
+++ b/dev/tasks/r/github.linux.versions.yml
@@ -69,3 +69,12 @@ jobs:
- name: Dump install logs
run: cat arrow/r/check/arrow.Rcheck/00install.out
if: always()
+ - name: Dump test logs
+ run: cat arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
+ if: always()
+ - name: Save the test output
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: test-output
+ path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
diff --git a/dev/tasks/r/github.macos.autobrew.yml b/dev/tasks/r/github.macos.autobrew.yml
index 12812114eb..1b8500f64b 100644
--- a/dev/tasks/r/github.macos.autobrew.yml
+++ b/dev/tasks/r/github.macos.autobrew.yml
@@ -67,3 +67,12 @@ jobs:
- name: Dump install logs
run: cat arrow/r/check/arrow.Rcheck/00install.out
if: always()
+ - name: Dump test logs
+ run: cat arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
+ if: always()
+ - name: Save the test output
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: test-output
+ path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*