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

Adds use of GetLocalUnitsStep to track which units already exist in Pulp #212

Merged
merged 1 commit into from Jan 28, 2016

Conversation

dkliban
Copy link
Member

@dkliban dkliban commented Jan 18, 2016

During conversion to mongoengine the check for already existing units
broke. This fixes that problem.

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

puppet_manifest = self._extract_metadata(module_path)
module = Module.from_metadata(puppet_manifest)
remote_unit_keys.append(module.unit_key_str)
list_of_modules.append(module)

pub_step = publish_step.GetLocalUnitsStep(importer_type=constants.IMPORTER_TYPE_ID, available_units=list_of_modules, repo=self.repo)
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the init method expects importer_type as a positional arg instead of a kwarg[0].

Also the line is a bit long (but will get shorter once importer_type isn't a kwarg, so that's okay!).

[0] https://github.com/pulp/pulp/blob/master/server/pulp/plugins/util/publish_step.py#L1182

@jeremycline jeremycline self-assigned this Jan 28, 2016
@jeremycline
Copy link
Contributor

Other than the kwarg -> arg thing, this looks good. Are there unit tests to go with this, or did all those get disabled?

During conversion to mongoengine the check for already existing units
broke. This fixes that problem.

https://pulp.plan.io/issues/1440
closes #1440
dkliban added a commit that referenced this pull request Jan 28, 2016
Adds use of GetLocalUnitsStep to track which units already exist in Pulp
@dkliban dkliban merged commit 25e4a85 into pulp:master Jan 28, 2016
@dkliban dkliban deleted the 1440 branch January 28, 2016 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants