Skip to content

Skip deprecated package check when the status file is unavailable - #273

Merged
LiNk-NY merged 2 commits into
develfrom
status-file-download-failure
Dec 2, 2026
Merged

LiNk-NY merged 2 commits into
develfrom
status-file-download-failure

Conversation

@LiNk-NY

@LiNk-NY LiNk-NY commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

BiocCheck halts at "Checking for deprecated package usage" when it cannot download the Bioconductor package status file, as seen in an r-universe Bioc build of GSALightning:

* Checking for deprecated package usage...
Warning: download failed
  web resource path: 'https://bioconductor.org/checkResults/3.23/bioc-LATEST/meat-index.dcf'
  reason: Failed to perform HTTP request.
Error in bfcrpath(bfc, rnames = url, exact = TRUE, download = TRUE, rtype = "web") :
  not all 'rnames' found or unique.

The file was available; the runner's connection failed briefly. A network failure should not stop BiocCheck.

Cause
get_status_file_cache() lets BiocFileCache errors propagate:

  • With no cached copy, a failed download makes bfcrpath() error, as above.
  • With a cached copy that cannot be refreshed, e.g., offline, bfcneedsupdate() reports that an update is needed, then bfcdownload() errors, so the cached copy is never used.

Change

  • get_status_file_cache() keeps the cached copy when the refresh fails, and returns NA when there is no cached copy and the download fails.
  • get_deprecated_status() skips that Bioconductor version with an info message when the status file is NA, following the existing handleMessage("Unable to access ...") pattern for network failures.
  • When BiocManager cannot determine the release or devel version (e.g., offline), BiocManager:::.version_bioc() returns an explanation string rather than a version, which was being pasted into the URL. That version is now also skipped with a message.
  • Warnings from BiocFileCache and BiocManager are left visible.

Offline, the check now prints:

* Checking for deprecated package usage...
Warning in download.file(..., destfile = tmp_config, quiet = TRUE) :
  URL 'https://bioconductor.org/config.yaml': status was 'Could not connect to server'
...
ℹ Unable to determine the Bioconductor release version; skipping the deprecated
package check for that version
ℹ Unable to determine the Bioconductor devel version; skipping the deprecated
package check for that version

Checks

  • Added tests to inst/tinytest/test_BiocCheck.R that use a temporary cache and need no network: an unreachable URL returns NA, and a cached file:// source that is then deleted still returns the cached copy unchanged. Both cases error with the previous code.
  • Fully offline, checkDeprecatedPackages() completes with no errors, warnings, or notes recorded.
  • test_BiocCheck.R passes 150 of 150 on R-devel with Bioc 3.25. R CMD check is left to CI.
  • Updated NEWS.

This PR was drafted with the help of Claude Code (Claude Opus 5.5).

🤖 Generated with Claude Code

LiNk-NY and others added 2 commits December 2, 2026 13:43
get_status_file_cache() let BiocFileCache errors propagate, so a failed
download of meat-index.dcf halted BiocCheck with "not all 'rnames'
found or unique." When a cached copy existed but could not be
refreshed, e.g., offline, bfcdownload() also errored instead of using
the cached copy.

Keep the cached copy when the refresh fails, and return NA when there
is no copy and the download fails. get_deprecated_status() then skips
that version with a message, as it now also does when BiocManager
cannot determine the release or devel version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.07%. Comparing base (8444e1c) to head (ebcec52).

Files with missing lines Patch % Lines
R/util.R 68.96% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #273      +/-   ##
==========================================
- Coverage   70.19%   70.07%   -0.12%     
==========================================
  Files          15       15              
  Lines        2768     2787      +19     
==========================================
+ Hits         1943     1953      +10     
- Misses        825      834       +9     

☔ 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.

@LiNk-NY
LiNk-NY merged commit bab59ed into devel Dec 2, 2026
3 of 5 checks passed
@LiNk-NY
LiNk-NY deleted the status-file-download-failure branch December 2, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant