Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update the registry matching pattern #79

Merged
merged 9 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.com/oras-project/oras-py/tree/main) (0.0.x)
- add support for tag deletion and retry decorators (0.1.16)
- patch fix to correct session url pattern, closes issue [78](https://github.com/oras-project/oras-py/issues/78) (0.1.17)
- add support for tag deletion and retry decorators (0.1.16)
- bugfix that pagination sets upper limit of 10K (0.1.15)
- pagination for tags (and general function for pagination) (0.1.14)
- expose upload_blob function to be consistent (0.1.13)
Expand Down
7 changes: 5 additions & 2 deletions oras/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,12 @@ def _get_location(
if not session_url:
return session_url

# Some registries do not return the full registry hostname
# Some registries do not return the full registry hostname. Check that
# the url starts with a protocol scheme, change tracked with:
jhlmco marked this conversation as resolved.
Show resolved Hide resolved
# https://github.com/oras-project/oras-py/issues/78
prefix = f"{self.prefix}://{container.registry}"
if not session_url.startswith(prefix):

if not session_url.startswith("http"):
session_url = f"{prefix}{session_url}"
return session_url

Expand Down
2 changes: 1 addition & 1 deletion oras/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__copyright__ = "Copyright The ORAS Authors."
__license__ = "Apache-2.0"

__version__ = "0.1.16"
__version__ = "0.1.17"
AUTHOR = "Vanessa Sochat"
EMAIL = "[email protected]"
NAME = "oras"
Expand Down