Skip to content

Commit

Permalink
Fix rsync publishing units it shouldn't
Browse files Browse the repository at this point in the history
Fixes an issue with rsync logic where some units which have
not yet been published by the predistributor are included
with rsync publishes.

closes pulp#2791
https://pulp.plan.io/issues/2791

(cherry picked from commit 82651e0)
  • Loading branch information
dralley authored and pcreech committed Jul 5, 2017
1 parent f524040 commit a9c6d55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/pulp/plugins/rsync/publish.py
Expand Up @@ -348,6 +348,10 @@ def __init__(self, repo, publish_conduit, config, distributor_type):
else:
date_filter = None

if self.predistributor:
end_date = self.predistributor["last_publish"]
date_filter = self.create_date_range_filter(None, end_date=end_date)

self.symlink_list = []
self.content_unit_file_list = []
self.symlink_src = os.path.join(self.get_working_dir(), '.relative/')
Expand All @@ -368,10 +372,12 @@ def is_fastforward(self):
force_full |= predistributor_force_full
if entry.get("result", "error") == "error":
force_full = True

if self.last_published:
last_published = self.last_published.replace(tzinfo=None)
else:
last_published = None

if self.last_deleted:
last_deleted = self.last_deleted.replace(tzinfo=None)
else:
Expand Down

0 comments on commit a9c6d55

Please sign in to comment.