[action] [PR:4655] [sonic-package-manager]: Unpin docker-image-py and use lowercase 'azure/sonic' in registry test#394
Merged
Conversation
…re/sonic' in registry test #### What I did `docker-image-py` was pulled in unpinned (`docker-image-py>=0.1.10`). When **0.2.0** was released (2026-06-29) it changed `Reference.split_docker_domain()` to treat an uppercase first path component as a registry domain (Docker Hub repository names must be lowercase). This broke `tests/sonic_package_manager/test_registry.py::test_get_registry_for`, which resolved the reference `Azure/sonic`. The key point is that `Azure/sonic` is **not a valid Docker Hub reference** in the first place — Docker Hub namespaces must be lowercase (`Azure/...` is rejected as an invalid namespace). So instead of pinning `docker-image-py` to `==0.1.13` (#4660) or reimplementing `split_docker_domain()`, this change simply fixes the test to use the valid lowercase reference `azure/sonic` and drops the pin (`>=0.1.10`), so registry resolution and the test are correct regardless of the installed `docker-image-py` version and the build can adopt 0.2.0. It pairs with sonic-net/sonic-buildimage#28144, which stops installing `python3-regex` via apt so 0.2.0's `regex>=2026.6.28` installs cleanly. #### How I did it - `setup.py`: `docker-image-py==0.1.13` → `docker-image-py>=0.1.10` (drop the pin added in #4660). - `tests/sonic_package_manager/test_registry.py`: `resolver.get_registry_for('Azure/sonic')` → `resolver.get_registry_for('azure/sonic')`. #### How to verify it Run the package-manager registry test with `docker-image-py` 0.2.0 installed: ``` pytest tests/sonic_package_manager/test_registry.py::test_get_registry_for ``` It passes (CI green) — `azure/sonic` resolves to the `DockerHubRegistry` singleton regardless of the `docker-image-py` version. #### Previous command output (if the output of a command-line utility has changed) N/A - no user-facing command output changes. #### New command output (if the output of a command-line utility has changed) N/A - no user-facing command output changes. Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: sonic-net/sonic-utilities#4655 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
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.
What I did
docker-image-pywas pulled in unpinned (docker-image-py>=0.1.10). When 0.2.0 was released (2026-06-29) it changedReference.split_docker_domain()to treat an uppercase first path component as a registry domain (Docker Hub repository names must be lowercase). This broketests/sonic_package_manager/test_registry.py::test_get_registry_for, which resolved the referenceAzure/sonic.The key point is that
Azure/sonicis not a valid Docker Hub reference in the first place — Docker Hub namespaces must be lowercase (Azure/...is rejected as an invalid namespace). So instead of pinningdocker-image-pyto==0.1.13(#4660) or reimplementingsplit_docker_domain(), this change simply fixes the test to use the valid lowercase referenceazure/sonicand drops the pin (>=0.1.10), so registry resolution and the test are correct regardless of the installeddocker-image-pyversion and the build can adopt 0.2.0. It pairs with sonic-net/sonic-buildimage#28144, which stops installingpython3-regexvia apt so 0.2.0'sregex>=2026.6.28installs cleanly.How I did it
setup.py:docker-image-py==0.1.13→docker-image-py>=0.1.10(drop the pin added in #4660).tests/sonic_package_manager/test_registry.py:resolver.get_registry_for('Azure/sonic')→resolver.get_registry_for('azure/sonic').How to verify it
Run the package-manager registry test with
docker-image-py0.2.0 installed:It passes (CI green) —
azure/sonicresolves to theDockerHubRegistrysingleton regardless of thedocker-image-pyversion.Previous command output (if the output of a command-line utility has changed)
N/A - no user-facing command output changes.
New command output (if the output of a command-line utility has changed)
N/A - no user-facing command output changes.
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com