Skip to content

Updates for R-CMD-check-occasional to pass with minimal CI noise - #7832

Merged
MichaelChirico merged 12 commits into
masterfrom
occasional-fix
Jul 28, 2026
Merged

Updates for R-CMD-check-occasional to pass with minimal CI noise#7832
MichaelChirico merged 12 commits into
masterfrom
occasional-fix

Conversation

@MichaelChirico

@MichaelChirico MichaelChirico commented Jul 23, 2026

Copy link
Copy Markdown
Member

The work here represents diagnosis+fix mainly by Gemini, with some back-and-forth + my input. I didn't quite keep all the commits from Gemini strictly pristine, but anything where there's any Gemini authorship has the commit message prefixed with Gemini: (with possible clean-up edits by me). The most crucial logjam was broken w.r.t. _R_CHECK_DEPENDS_ONLY_, as described by Gemini below:


Setting _R_CHECK_DEPENDS_ONLY_: false in .github/workflows/R-CMD-check-occasional.yaml overrides a default behavior of --as-cran in R CMD check that hides optional packages from the test suite:

1. Default Behavior of --as-cran in R CMD check

Under --as-cran, R automatically enables _R_CHECK_DEPENDS_ONLY_=true:

check_args = c("--no-manual", "--as-cran")

When active, R creates a restricted, temporary library (.libPaths()) during the check containing only the packages explicitly listed in DESCRIPTION (Depends, Imports, Suggests, and Enhances), plus base/recommended R packages. Any other packages installed on the system are hidden from the search path during test execution.

2. Why This Broke other.Rraw in CI

In step 82 of R-CMD-check-occasional.yaml, the workflow installs "fully optional packages" (other_pkgs such as caret, dplyr, ggplot2, sf, vctrs, etc.) so they can be tested for interoperability in inst/tests/other.Rraw. These optional packages are intentionally not listed in data.table's DESCRIPTION file.

Because they are omitted from DESCRIPTION, --as-cran stripped them from .libPaths() during check execution. Even though the step successfully installed all 19 optional packages and set TEST_DATA_TABLE_WITH_OTHER_PACKAGES=TRUE, inside R CMD check, other.Rraw could not find them and aborted across all CI runners with:

test.data.table('other.Rraw') failed to attach required package(s): caret, DBI, dplyr, gdata, ggplot2, hexbin, knitr, nanotime, nlme, plyr, RSQLite, sf, vctrs.

3. Effect of the Change

By explicitly setting _R_CHECK_DEPENDS_ONLY_: false, we prevent R CMD check from isolating the check library strictly to DESCRIPTION dependencies. This allows other.Rraw to see and attach the optional packages installed in the runner library during the check.

@MichaelChirico MichaelChirico changed the title Handle _R_CHECK_DEPENDS_ONLY_ correctly for other.Rraw Handle _R_CHECK_DEPENDS_ONLY_ correctly for other.Rraw to work in -occasional CI Jul 23, 2026
@MichaelChirico
MichaelChirico changed the base branch from master to other-attach-order July 23, 2026 22:52
@MichaelChirico
MichaelChirico force-pushed the occasional-fix branch 3 times, most recently from dcbf1f9 to 0dec4cc Compare July 23, 2026 23:17
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
  • HEAD=occasional-fix much slower for transform improved in #5493
  • HEAD=occasional-fix faster P<0.001 for DT[by,verbose=TRUE] improved in #6296
  • HEAD=occasional-fix slower P<0.001 for memrecycle regression fixed in #5463
    Comparison Plot

Generated via commit 150737f

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 3 minutes and 4 seconds
Installing different package versions 50 seconds
Running and plotting the test cases 6 minutes and 53 seconds

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.01%. Comparing base (f3bde87) to head (03cd5af).

Additional details and impacted files
@@                Coverage Diff                @@
##           utf8-old-windows    #7832   +/-   ##
=================================================
  Coverage             99.01%   99.01%           
=================================================
  Files                    88       88           
  Lines                 17286    17286           
=================================================
  Hits                  17116    17116           
  Misses                  170      170           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MichaelChirico
MichaelChirico changed the base branch from other-attach-order to test-err-show-diff July 24, 2026 13:58
@MichaelChirico
MichaelChirico force-pushed the occasional-fix branch 2 times, most recently from 44d6f05 to 8917b16 Compare July 24, 2026 14:21
@MichaelChirico
MichaelChirico force-pushed the test-err-show-diff branch 2 times, most recently from 6f23983 to f93fce1 Compare July 24, 2026 16:48
@MichaelChirico
MichaelChirico force-pushed the occasional-fix branch 4 times, most recently from c6a3e01 to ab2efd5 Compare July 24, 2026 22:35
@MichaelChirico
MichaelChirico changed the base branch from test-err-show-diff to fix-latvian-tests July 26, 2026 17:04
@MichaelChirico
MichaelChirico force-pushed the fix-latvian-tests branch 2 times, most recently from 995819c to d56f300 Compare July 26, 2026 20:46
@MichaelChirico
MichaelChirico force-pushed the occasional-fix branch 2 times, most recently from 1341050 to 03cd5af Compare July 28, 2026 16:17
@MichaelChirico MichaelChirico changed the title Handle _R_CHECK_DEPENDS_ONLY_ correctly for other.Rraw to work in -occasional CI Updates for R-CMD-check-occasional to pass with minimal CI noise Jul 28, 2026
@MichaelChirico
MichaelChirico force-pushed the utf8-old-windows branch 2 times, most recently from 40bd8d6 to a0a8500 Compare July 28, 2026 20:26
@MichaelChirico
MichaelChirico changed the base branch from utf8-old-windows to master July 28, 2026 20:46
@MichaelChirico

Copy link
Copy Markdown
Member Author

Merging: this only touches the R-CMD-check-occasional GHA config, which should be in good shape starting from the next monthly run.

@MichaelChirico
MichaelChirico merged commit eb601fe into master Jul 28, 2026
6 of 10 checks passed
@MichaelChirico
MichaelChirico deleted the occasional-fix branch July 28, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant