Repository navigation
Conversation
victorlin
approved these changes
Nov 11, 2026
victorlin
left a comment
Member
There was a problem hiding this comment.
Thanks for reporting. I have noticed the bug in certain situations such as nextstrain shell --image localhost:5000/nextstrain/base:latest. A workaround is to drop :latest, but that's tag-specific and actually goes the wrong path in split_image_name() with repository=localhost and tag=5000/nextstrain/base. It doesn't end up mattering much because the function is only called while checking whether the image supports /nextstrain/env.d. The new behavior is an improvement.
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.
Slot 428 — PR body for nextstrain/cli
Bug
nextstrain.cli.util.split_image_namecrashes withValueError: too many values to unpackon Docker image names whose registry includes a port(e.g.
localhost:5000/nextstrain/base:build-...), because it splits on thefirst colon while a valid image reference can contain two. Private
registries with ports (
localhost:5000/...,my-registry:5000/...) arecommon in local development, so any
--dockerruntime path using such animage fails with a traceback.
Repro (before fix):
Fix
nextstrain/cli/util.py(split_image_name): split on the last colon,and only treat it as a tag separator when it comes after the last slash
(Docker semantics: the repository part may itself contain a colon for a
registry port).
localhost:5000/nextstrain/base(no tag) now correctlyresolves to
('localhost:5000/nextstrain/base', 'latest')instead ofcrashing, and all previously working inputs behave exactly as before.
Test
Extended the function's doctests (the repo runs
--doctest-modulesovernextstrain/) with the registry-port cases. Verified the new cases crash onthe old code (
ValueError) andpytest --doctest-modules nextstrain/cli/util.py→ 4 passed after the fix.