Skip to content

R-hub container checks run DBItest without a database server #678

Not planned

Description

@krlmlr

R-hub's container checks fail in tests/testthat/test-DBItest.R because the containers have no PostgreSQL server, while the test file runs the DBItest suite on every GitHub Actions job:

if (
  Sys.getenv("GITHUB_ACTIONS") == "true" ||
    (postgresHasDefault() && identical(Sys.getenv("NOT_CRAN"), "true"))
) {
  if (rlang::is_installed("DBItest")) {
    DBItest::test_all()
  }
}

Observed on the release branch v1.5-quill (1d2036b), in the R-hub run https://github.com/r-dbi/RPostgres/actions/runs/46305394715. In both gcc-asan (https://github.com/r-dbi/RPostgres/actions/runs/46305394715/job/141480072209) and valgrind (https://github.com/r-dbi/RPostgres/actions/runs/46305394715/job/141480072230), the result is [ FAIL 1 | WARN 0 | SKIP 118 | PASS 33 ], with test-DBItest.R:6:5 failing on connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed. The sanitizers found nothing (valgrind: ERROR SUMMARY: 0 errors), but they also exercised none of the code that talks to a server, which is most of the package. CRAN does not set GITHUB_ACTIONS, so CRAN is not affected. Expected: the R-hub checks run the database tests against a server, or skip them cleanly.

  • Provide a PostgreSQL server in R-hub's container jobs (options in krlmlr/r-pkg-maintain, linked from the PR that records this finding), or
  • gate the DBItest suite on an explicit variable that the rcc jobs set, instead of on GITHUB_ACTIONS, so that a job without a server skips the suite instead of failing.
  • Same check for "checking running R code from vignettes": work-queue.Rmd connects to a server, and its tangled code ran on R-hub (investigation on chore: Release RPostgres 1.5.0 #677).

Generated by Claude Code

Activity

  1. added
    status: open
    on Nov 29, 2026
  2. krlmlr commented on Nov 29, 2026

    @krlmlr
    MemberAuthor

    Closed to keep this issue tracker for public issues. The work is still open, and the status: open label records that.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions