Skip to content

Commit

Permalink
Stream artifacts from content-app if using non-local filesystem storage
Browse files Browse the repository at this point in the history
This commit removes the check against `REDIRECT_TO_OBJECT_STORAGE` from
the Registry handler that caused Pulp to stream content only when a user
opted for it. Now, the content is always streamed from content-app when
using non-local filesystem storage.

closes pulp#1493
  • Loading branch information
lubosmj committed Jun 17, 2024
1 parent a2c0839 commit ea17fa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES/1493.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed a bug that caused intermittent failures during the pull-through caching when using non-local
filesystem storage.
4 changes: 1 addition & 3 deletions pulp_container/app/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ async def _dispatch(artifact, headers):
if not os.path.exists(path):
raise Exception("Expected path '{}' is not found".format(path))
return web.FileResponse(path, headers=full_headers)
elif not settings.REDIRECT_TO_OBJECT_STORAGE:
return ArtifactResponse(artifact=artifact, headers=headers)
else:
raise NotImplementedError("Redirecting to this storage is not implemented.")
return ArtifactResponse(artifact=artifact, headers=headers)

@RegistryContentCache(
base_key=lambda req, cac: Registry.find_base_path_cached(req, cac),
Expand Down

0 comments on commit ea17fa7

Please sign in to comment.