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

converted to use mongoengine #56

Merged
merged 1 commit into from
Jan 18, 2016
Merged

converted to use mongoengine #56

merged 1 commit into from
Jan 18, 2016

Conversation

mhrivnak
Copy link
Contributor

@mhrivnak mhrivnak commented Jan 3, 2016

converted to use mongoengine

fixes #877
fixes #1465

https://pulp.plan.io/issues/877
https://pulp.plan.io/issues/1465

1465 was fixed by accident in the course of doing the conversion

@bmbouter bmbouter self-assigned this Jan 4, 2016
'checksum_type': p.metadata['_checksum_type'],
fields = ('version', '_filename', '_checksum', '_checksum_type', 'name', '_storage_path')
unit_querysets = repo_controller.get_unit_model_querysets(repo_id, models.Package)
unit_querysets = (q.only(*fields) for q in unit_querysets)
Copy link
Member

Choose a reason for hiding this comment

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

👍

@bmbouter
Copy link
Member

bmbouter commented Jan 4, 2016

Does there need to be any migrations for this? The data layer should stay the same, but what about dropping old indexes since new ones will be created that may be slightly different. Typically the other conversions have had some index migration work and docs made for them. I'm not sure in this case.

@bmbouter
Copy link
Member

bmbouter commented Jan 4, 2016

Once merged, the Python models should be added to the validation_script. Perhaps the validation script should be refactored to test with all models as discovered through entry points? That would handle this problem more generally across the plugins without having to update the validation script each time. What do you think?

@bmbouter
Copy link
Member

bmbouter commented Jan 4, 2016

I'm done w/ the review. There are some comments to handle, but I don't need to re-review as long as you're satisfied. I'm not sure why travis and jenkins aren't happy, but my local tests ran fine so I think it's ok to merge red in this case.

@bmbouter bmbouter assigned mhrivnak and unassigned bmbouter Jan 4, 2016
@mhrivnak
Copy link
Contributor Author

mhrivnak commented Jan 5, 2016

There were only two indexes present before the conversion, and they are both created identically by mongoengine. There is an additional index created by mongoengine, which it does create successfully during upgrade. So I think we're ok without a migration.

@mhrivnak
Copy link
Contributor Author

mhrivnak commented Jan 5, 2016

I think this is ready to merge, but I'd like @rbarlow to at least take a glance at it first.

@mhrivnak mhrivnak assigned bowlofeggs and unassigned mhrivnak Jan 5, 2016
@mhrivnak
Copy link
Contributor Author

ok test

"""
Injects download requests into the call to the parent class's __init__
"""
kwargs['downloads'] = self.generate_download_requests()

Choose a reason for hiding this comment

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

Since downloads is a required param, it should be listed explicitly in the method parameters and have the standard docblock entries.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

downloads is not a required param. In fact if a caller did pass it in, we overwrite that value here.

Choose a reason for hiding this comment

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

On Thu, Jan 14, 2016 at 06:23:54AM -0800, Michael Hrivnak wrote:

  •    kwargs['downloads'] = self.generate_download_requests()
    

downloads is not a required param. In fact if a caller did pass it in, we overwrite that value here.

Ugh, I really hope I only wrote that because I hadn't had enough coffee
yet. Speaking of which, is it… coffee time?

Randy Barlow
irc: bowlofeggs

@bowlofeggs
Copy link

I think you should make that downloads parameter be explicit before merging, but other than that LGTM.

fixes #877
fixes #1465

https://pulp.plan.io/issues/877
https://pulp.plan.io/issues/1465

1465 was fixed by accident in the course of doing the conversion
@mhrivnak
Copy link
Contributor Author

Scratch builds passed on rhel6, rhel7, and f23.

mhrivnak added a commit that referenced this pull request Jan 18, 2016
converted to use mongoengine
@mhrivnak mhrivnak merged commit f48f238 into pulp:master Jan 18, 2016
@mhrivnak mhrivnak deleted the mongoengine branch January 18, 2016 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants