Repository navigation
Add test that package to Windows images - #18830
Merged
Merged
Conversation
Windows CI started failing the r/testthat test scope after #18822 removed the --scope restriction that was excluding it, because nothing in the Windows dependency-provisioning scripts ever installed testthat (or any other R package) -- unlike Linux/macOS, which install a default package set via dependencies/common/install-packages. Add the same default package list to the Windows counterpart, installed from CRAN since there is no per-platform Windows renv.lock. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Mirror the Unix install-packages script's dir.create(Sys.getenv("R_LIBS_USER"))
step so a fresh non-admin Windows setup, where the site library isn't
writable and the per-user library doesn't exist yet, doesn't fail before
installing testthat and the other defaults.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
install.packages() reports per-package failures as warnings rather than errors, so R's exit code (and the ERRORLEVEL check around it) didn't catch a partial failure -- e.g. testthat could silently fail to install while the script reported success. Verify every requested package actually installed and stop() if any are missing. Also check ERRORLEVEL after calling install-packages.cmd from install-dependencies.cmd, which previously ignored its exit code and kept installing later dependencies even after a failure. Co-Authored-By: Claude Sonnet 5 <[email protected]>
R computes .libPaths() at startup and only includes R_LIBS_USER if that directory already exists; creating it later in the same R process (via dir.create()) doesn't retroactively add it. On a fresh machine where the user library doesn't exist yet, install.packages() would still miss it and fall back to (or fail against) the site/system library. Explicitly prepend the user library to .libPaths() after creating it. Co-Authored-By: Claude Sonnet 5 <[email protected]>
gtritchie
approved these changes
Sep 15, 2026
gtritchie
left a comment
Member
There was a problem hiding this comment.
LGTM! Thanks for taking care of this.
RStudio E2E - all platformsAll tests passed!
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
This was referenced Sep 15, 2026
gtritchie
added a commit
that referenced
this pull request
Sep 15, 2026
* Revert "Add test that package to Windows images (#18830)" This reverts commit ef7fd98. The Windows CI image installs R 3.6.3 (docker/jenkins/Dockerfile.windows), and CRAN serves no Windows binaries below bin/windows/contrib/4.0 -- the 3.6 directory is a 404. Current sources don't work either: testthat 3.3.2 and purrr 1.2.2 require R >= 4.1.0, rlang 1.3.0 requires R >= 4.0.0. So install.packages() could never satisfy the package list, and the stop() this change added on missing packages failed the RUN layer, which failed the whole image build. Hourly build 2332, triggered 33 seconds after the merge, failed the windows cell of Rebuild Docker Images but still ran Setup and Trigger Builds, so windows-pipeline 3858 built against the unchanged jenkins/ide:windows-x86_64-blue-mistflower-msvc145 tag and the r scope failed the same way as before. Getting testthat onto the Windows image needs either a newer R in the image or package versions pinned to ones that support R 3.6. * Revert "Run all test scopes on Windows CI (#18822)" This reverts commit 3dd87a5. Restore --scope core,rsession so Windows CI stops failing on the r scope, which needs testthat. The image can't install it while it ships R 3.6.3 (see the companion revert of #18830). Addresses #17825.
This branch was successfully deployed
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.
Intent
Windows builds are failing because there's no test that R package, now that we're running
rstudio-tests.batwithout any scopes (see #18822 )Approach
Automated Tests
QA Notes
Documentation
Checklist
NEWS.md