Add UpstreamPulp.remote_policy for remotes created during replication - #8016
Open
pablomh wants to merge 2 commits into
Open
Add UpstreamPulp.remote_policy for remotes created during replication#8016pablomh wants to merge 2 commits into
pablomh wants to merge 2 commits into
Conversation
pablomh
force-pushed
the
replica-remote-download-policy
branch
2 times, most recently
from
August 27, 2026 08:31
fc37121 to
4745030
Compare
Replication over HTTPS wrote the CA, client cert, and client key to NamedTemporaryFiles but only kept their paths, so CPython deleted earlier files before pulp-glue could load the upstream API with TLS verification. Keep those files alive for the duration of replicate(), pass the CA bundle path directly as verify_ssl, add regression coverage for the TLS handoff, and clean up the temp files on exit. Assisted-By: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
pablomh
force-pushed
the
replica-remote-download-policy
branch
from
August 27, 2026 08:36
4745030 to
9b931ed
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. Assisted-By: Cursor Grok 4.6 Co-authored-by: Cursor <cursoragent@cursor.com>
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. |
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. Unset keeps today's default.UpstreamPulp.policy(all/labeled/nodelete). Katello can setremote_policy=on_demandfor Capsules.Dependency
pulpcore/app/tasks/replica.py.#8013merges, this branch should be rebased ontomainagain so the PR contains only theremote_policychange.Test plan
_build_remote_settingsomitspolicywhen unset and includes it when set toon_demandtest_replication_remote_policy(create withon_demand, update tostreamed)remote_policystill creates remotes withimmediateMade with Cursor