Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-8880

[R][Linux] Make R Binary Install Friendlier

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.17.1
    • 1.0.0
    • R
    • None
    • Linux (Ubuntu)

    Description

      When R install tries to run a binary install, it looks for an exact match on the binary version, say "0.17.1.zip" from https://dl.bintray.com/ursalabs/arrow-r/libarrow/bin/ubuntu-18.04/.

      The problem is that even though "0.17.1" is pushed to CRAN as an official release, there is a time period (like right now) where bintray does not have an official binary build, just a date stamped build:

       

      arrow-0.17.0.20200516.zip
      arrow-0.17.0.20200517.zip
      arrow-0.17.0.20200518.zip
      arrow-0.17.0.zip
      arrow-0.17.1.20200517.zip
      arrow-0.17.1.20200519.zip
      arrow-0.17.1.20200520.zip

       

      I'd like to suggest adding a new environment variable trigger that would allow for the scanning of bintray for a recent timestamped version, if the specific release number is not present.

      I'd like to suggest enhancing the linux code:

      https://github.com/apache/arrow/blob/02f7be33d1c32d1636323e6fb90c63cb01bf44af/r/tools/linuxlibs.R#L39-L47

      with scanning functionality:

      try_download <- function(from_url, to_file, scan_dates = FALSE) {
          try(
                  suppressWarnings(
                        download.file(from_url, to_file, quiet = quietly)
                  ),
                  silent = quietly
            )
            if (!file.exists(to_file)) {
                     
      if (scan_dates) {
                            scan_dates <- format(Sys.Date()-(0:10),"%Y%m%d")

                            for (scan_date in scan_dates) {

                                   base_url <- tools::file_path_sans_ext(from_url)

                                   ext <- tools::file_ext(from_url)

                                   scan_url <- sprintf("%s.%s.%s", base_url, scan_date, ext)

                                   if (try_download(from_url = scan_url, to_file, scan_dates = FALSE)) {

                                           return(TRUE)

                                   }

                             }

                       }

                       return(FALSE)


         } else {

              return(TRUE)

         }

      }

      And then augment the calling function:

      https://github.com/apache/arrow/blob/02f7be33d1c32d1636323e6fb90c63cb01bf44af/r/tools/linuxlibs.R#L55

       

      with:

      binary_scan_ok <- !identical(tolower(Sys.getenv("LIBARROW_BINARY_SCAN", "false")), "false")
      if (try_download(binary_url, libfile,
      scan_dates = binary_scan_ok)) {

       

      This would allow automated builds to set the scan option, and then find and install the most recent daily build in lieu of an official binary build being in place.

       

       

       

       

       

       

       

       

       

       

       

       

       

      Attachments

        Activity

          People

            npr Neal Richardson
            bschulth Brian Schultheiss
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: