-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add validation of existing packages to sync #100
Conversation
Tests will follow. |
@@ -59,6 +73,8 @@ def __init__(self, repo, conduit, config): | |||
self.components = split_or_none(self.get_config().get('components')) | |||
self.remove_missing = self.get_config().get_boolean( | |||
constants.CONFIG_REMOVE_MISSING_UNITS, constants.CONFIG_REMOVE_MISSING_UNITS_DEFAULT) | |||
self.validate = repo_controller.check_perform_full_sync( | |||
self.repo.id, self.conduit, self.config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized by looking at how the tests fail, that this is not the option i was looking for...
a9e6862
to
5bdaf21
Compare
@@ -230,7 +230,7 @@ def test_SaveDownloadedUnits(self): | |||
|
|||
repo = self.repo.repo_obj | |||
for path, unit in path_to_unit.items(): | |||
unit.save_and_associate.assert_called_once_with(path, repo) | |||
unit.save_and_associate.assert_called_once_with(path, repo, force=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this default to False
on its own?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but the function will actually be called with an explicit False
in the new version.
@@ -59,6 +73,7 @@ def __init__(self, repo, conduit, config): | |||
self.components = split_or_none(self.get_config().get('components')) | |||
self.remove_missing = self.get_config().get_boolean( | |||
constants.CONFIG_REMOVE_MISSING_UNITS, constants.CONFIG_REMOVE_MISSING_UNITS_DEFAULT) | |||
self.validate = self.get_config().get_boolean(importer_constants.KEY_VALIDATE, False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand this correctly we are now deciding between verifying or not verifying based on an importer setting?
How does this compare to how RPM and others are handling advanced sync options?
cc6c855
to
4576a3c
Compare
The test are failing due to pulp/pulp#3946 |
If the repair_sync option is true on sync, existing packages are validated and, if needed, rescheduled for download. closes #5170 https://pulp.plan.io/issues/5170
4576a3c
to
d05bf73
Compare
Are we ready to merge this? |
Test whether repair_sync triggers the redownload of units
I promised tests. Added a test to check the unit validation code. |
@mibanescu as this is pulp2, may i ask you to have a look? |
If force full mode is active, existing packages are validated and if needed
rescheduled for download.
closes #5170
https://pulp.plan.io/issues/5170