Issue #2797
closedSingle consumer aplicability generation does not work unless profile already has applicability generated
Description
Recently the pulp team advised the katello team to start using the single consumer applicability generation api here:
POST /pulp/api/v2/consumers/UUID/actions/content/regenerate_applicability/
however this does not seem to work unless the profile has already been generated.
Steps to reproduce:
On a fresh pulp server (or a pulp server that has never had this consumer registered with its package profile):
a) sync a repository with errata (such as https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/)
b) register a consumer, upload its package profile with some older package than what is in the repo with an errata (such as walrus 0.71)
c) bind the consumer to the repository
d) generate applicability using the api above
e) fetch applicability using:
POST /pulp/api/v2/consumers/content/applicability/ with body:
{
'criteria' : { 'filters' : { 'id' : { '$in' : [UUID] } } },
'content_types' : ['errata']
}
note that the list is empty. If you generate it using this api that we have been using for years it works fine:
POST /pulp/api/v2/consumers/actions/content/regenerate_applicability/
{
'consumer_criteria' => { 'filters' : { 'id' : { '$in' => [UUID] } } }
}
Note that once the profile is generated, it seems that the single consumer api seems to work fine.
Fix criteria obj for consumer in applicability regeneration view
All kudos go to Chris (cduryee).
closes #2797 https://pulp.plan.io/issues/2797