ci: Restore database backend runs via the generic matrix env field - #2486
Merged
Conversation
Sync .github/workflows/R-CMD-check.yaml and .github/workflows/versions-matrix/action.R from cynkratemplate (cynkra/cynkratemplate#95). The rcc-full job now applies the generic "env" field of test matrix entries to $GITHUB_ENV itself, before the custom actions run, because composite actions cannot read the matrix context. This fixes a silent breakage: the backend matrix entries carried a bare "test_src" field, and the custom before-install action tried to read it via `${{ matrix.config.test-src }}` — which resolves to an empty string inside a composite action, as visible in the job logs (`DM_TEST_SRC:` empty). As a result, DM_TEST_SRC was never set, tests/testthat/helper-src.R fell back to the "df" source, and the six "... with covr" jobs tested plain data frames instead of their advertised backends, skipping the server provisioning in the custom after-install action. The backend entries now pass DM_TEST_SRC through the "env" field, so the after-install action provisions the matching server again and the tests really run against SQL Server, Postgres, MariaDB, MySQL, DuckDB, and SQLite. The entries also set SKIP_UPDATE_SNAPSHOTS=true, keeping the snapshot updater from running the test suite a second time against the backend and accepting backend-specific snapshots; the instrumented-validation entry sets the flag directly, too. The custom before-install action loses the "env" input, the apply boilerplate, the broken DM_TEST_SRC step, and the DM_VALIDATE-triggered snapshot opt-out, all of which are now covered by the workflow and the matrix.
duckdb 1.5.5 (on the binary repositories since today)
announces its extensions-and-secrets location
whenever a driver is created without an explicit choice,
with a session-specific temporary path.
The snapshot updater captured that message and path
into tests/testthat/_snaps/dm_sql.md,
and the subsequent check step failed
because its own session used a different path.
Suppress the message by its condition class
("duckdb_storage_location") in the two test helpers
that create duckdb connections,
and restore the snapshot to its pre-pollution state.
Since #2487 the custom before-install action creates ~/.duckdb and points DUCKDB_R_HOME at it, which counts as an explicit storage choice, so duckdb announces nothing on driver creation and the test helpers no longer need to muffle the "duckdb_storage_location" message. Restore the bare connections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync
.github/workflows/R-CMD-check.yamland.github/workflows/versions-matrix/action.Rfrom cynkratemplate(cynkra/cynkratemplate#95):
the
rcc-fulljob now applies the genericenvfieldof test matrix entries to
$GITHUB_ENVitself,before the custom actions run,
because composite actions cannot read the
matrixcontext.Silent breakage this uncovers and fixes
The backend matrix entries carried a bare
test_srcfield,and the custom before-install action tried to read it via
${{ matrix.config.test-src }}—which resolves to an empty string inside a composite action.
The job logs prove it
(run 30139102985, "SQL Server with covr", env of every step:
DM_TEST_SRC:empty).As a result:
DM_TEST_SRCwas never set,tests/testthat/helper-src.Rfell back to thedfsource,and the six "… with covr" jobs
tested plain data frames instead of their advertised backends —
green, but misleading.
(
ankane/setup-postgres/setup-mariadb/setup-mysql/setup-sqlserver,keyed on
env.DM_TEST_SRC) ever ran.Fix
DM_TEST_SRCthrough the genericenvfield,so the after-install action provisions the matching server again
and the tests really run against SQL Server, Postgres, MariaDB,
MySQL, DuckDB, and SQLite.
SKIP_UPDATE_SNAPSHOTS=true(multi-line
envvalues are now supported by the template),keeping the snapshot updater from running the suite a second time
against the backend and accepting backend-specific snapshots.
The instrumented-validation entry sets the flag directly, too.
envinput,the apply boilerplate, the broken
DM_TEST_SRCstep,and the
DM_VALIDATE-triggered snapshot opt-out —all covered by the workflow and the matrix now.
duckdb 1.5.5 storage message
duckdb 1.5.5 announces its extensions-and-secrets location
on driver creation unless the location was chosen explicitly;
on this PR's first CI run the snapshot updater captured that message
(with its session-specific temporary path) into
_snaps/dm_sql.md,and the check step then failed on the path mismatch.
The snapshot is restored to its pre-pollution state here;
the announcement itself is prevented on
mainby #2487(
~/.duckdbplusDUCKDB_R_HOMEin the custom before-install action,merged into this branch),
so the interim message suppression in the test helpers
has been dropped again.
Heads-up
The six backend jobs have been inert for months;
re-enabling them may surface real drift
(driver installs, backend-specific test failures) in the nightly runs.
That would be true signal, not a regression from this PR.
Note that the nightly run on
maincurrently already hasfour unrelated failing jobs (macOS 4.5/4.6, ubuntu-26.04 devel, arm devel).
🤖 Generated with Claude Code
https://claude.ai/code/session_0136C9bRMjBGkUrtLdkYNmAg