Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-39601: [R] Don't download cmake when TEST_OFFLINE_BUILD=true #39602

Merged
merged 3 commits into from Jan 16, 2024

Conversation

nealrichardson
Copy link
Member

@nealrichardson nealrichardson commented Jan 14, 2024

See #39601

Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding download_ok <- FALSE, it should exit cleanly and informatively.

Are there any user-facing changes?

Define "user".

Copy link

⚠️ GitHub issue #39601 has been automatically assigned in GitHub to PR creator.

@assignUser
Copy link
Member

@github-actions crossbow submit r-binary-packages

Copy link

Revision: d96fca2

Submitted crossbow builds: ursacomputing/crossbow @ actions-c2547fba9e

Task Status
r-binary-packages GitHub Actions

# Show which one we found
# Full source builds will always show "cmake" in the logs
lg("cmake: %s", cmake, .indent = "****")
lg("cmake %s", CMAKE_VERSION, .indent = "****")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding version here – in my other testing on macbuilder I wanted this / added it in hackily so glad to see it for real here.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jan 14, 2024
@@ -281,11 +281,10 @@ withr::with_makevars(list(CPPFLAGS = "", LDFLAGS = ""), remotes::install_github(
environment variables that determine how the build works and what features
get built.
* `TEST_OFFLINE_BUILD`: When set to `true`, the build script will not download
prebuilt the C++ library binary.
prebuilt the C++ library binary or, if needed, `cmake`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
prebuilt the C++ library binary or, if needed, `cmake`.
prebuilt the C++ library binary or, if needed, `cmake` of an appropriate version.

We could also say "cmake >= 3.16" here instead, but then have to make sure we bump both. But it might be nice to call out the version requirement here too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly; don't think it matters much one way or another. Most likely if you're reading this file, you've already tried to install and hit the error message that tells you what version you need 🤷

IMO your exact suggestion isn't worth adding, I'd think that appropriate version was implied. If you wanted to list the version here, I'd leave a comment in nixlibs.R next to cmake_minimum_version saying to update the vignette when you bump it. (Of course, that only gets bumped when we bump https://github.com/apache/arrow/blob/main/cpp/CMakeLists.txt#L18, and really only if anyone remembers that we have it listed here too.)

@nealrichardson
Copy link
Member Author

Example output added:

**** cmake 3.28.1: /usr/local/bin/cmake

https://github.com/ursacomputing/crossbow/actions/runs/7521124185/job/20471586891#step:13:223

**** cmake 3.27.6: /usr/local/bin/cmake

https://github.com/ursacomputing/crossbow/actions/runs/7521124185/job/20471587000#step:13:47

**** cmake 3.21.2: /Applications/CMake.app/Contents/bin/cmake

https://mac.r-project.org/macbuilder/results/1705263596-b370573ae984333b/

@nealrichardson
Copy link
Member Author

@github-actions crossbow submit -g r

Copy link

Revision: d96fca2

Submitted crossbow builds: ursacomputing/crossbow @ actions-6702e93fdc

Task Status
r-binary-packages GitHub Actions
test-fedora-r-clang-sanitizer Azure
test-r-arrow-backwards-compatibility GitHub Actions
test-r-depsource-bundled Azure
test-r-depsource-system GitHub Actions
test-r-dev-duckdb GitHub Actions
test-r-devdocs GitHub Actions
test-r-gcc-11 GitHub Actions
test-r-gcc-12 GitHub Actions
test-r-install-local GitHub Actions
test-r-install-local-minsizerel GitHub Actions
test-r-library-r-base-latest Azure
test-r-linux-as-cran GitHub Actions
test-r-linux-rchk GitHub Actions
test-r-linux-valgrind Azure
test-r-minimal-build Azure
test-r-offline-maximal GitHub Actions
test-r-offline-minimal Azure
test-r-rhub-debian-gcc-devel-lto-latest Azure
test-r-rhub-debian-gcc-release-custom-ccache Azure
test-r-rhub-ubuntu-gcc-release-latest Azure
test-r-rstudio-r-base-4.1-opensuse153 Azure
test-r-rstudio-r-base-4.2-centos7-devtoolset-8 Azure
test-r-rstudio-r-base-4.2-focal Azure
test-r-ubuntu-22.04 GitHub Actions
test-r-versions GitHub Actions
test-ubuntu-r-sanitizer Azure

@nealrichardson
Copy link
Member Author

Here's an example of the message when cmake is downloaded: https://github.com/ursacomputing/crossbow/actions/runs/7530786939/job/20497939288#step:7:24

The offline-maximal build now fails because the image must not have cmake in it: https://dev.azure.com/ursacomputing/crossbow/_build/results?buildId=59743&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=6c939d89-0d1a-51f2-8b30-091a7a82e98c&l=348

So we'll need to install it before the R package test. I can look into that; looks like there is ci/scripts/install_cmake.sh.

Also, I was looking through the jobs for evidence of where cmake is found but too old, haven't found one yet but I have seen some unexpected things. Of note, it looks like the jobs that are based on ubuntu-r-only-r are downloading and using a nightly libarrow (here's the gcc-12 build, for example: https://github.com/ursacomputing/crossbow/actions/runs/7530787207/job/20497938858#step:8:27). That doesn't seem right, is it? It's faster, but it means that if there's a change in the C++ library that we're trying to test with those jobs, it won't be tested, nor will the C++ library be compiled with the settings/compilers in that job. Seems like LIBARROW_BINARY=false needs to be added to them? @assignUser? Not related to the changes in this PR, but seems important.

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jan 15, 2024
@assignUser
Copy link
Member

That doesn't seem right, is it?

Ah good catch, we can set it in the docker-compose of that job, that way we don't have to edit all the jobs separately.

@nealrichardson
Copy link
Member Author

nealrichardson commented Jan 15, 2024

It looks like we have some growing confusion in our env vars that govern the build script. The docker-compose job has these set:

      FORCE_BUNDLED_BUILD: 'true'
      LIBARROW_BUILD: 'true'

FORCE_BUNDLED_BUILD is only used in the configure script to skip looking for libarrow on the system. With the current state of configure, it's basically equivalent to ARROW_USE_PKG_CONFIG=false, assuming ARROW_HOME is not set. It doesn't trigger a source build.

LIBARROW_BUILD is only checked to see if it is false, to prevent doing the bundled source build. The nixlibs.R script does not check for true to mean that you must do a source build, i.e. skip binary downloading.

Side note: I agree with the comment in https://github.com/apache/arrow/pull/38534/files#r1387468097 that LIBARROW_BINARY=false should be what we recommend (and in fact already document in the script) for saying not to download a prebuilt library. LIBARROW_DOWNLOAD existed before but was removed, though reading that discussion, apparently a no-op artifact of that was not cleaned up, which caused some confusion.

This feels like creeping scope so perhaps I should make another issue, but IMO:

  • FORCE_BUNDLED_BUILD should be deprecated in favor of LIBARROW_BUILD. I don't think we recommend it to people, it's more for our testing.
  • LIBARROW_BUILD=true is equivalent to LIBARROW_BINARY=false. If LIBARROW_BUILD=true and LIBARROW_BINARY is something other than unset or false, raise an error.
  • Set download_libarrow_ok based on LIBARROW_BINARY=false, not LIBARROW_DOWNLOAD. Remove references to LIBARROW_DOWNLOAD.
  • If we want something explicit about preventing downloading, that's TEST_OFFLINE_BUILD currently; if that's a feature we want to advertise, we could rename that something that's not TEST_.

(edit: I opened #39620)

@assignUser
Copy link
Member

See #39625 for the minor fixes

@nealrichardson
Copy link
Member Author

@assignUser since you're addressing the offline-maximal build in #39625, is this ready to merge?

Copy link
Member

@assignUser assignUser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! We could rebase after #39625 is merged but I think we can merge this as is.

@assignUser assignUser merged commit 0d128c6 into apache:main Jan 16, 2024
10 checks passed
@assignUser assignUser removed the awaiting change review Awaiting change review label Jan 16, 2024
@nealrichardson nealrichardson deleted the no-cmake-download branch January 16, 2024 01:19
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 0d128c6.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.

raulcd pushed a commit that referenced this pull request Jan 16, 2024
See #39601 

### Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding `download_ok <- FALSE`, it should exit cleanly and informatively.

### Are there any user-facing changes?

Define "user".
* Closes: #39601

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
assignUser pushed a commit that referenced this pull request Jan 16, 2024
See #39601 

### Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding `download_ok <- FALSE`, it should exit cleanly and informatively.

### Are there any user-facing changes?

Define "user".
* Closes: #39601

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
idailylife pushed a commit to idailylife/arrow that referenced this pull request Jan 18, 2024
…apache#39602)

See apache#39601 

### Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding `download_ok <- FALSE`, it should exit cleanly and informatively.

### Are there any user-facing changes?

Define "user".
* Closes: apache#39601

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
clayburn pushed a commit to clayburn/arrow that referenced this pull request Jan 23, 2024
…apache#39602)

See apache#39601 

### Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding `download_ok <- FALSE`, it should exit cleanly and informatively.

### Are there any user-facing changes?

Define "user".
* Closes: apache#39601

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…apache#39602)

See apache#39601 

### Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding `download_ok <- FALSE`, it should exit cleanly and informatively.

### Are there any user-facing changes?

Define "user".
* Closes: apache#39601

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Feb 28, 2024
…apache#39602)

See apache#39601 

### Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding `download_ok <- FALSE`, it should exit cleanly and informatively.

### Are there any user-facing changes?

Define "user".
* Closes: apache#39601

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
thisisnic pushed a commit to thisisnic/arrow that referenced this pull request Mar 8, 2024
…apache#39602)

See apache#39601 

### Are these changes tested?

Existing CI should pass. This should also pass on macbuilder without downloading cmake, and if hardcoding `download_ok <- FALSE`, it should exit cleanly and informatively.

### Are there any user-facing changes?

Define "user".
* Closes: apache#39601

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[R] Don't download cmake when TEST_OFFLINE_BUILD=true
3 participants