Repository navigation
Check Docker Hub for the latest XCP-D release - #1639
Merged
Merged
Conversation
check_latest() queried PyPI, where XCP-D isn't published, so the "newer version available" message never appeared. Look up the pennlinc/xcp_d image tags on Docker Hub instead, skipping non-version tags such as "latest" and "unstable", plus prereleases. Also add a FAQ page with the Upgrading section that the CLI message links to.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1639 +/- ##
==========================================
+ Coverage 83.19% 83.42% +0.23%
==========================================
Files 58 58
Lines 8094 8111 +17
Branches 1137 1139 +2
==========================================
+ Hits 6734 6767 +33
+ Misses 1014 1000 -14
+ Partials 346 344 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Changes proposed in this pull request
check_latest()looked up the latest release on PyPI. XCP-D has never been published there (https://pypi.org/pypi/xcp_d/jsonreturns 404), so the request always failed silently and the "a newer version of XCP-D is available" message never printed.This PR points
check_latest()at thepennlinc/xcp_dimage tags on Docker Hub:latest,unstable) and prerelease tags are skipped. The highest remaining version wins.nextlinks, up to 5 pages of 100 tags each (there are 77 tags today).~/.cache/xcp_d/latestis unchanged.None, so the check is skipped as before.The flagged-version check (
is_flagged(), which reads.versions.jsonfrom GitHub) already worked and is unchanged.New unit tests in
xcp_d/tests/test_cli_version.pymockrequests.get, so they need no network. They cover tag filtering, pagination, failure handling, and the cache. Run against the real API, the lookup returns26.2.0.Documentation that should be reviewed
docs/faq.rstwith an Upgrading section (anchor#upgrading), which the CLI upgrade message already links to (faq.html#upgrading). It explains the two startup checks, when to upgrade (and why not to mix versions mid-study), and how to upgrade with Docker, Apptainer, or pip.docs/index.rst: FAQ added to the toctree.I didn't build the docs locally.
Related PRs
The same change in the other PennLINC BIDS Apps:
.versions.jsonflagging.versions.jsonflagging🤖 Generated with Claude Code