Repository navigation
Respect Domain redirect setting for container blobs - #2596
Conversation
| local_registry.pull(local_path) | ||
|
|
||
|
|
||
| def test_blob_redirect_uses_domain_setting_with_rustfs( |
There was a problem hiding this comment.
I'm not sure I like the tests very much, or at least they could probably use some reworking. Would you rather just accept the fix for now (alone)?
There was a problem hiding this comment.
Yeah we can remove the test for now. A unit test might make more sense here.
| if ( | ||
| domain.storage_class == "pulpcore.app.models.storage.FileSystem" | ||
| or not settings.REDIRECT_TO_OBJECT_STORAGE | ||
| or not domain.redirect_to_object_storage |
There was a problem hiding this comment.
How likely is it for the domain to have the wrong setting? Do we need to take any special care to avoid changing this in a way that might break things for some people, or continue respecting the settings.REDIRECT_TO_OBJECT_STORAGE flag if set?
There was a problem hiding this comment.
The only user I can think of that uses the container plugin with object storage and no domains, is the one we meet with on Wednesdays. Might impact them I guess since they just use the default domain and IIRC they don't use redirect, which is the default domain setting?
There was a problem hiding this comment.
The default domain gets the setting from the settings file. After each migration we update the default domain instance with what is currently set. If they have the setting set, then it is probably already set on the default domain as well, so I don't believe there will be any issue.
Choose the registry blob redirect path from the Domain setting instead of the global default. Generated by: Codex
ca4c7ab to
5658666
Compare
Backport to 2.30: 💚 backport PR created✅ Backport PR branch: Backported as #2616 🤖 @patchback |
Backport to 2.29: 💚 backport PR created✅ Backport PR branch: Backported as #2617 🤖 @patchback |
Backport to 2.27: 💚 backport PR created✅ Backport PR branch: Backported as #2618 🤖 @patchback |
Backport to 2.26: 💚 backport PR created✅ Backport PR branch: Backported as #2619 🤖 @patchback |
Choose the registry blob redirect path from the Domain setting instead of the global default. This keeps container responses consistent with the content app for non-default Domains.
Generated by: Codex