Project

Profile

Help

Task #5968

closed

Actually implement filters for PublicationViewset

Added by gmbnomis over 4 years ago. Updated about 4 years 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

Actions
Actions #1

Updated by gmbnomis over 4 years ago

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

Updated by gmbnomis over 4 years 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")

Added by gmbnomis over 4 years ago

Revision 474a5e51 | View on GitHub

Allow to filter publications by repository_version and pulp_created

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

Actions #3

Updated by fao89 over 4 years ago

  • Tracker changed from Issue to Task
  • % Done set to 0
Actions #4

Updated by bmbouter over 4 years ago

  • Sprint/Milestone set to 3.1.0
Actions #5

Updated by bmbouter about 4 years ago

  • Status changed from NEW to MODIFIED
Actions #6

Updated by bmbouter about 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF