Skip to content

Commit

Permalink
Replica - stop assuming every plugin supports publications
Browse files Browse the repository at this point in the history
Pulpcore no longer assumes that every plugin which implements support
for the Replication feature supports publications (e.g. container
doesn't).

closes #5464

(cherry picked from commit 37e076b)
  • Loading branch information
MichalPysik authored and ggainey committed Jun 14, 2024
1 parent 41703c7 commit 18ebe3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES/5464.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Pulpcore no longer assumes that every plugin implementing the Replication feature supports
Publications.
4 changes: 3 additions & 1 deletion pulpcore/app/replica.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def remote_extra_fields(self, upstream_distribution):
return {}

def create_or_update_remote(self, upstream_distribution):
if not upstream_distribution["repository"] and not upstream_distribution["publication"]:
if not upstream_distribution.get("repository") and not upstream_distribution.get(
"publication"
):
return None
url = self.url(upstream_distribution)
remote_fields_dict = {"url": url}
Expand Down

0 comments on commit 18ebe3d

Please sign in to comment.