Skip to content

Respect Domain redirect setting for container blobs - #2596

Merged
gerrod3 merged 1 commit into
pulp:mainfrom
dralley:respect-domain-object-storage-redirects
Oct 27, 2026
Merged

gerrod3 merged 1 commit into
pulp:mainfrom
dralley:respect-domain-object-storage-redirects

Conversation

@dralley

@dralley dralley commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

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

local_registry.pull(local_path)


def test_blob_redirect_uses_domain_setting_with_rustfs(

@dralley dralley Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@gerrod3 gerrod3 Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@dralley
dralley force-pushed the respect-domain-object-storage-redirects branch from ca4c7ab to 5658666 Compare October 27, 2026 18:32
@gerrod3
gerrod3 enabled auto-merge (rebase) October 27, 2026 19:34
@gerrod3
gerrod3 merged commit 9efcff4 into pulp:main Oct 27, 2026
25 of 27 checks passed
@patchback

patchback Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Backport to 2.30: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.30/9efcff4b90a9023f550cb19bb62f2f593b7aa18a/pr-2596

Backported as #2616

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Backport to 2.29: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.29/9efcff4b90a9023f550cb19bb62f2f593b7aa18a/pr-2596

Backported as #2617

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Backport to 2.27: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.27/9efcff4b90a9023f550cb19bb62f2f593b7aa18a/pr-2596

Backported as #2618

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Backport to 2.26: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.26/9efcff4b90a9023f550cb19bb62f2f593b7aa18a/pr-2596

Backported as #2619

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@dralley
dralley deleted the respect-domain-object-storage-redirects branch October 27, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants