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

Fixes #7716 - Incremental export not enabled even if start_version is… #967

Merged
merged 1 commit into from
Oct 21, 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/7716.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed incremental export to happen if start_version provided, even if last_export is null.
3 changes: 2 additions & 1 deletion pulpcore/app/tasks/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ def _incremental_requested(the_export):
full = the_export.params.get("full", True)
if isinstance(full, str):
full = bool(strtobool(full))
starting_versions_provided = len(the_export.params.get("start_versions", [])) > 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in my env and confirm it works as desired.

last_exists = the_exporter.last_export
return last_exists and not full
return (starting_versions_provided or last_exists) and not full


def pulp_export(the_export):
Expand Down