#264 ODCS is broken on Pulp > 2.7
Closed 5 years ago by jkaluza. Opened 5 years ago by rohanpm.

ODCS contains some queries for Pulp repositories requesting fields nested under repo "notes", like this:

        query_data = {
            'criteria': {
                'filters': {
                    'notes.content_set': {'$in': content_sets},
                },
                'fields': ['notes.relative_url', 'notes.content_set',
                           'notes.arch', 'notes.signatures'],
            }
        }

This works with Pulp <= 2.7, where no database schema was enforced. In Pulp versions from 2.8 onwards, requesting custom fields like that doesn't work. On a vanilla Pulp >= 2.8, such a query will crash.

For this code to work on recent Pulp versions, it must be updated to request only the top-level "notes" field, since that's the field present in Pulp's database schema (the nested fields being specific to Red Hat's internal installation).

                'fields': ['notes'],

("filters" doesn't need to be updated, filtering on notes.content_set will still work.)


Metadata Update from @jkaluza:
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata