This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 7c9e5784d ci(r): ensure testing with the local version of driver 
manager instead of the cran version (#3817)
7c9e5784d is described below

commit 7c9e5784ddfac43f61583eebf9f0540f5b6df435
Author: eitsupi <[email protected]>
AuthorDate: Thu Dec 18 13:11:37 2025 +0900

    ci(r): ensure testing with the local version of driver manager instead of 
the cran version (#3817)
    
    Related to #3789 and #3790
    
    Looking at the logs, it seems that the current CI was using
    adbcdrivermanager installed from CRAN, and testing of the latest driver
    and driver manager combinations had not been performed.
    This PR will make a change to ensure that adbcdrivermanager is installed
    locally.
    
    This required a minor change to prevent the bootstrap.R script from
    failing with `pak::pkg_install("local::.")` or something else.
    
    We can check the driver manager version via the logs of the
    `r-lib/actions/setup-r-dependencies` step.
    
    Before:
    
    ```
      ─ Session info 
───────────────────────────────────────────────────────────────
       setting  value
       version  R version 4.5.2 (2025-10-31)
       os       Ubuntu 24.04.3 LTS
       system   x86_64, linux-gnu
       ui       X11
       language (EN)
       collate  C.UTF-8
       ctype    C.UTF-8
       tz       UTC
       date     2025-12-17
       pandoc   NA
       quarto   NA
    
      ─ Packages 
───────────────────────────────────────────────────────────────────
       package           * version date (UTC) lib source
       adbcdrivermanager   0.21.0  2025-11-20 [1] RSPM
       base              * 4.5.2   2025-10-31 [3] local
    ```
    
    After this change:
    
    ```
      ─ Session info 
───────────────────────────────────────────────────────────────
       setting  value
       version  R version 4.5.2 (2025-10-31)
       os       Ubuntu 24.04.3 LTS
       system   x86_64, linux-gnu
       ui       X11
       language (EN)
       collate  C.UTF-8
       ctype    C.UTF-8
       tz       UTC
       date     2025-12-17
       pandoc   NA
       quarto   NA
    
      ─ Packages 
───────────────────────────────────────────────────────────────────
       package           * version     date (UTC) lib source
       adbcdrivermanager   0.21.0.9000 2025-12-17 [1] local
       base              * 4.5.2       2025-10-31 [3] local
    ```
---
 .github/workflows/r-check.yml   | 6 +++---
 r/adbcbigquery/bootstrap.R      | 6 +++++-
 r/adbcdrivermanager/bootstrap.R | 6 +++++-
 r/adbcflightsql/bootstrap.R     | 6 +++++-
 r/adbcpostgresql/bootstrap.R    | 6 +++++-
 r/adbcsnowflake/bootstrap.R     | 6 +++++-
 r/adbcsqlite/bootstrap.R        | 6 +++++-
 7 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/r-check.yml b/.github/workflows/r-check.yml
index c40a78ae9..a53f40028 100644
--- a/.github/workflows/r-check.yml
+++ b/.github/workflows/r-check.yml
@@ -72,8 +72,7 @@ jobs:
       - name: Bootstrap R Package
         run: |
           pushd r/adbcdrivermanager
-          R -e 'if (!requireNamespace("nanoarrow", quietly = TRUE)) 
install.packages("nanoarrow", repos = "https://cloud.r-project.org/";)'
-          R CMD INSTALL . --preclean
+          Rscript bootstrap.R
           popd
           pushd "r/${{ inputs.pkg }}"
           Rscript bootstrap.R
@@ -81,7 +80,8 @@ jobs:
 
       - uses: 
r-lib/actions/setup-r-dependencies@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590
         with:
-          extra-packages: any::rcmdcheck
+          # The development version of adbcdrivermanager from the local path 
is needed for tests
+          extra-packages: any::rcmdcheck, local::../adbcdrivermanager
           needs: check
           working-directory: r/${{ inputs.pkg }}
 
diff --git a/r/adbcbigquery/bootstrap.R b/r/adbcbigquery/bootstrap.R
index c3dd879dd..561b009d0 100644
--- a/r/adbcbigquery/bootstrap.R
+++ b/r/adbcbigquery/bootstrap.R
@@ -15,4 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-source("../tools/bootstrap-go.R")
+BOOTSTRAP_SCRIPT <- file.path("..", "tools", "bootstrap-go.R")
+
+if (file.exists(BOOTSTRAP_SCRIPT)) {
+  source(BOOTSTRAP_SCRIPT)
+}
diff --git a/r/adbcdrivermanager/bootstrap.R b/r/adbcdrivermanager/bootstrap.R
index d1c1353f4..e3406b1cb 100644
--- a/r/adbcdrivermanager/bootstrap.R
+++ b/r/adbcdrivermanager/bootstrap.R
@@ -15,5 +15,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+BOOTSTRAP_SCRIPT <- file.path("..", "tools", "bootstrap-c.R")
+
 Sys.setenv("ADBC_R_BOOTSTRAP_EXCLUDE" = "vendor/sqlite3")
-source("../tools/bootstrap-c.R")
+if (file.exists(BOOTSTRAP_SCRIPT)) {
+  source(BOOTSTRAP_SCRIPT)
+}
diff --git a/r/adbcflightsql/bootstrap.R b/r/adbcflightsql/bootstrap.R
index c3dd879dd..561b009d0 100644
--- a/r/adbcflightsql/bootstrap.R
+++ b/r/adbcflightsql/bootstrap.R
@@ -15,4 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-source("../tools/bootstrap-go.R")
+BOOTSTRAP_SCRIPT <- file.path("..", "tools", "bootstrap-go.R")
+
+if (file.exists(BOOTSTRAP_SCRIPT)) {
+  source(BOOTSTRAP_SCRIPT)
+}
diff --git a/r/adbcpostgresql/bootstrap.R b/r/adbcpostgresql/bootstrap.R
index d1c1353f4..e3406b1cb 100644
--- a/r/adbcpostgresql/bootstrap.R
+++ b/r/adbcpostgresql/bootstrap.R
@@ -15,5 +15,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+BOOTSTRAP_SCRIPT <- file.path("..", "tools", "bootstrap-c.R")
+
 Sys.setenv("ADBC_R_BOOTSTRAP_EXCLUDE" = "vendor/sqlite3")
-source("../tools/bootstrap-c.R")
+if (file.exists(BOOTSTRAP_SCRIPT)) {
+  source(BOOTSTRAP_SCRIPT)
+}
diff --git a/r/adbcsnowflake/bootstrap.R b/r/adbcsnowflake/bootstrap.R
index c3dd879dd..561b009d0 100644
--- a/r/adbcsnowflake/bootstrap.R
+++ b/r/adbcsnowflake/bootstrap.R
@@ -15,4 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-source("../tools/bootstrap-go.R")
+BOOTSTRAP_SCRIPT <- file.path("..", "tools", "bootstrap-go.R")
+
+if (file.exists(BOOTSTRAP_SCRIPT)) {
+  source(BOOTSTRAP_SCRIPT)
+}
diff --git a/r/adbcsqlite/bootstrap.R b/r/adbcsqlite/bootstrap.R
index 23c65340a..3ff391146 100644
--- a/r/adbcsqlite/bootstrap.R
+++ b/r/adbcsqlite/bootstrap.R
@@ -15,4 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-source("../tools/bootstrap-c.R")
+BOOTSTRAP_SCRIPT <- file.path("..", "tools", "bootstrap-c.R")
+
+if (file.exists(BOOTSTRAP_SCRIPT)) {
+  source(BOOTSTRAP_SCRIPT)
+}

Reply via email to