Skip to content

Commit 848ee41

Browse files
committed
Remove content app redirect for manifest fetching
fixes: #1974 Assisted by: claude-sonnet-4.6
1 parent 79d79f9 commit 848ee41

6 files changed

Lines changed: 241 additions & 478 deletions

File tree

CHANGES/1974.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Manifest data is now served directly from the registry API instead of issuing a redirect to the content app.

pulp_container/app/content.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@
1717
)
1818
]
1919
)
20-
app.add_routes([web.get(PREFIX + r"{path:.+}/manifests/{tag_name}", registry.get_tag)])

pulp_container/app/redirects.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
from django.core.exceptions import ObjectDoesNotExist
55
from django.shortcuts import redirect
66

7-
from pulp_container.app.exceptions import ManifestNotFound
8-
from pulp_container.app.utils import get_accepted_media_types
9-
from pulp_container.constants import BLOB_CONTENT_TYPE, MEDIA_TYPE
7+
from pulp_container.constants import BLOB_CONTENT_TYPE
108

119

1210
class CommonRedirects:
@@ -39,25 +37,6 @@ def redirect_to_content_app(self, content_type, content_id):
3937
)
4038
)
4139

42-
def issue_manifest_redirect(self, manifest):
43-
"""
44-
Issue a redirect for the passed manifest.
45-
"""
46-
return self.redirect_to_content_app("manifests", manifest.digest)
47-
48-
def issue_tag_redirect(self, tag):
49-
"""
50-
Issue a redirect for the passed tag.
51-
"""
52-
manifest_media_type = tag.tagged_manifest.media_type
53-
if (
54-
manifest_media_type not in get_accepted_media_types(self.request.headers)
55-
and manifest_media_type != MEDIA_TYPE.MANIFEST_V1
56-
):
57-
raise ManifestNotFound(reference=tag.name)
58-
59-
return self.redirect_to_content_app("manifests", tag.name)
60-
6140

6241
class FileStorageRedirects(CommonRedirects):
6342
"""

0 commit comments

Comments
 (0)