Project

Profile

Help

Task #1578

closed

Incoming searches should be translated by the model

Added by amacdona@redhat.com almost 9 years ago. Updated over 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
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 - CURRENTRELEASEsemyers

Actions
Related to Pulp - Issue #1503: remove Criteria import from serializersCLOSED - WONTFIXActions
Related to Pulp - Issue #1563: Content type ID searches not workingCLOSED - CURRENTRELEASEsemyersActions
Related to Pulp - Issue #1574: These Content type ID searches not workingCLOSED - CURRENTRELEASEamacdona@redhat.comActions
Related to Pulp - Issue #1590: Criteria object needs to be updated for use with pymongo 3CLOSED - CURRENTRELEASEpcreechActions
Actions #1

Updated by amacdona@redhat.com almost 9 years ago

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

Updated by amacdona@redhat.com almost 9 years ago

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

Updated by amacdona@redhat.com almost 9 years ago

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

Updated by amacdona@redhat.com almost 9 years ago

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

Updated by semyers almost 9 years ago

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

Updated by bmbouter over 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #7

Updated by bmbouter over 5 years 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.

Actions #8

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF