Project

Profile

Help

Task #1578

Incoming searches should be translated by the model

Added by amacdona@redhat.com over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

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

Description

Due to the mongoengine conversion, some database field names had to change, including most fields called "id". Therefore, incoming search criteria objects must be translated from the old field names (to maintain backwards compatibility of the REST api) to the new field names so they can be used to search the database. Currently, this process is done generally in the ModelSerializer class; however, each collection is different enough that translating generally is problematic and full of edge cases.

A function to translate criteria should be defined on each model that has exposed search API endpoint.

Translation should be removed from the custom queryset and should instead be called by the generic search view.
https://github.com/pulp/pulp/blob/a0e637e004518d65ce6374f615ed45c991b12234/server/pulp/server/db/querysets.py#L56


Related issues

Related to Pulp - Refactor #1555: ModelSerializer translate functions should be publicCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Pulp - Issue #1503: remove Criteria import from serializersCLOSED - WONTFIX<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Pulp - Issue #1563: Content type ID searches not workingCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Pulp - Issue #1574: These Content type ID searches not workingCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Pulp - Issue #1590: Criteria object needs to be updated for use with pymongo 3CLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by amacdona@redhat.com over 4 years ago

  • Related to Refactor #1555: ModelSerializer translate functions should be public added

#2 Updated by amacdona@redhat.com over 4 years ago

  • Related to Issue #1503: remove Criteria import from serializers added

#3 Updated by amacdona@redhat.com over 4 years ago

  • Related to Issue #1563: Content type ID searches not working added

#4 Updated by amacdona@redhat.com over 4 years ago

  • Related to Issue #1574: These Content type ID searches not working added

#5 Updated by semyers over 4 years ago

  • Related to Issue #1590: Criteria object needs to be updated for use with pymongo 3 added

#6 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

#7 Updated by bmbouter over 1 year ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#8 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF