From f6011823127e535fb37cc5c27ab36c1346ffafdc Mon Sep 17 00:00:00 2001 From: Lubos Mjachky Date: Tue, 14 May 2024 16:21:53 +0200 Subject: [PATCH] Stream artifacts from content-app if using non-local filesystem storage 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 #1493 --- CHANGES/1493.bugfix | 2 ++ pulp_container/app/registry.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 CHANGES/1493.bugfix diff --git a/CHANGES/1493.bugfix b/CHANGES/1493.bugfix new file mode 100644 index 000000000..37b7ebc2d --- /dev/null +++ b/CHANGES/1493.bugfix @@ -0,0 +1,2 @@ +Fixed a bug that caused intermittent failures during the pull-through caching when using non-local +filesystem storage. diff --git a/pulp_container/app/registry.py b/pulp_container/app/registry.py index e585cf41b..35b1b967d 100644 --- a/pulp_container/app/registry.py +++ b/pulp_container/app/registry.py @@ -89,10 +89,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),