Skip to content

Commit

Permalink
Makes pulp_container compatible with pulpcore 3.40
Browse files Browse the repository at this point in the history
closes: #1399
  • Loading branch information
dkliban committed Nov 2, 2023
1 parent 9ead8f7 commit 958c7f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES/1399.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Made pulp_container compatible with pulpcore 3.40.
2 changes: 2 additions & 0 deletions pulp_container/app/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def __init__(self, base_key=None, expires_ttl=None, auth=None):
class RegistryContentCache(RegistryCache, AsyncContentCache):
"""A wrapper around the Redis content cache handler tailored for the content application."""

ADD_TRAILING_SLASH = False

def make_key(self, request):
"""Make a key composed of the request's path, method, host, and accept header."""
accept_header = ",".join(sorted(request.headers.getall("accept", [])))
Expand Down
4 changes: 2 additions & 2 deletions pulp_container/app/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def get_tag(self, request):

path = request.match_info["path"]
tag_name = request.match_info["tag_name"]
distribution = await sync_to_async(self._match_distribution)(path)
distribution = await sync_to_async(self._match_distribution)(path, add_trailing_slash=False)
await sync_to_async(self._permit)(request, distribution)
repository_version = await sync_to_async(distribution.get_repository_version)()
if not repository_version:
Expand Down Expand Up @@ -222,7 +222,7 @@ async def get_by_digest(self, request):

path = request.match_info["path"]
digest = "sha256:{digest}".format(digest=request.match_info["digest"])
distribution = await sync_to_async(self._match_distribution)(path)
distribution = await sync_to_async(self._match_distribution)(path, add_trailing_slash=False)
await sync_to_async(self._permit)(request, distribution)
repository_version = await sync_to_async(distribution.get_repository_version)()
if not repository_version:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ecdsa>=0.14,<=0.18.0
jsonschema>=4.4,<4.20
pulpcore>=3.25.0,<3.40
pulpcore>=3.40.1,<3.55
pyjwkest>=1.4,<=1.4.2
pyjwt[crypto]>=2.4,<2.9

0 comments on commit 958c7f7

Please sign in to comment.