Conversation
pablomh
force-pushed
the
replica-remote-download-policy
branch
2 times, most recently
from
August 27, 2026 08:31
fc37121 to
4745030
Compare
pablomh
force-pushed
the
replica-remote-download-policy
branch
from
August 27, 2026 08:36
4745030 to
9b931ed
Compare
pablomh
force-pushed
the
replica-remote-download-policy
branch
from
August 27, 2026 09:52
9b931ed to
b45c5d5
Compare
Contributor
Author
|
CI error seems unrelated and pre-existing. |
gerrod3
requested changes
Sep 8, 2026
Contributor
There was a problem hiding this comment.
Don't think we need these unit tests.
Contributor
Author
There was a problem hiding this comment.
Removed after rebase.
Contributor
There was a problem hiding this comment.
Note that this migration will need to be rebased from main.
pablomh
force-pushed
the
replica-remote-download-policy
branch
from
September 16, 2026 17:12
b45c5d5 to
5016cbe
Compare
pablomh
force-pushed
the
replica-remote-download-policy
branch
from
September 16, 2026 17:15
5016cbe to
fcd20f3
Compare
replicate() never set Remote.policy, so new remotes defaulted to immediate and downloaded all artifacts. Let UpstreamPulp carry the intended download policy so Capsules can replicate with on_demand. Always include policy in the remote settings dict so that clearing remote_policy (setting it to null) correctly reverts existing remotes back to Remote.IMMEDIATE instead of leaving the old value stale. Assisted-By: Cursor Co-authored-by: Cursor <cursoragent@cursor.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pablomh
force-pushed
the
replica-remote-download-policy
branch
from
September 16, 2026 22:08
fcd20f3 to
01e4c13
Compare
The generated Python client uses exclude_none=True in model_dump(), which silently drops None values from raw dicts. By constructing the PatchedUpstreamPulp model explicitly, Pydantic tracks remote_policy in model_fields_set and serializes it as null in the PATCH body. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pablomh
force-pushed
the
replica-remote-download-policy
branch
from
September 17, 2026 19:30
d3d1daa to
429c5a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
replicate()never received an explicit download policy, so they usedRemote.policy's default (immediate) and downloaded all artifacts.UpstreamPulp.remote_policy(immediate/on_demand/streamed) and copy it onto remotes via_build_remote_settings()when set. When unset (null), remotes are explicitly set toRemote.IMMEDIATEso that clearingremote_policyafter a previous non-default value correctly reverts existing remotes.UpstreamPulp.policy(all/labeled/nodelete). Katello can setremote_policy=on_demandfor Capsules._build_remote_settings()as a standalone function for the shared remote field mapping, replacing the inline dict.Test plan
_build_remote_settingsreturnsRemote.IMMEDIATEwhenremote_policyis unset and includes it when set toon_demandtest_replication_remote_policy— create withon_demand, update tostreamed, clear tonull(verify revert toimmediate)test_replication_remote_settings_propagation— asserts defaultimmediatewhenremote_policyis not setMade with Cursor