Skip to content

Commit

Permalink
fix: Update the registry matching pattern (#79)
Browse files Browse the repository at this point in the history
* fix: Update the registry matching pattern
* fix: Update to just look for http
* fix: Add reference to origination issue
* docs: Bump version and update changelog
* fix: Update changelog and remove extra version
* fix: Run pre-commits

Signed-off-by: Heck, Jerod <[email protected]>
  • Loading branch information
jhlmco authored Mar 4, 2023
1 parent c817740 commit d17bb93
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
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:
# 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

0 comments on commit d17bb93

Please sign in to comment.