Project

Profile

Help

Task #5968

Actually implement filters for PublicationViewset

Added by gmbnomis 10 months ago. Updated 9 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Problem

pulpcore defines functional tests to verify filtering publications by repository_version, distributions, and pulp_created (see
https://github.com/pulp/pulpcore/blob/master/pulpcore/tests/functional/api/using_plugin/test_crd_publications.py#L93-L132).

Funnily enough, PublicationViewset defines no filters, but the tests pass. That's because DRF simply ignores the filter parameters in this case and returns all publications. Since there is a single publication overall in these tests, this result isn't any different from the result a proper filter implementation would return.

Solution

  1. Decide which filters to actually implement (proposal: at least repository_version (NB it has already been noted in #5665 that this does not work))
  2. Implement these filters
  3. Include negative test cases

Related issues

Related to Pulp - Story #5665: Publications do not have a natural key and are not searchable by repository version.CLOSED - WONTFIX

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 474a5e51 View on GitHub
Added by gmbnomis 10 months ago

Allow to filter publications by repository_version and pulp_created

https://pulp.plan.io/issues/5968 ref #5968

History

#1 Updated by gmbnomis 10 months ago

  • Related to Story #5665: Publications do not have a natural key and are not searchable by repository version. added

#2 Updated by gmbnomis 10 months ago

PR for repository_version and pulp_created at https://github.com/pulp/pulpcore/pull/488. And, no, I won't implement distributions (actually distribution might be better, IMHO) ;-)

I had to disable the "distributions" test for now (It fails now because there is a filter implementation that does not know about "distributions")

#3 Updated by fao89 10 months ago

  • Tracker changed from Issue to Task
  • % Done set to 0

#4 Updated by bmbouter 10 months ago

  • Sprint/Milestone set to 3.1.0

#5 Updated by bmbouter 9 months ago

  • Status changed from NEW to MODIFIED

#6 Updated by bmbouter 9 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF