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

Content contained in RepoVer and Publication #1245

Merged
merged 1 commit into from
May 6, 2021

Conversation

pavelpicka
Copy link
Collaborator

Views to show repository_versions or publications which contain specific content.

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

@pulpbot
Copy link
Member

pulpbot commented Apr 9, 2021

Attached issue: https://pulp.plan.io/issues/4832

pulpcore/app/urls.py Outdated Show resolved Hide resolved
@daviddavis
Copy link
Contributor

Some tests would be lovely 😺

@pavelpicka pavelpicka force-pushed the 4832-content-with branch 2 times, most recently from 1ec294a to 1d3cf57 Compare April 9, 2021 12:40
Copy link
Contributor

@daviddavis daviddavis left a comment

Choose a reason for hiding this comment

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

One suggestion for a comment about ListRepositoryVersionViewSet. Other then that, LGTM.

@pavelpicka
Copy link
Collaborator Author

@daviddavis comment about viewset added.

@@ -504,6 +532,10 @@ def versions_containing_content(cls, content):
Returns:
django.db.models.QuerySet: Repository versions which contains content.
"""
deprecation_logger(
Copy link
Member

Choose a reason for hiding this comment

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

this needs a changelog entry

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changelog entry extended by method goes deprecated message.

Copy link
Contributor

Choose a reason for hiding this comment

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

The changes listed in CHANGES are meant for end users. We need a changelog entry for plugin writers (in CHANGES/plugin_api). Also, it should use the .deprecation extension (CHANGES/plugin_api/4832.deprecation)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changelog divided to .feature and .deprecation

@pavelpicka pavelpicka force-pushed the 4832-content-with branch 2 times, most recently from cf39f8f to dd79126 Compare April 29, 2021 09:43
@daviddavis
Copy link
Contributor

I just noticed that the tests don't use bindings. It's recommended new tests should use the bindings.

@pavelpicka pavelpicka force-pushed the 4832-content-with branch 3 times, most recently from e0830c8 to 93a48fb Compare May 2, 2021 14:26
@pavelpicka
Copy link
Collaborator Author

tests are using bindings now

Copy link
Contributor

@daviddavis daviddavis left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for converting the tests.

@mdellweg @ipanova want to re-review?

Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

There is one superfluous method now. But my approval stands.

versions = list(itertools.chain.from_iterable(versions))

return qs.filter(number__in=versions)
return qs.with_content([content.pk])
Copy link
Member

Choose a reason for hiding this comment

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

the doc block for RepositoryVersionContentFilter is outdated

Copy link
Member

@ipanova ipanova left a comment

Choose a reason for hiding this comment

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

I did some basic testing it seems to do the job :)

Views to show repository_versions or publications which contains
specific content.

closes: pulp#4832
https://pulp.plan.io/issues/4832
@daviddavis daviddavis merged commit 24ad202 into pulp:master May 6, 2021
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

6 participants