Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taught pulp-export process to do incrementals correctly when handed f… #872

Merged
merged 1 commit into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/7403.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed pulp-export scenario where specifying full= could fail silently.
6 changes: 3 additions & 3 deletions pulpcore/app/tasks/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ def _version_match(curr_versions, prev_versions):
def _incremental_requested(the_export):
"""Figure out that a) an incremental is requested, and b) it's possible."""
the_exporter = the_export.exporter
params = the_export.params
full = bool(strtobool(params["full"])) if "full" in params else True
full = the_export.params.get("full", True)
if isinstance(full, str):
full = bool(strtobool(full))
last_exists = the_exporter.last_export
return last_exists and not full

Expand All @@ -160,7 +161,6 @@ def pulp_export(the_export):
ValidationError: When path is not in the ALLOWED_EXPORT_PATHS setting,
OR path exists and is not a directory
"""

pulp_exporter = the_export.exporter
the_export.task = Task.current()

Expand Down