Project

Profile

Help

Issue #4654

Modulemd profiles not getting removed from the consumer

Added by paji@redhat.com 8 months ago. Updated 6 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
2.19.1
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 52

Description

I have consumer "integration_test_consumer_support" registered to pulp. It has 1 module enabled. When I try to delete all modulemd profiles belonging to this consumer, it simple gets ignored.

# before profile delete
$ curl -k -u admin:admin https://localhost/pulp/api/v2/consumers/integration_test_consumer_support/profiles/
[{"profile": [{"context": "deadbeef", "version": "20180730223407", "arch": "noarch", "name": "kangaroo", "stream": "0"}], "_href": "/pulp/api/v2/consumers/integration_test_consumer_support/profiles/modulemd/", "_ns": "consumer_unit_profiles", "profile_hash": "f69375f21b302f40025ff8a2128004e81436407554972029cbfbe445d0a2b563", "consumer_id": "integration_test_consumer_support", "content_type": "modulemd", "_id": {"$oid": "5cab7b49db284e2341a2c0ac"}, "id": "5cab7b49db284e2341a2c0ac"}]

# Delete profile
curl -X "DELETE" -k -u admin:admin https://localhost/pulp/api/v2/consumers/integration_test_consumer_support/profiles/modulemd/ 

# after profile delete
curl -k -u admin:admin https://localhost/pulp/api/v2/consumers/integration_test_consumer_support/profiles/
[{"profile": [{"context": "deadbeef", "version": "20180730223407", "arch": "noarch", "name": "kangaroo", "stream": "0"}], "_href": "/pulp/api/v2/consumers/integration_test_consumer_support/profiles/modulemd/", "_ns": "consumer_unit_profiles", "profile_hash": "f69375f21b302f40025ff8a2128004e81436407554972029cbfbe445d0a2b563", "consumer_id": "integration_test_consumer_support", "content_type": "modulemd", "_id": {"$oid": "5cab7b49db284e2341a2c0ac"}, "id": "5cab7b49db284e2341a2c0ac"}]

Related issues

Copied to Pulp - Test #4823: Modulemd profiles not getting removed from the consumer NEW Actions

Associated revisions

Revision dd8c30ef View on GitHub
Added by ttereshc 7 months ago

Remove consumer profiles by id

Each profile is a dictionary. It's not reliable to use nested
dictionaries in criteria to remove a document from a collection
because Python doesn't guarantee key order in a dictionary
but it's important for MongoDB.
The solution is to remove by id, the rest of criteria is redundant.

closes #4654
https://pulp.plan.io/issues/4654

Revision 5e2a3ef7 View on GitHub
Added by ttereshc 6 months ago

Remove consumer profiles by id

Each profile is a dictionary. It's not reliable to use nested
dictionaries in criteria to remove a document from a collection
because Python doesn't guarantee key order in a dictionary
but it's important for MongoDB.
The solution is to remove by id, the rest of criteria is redundant.

closes #4654
https://pulp.plan.io/issues/4654

(cherry picked from commit dd8c30efd9896f1fa62feb8127e0b10e9a8c6218)

History

#1 Updated by ttereshc 7 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 51

#2 Updated by bmbouter 7 months ago

  • Tags Pulp 2 added

#3 Updated by daviddavis 7 months ago

  • Sprint changed from Sprint 51 to Sprint 52

#4 Updated by ttereshc 7 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

#5 Updated by ttereshc 7 months ago

  • Project changed from RPM Support to Pulp
  • Status changed from ASSIGNED to POST

#6 Updated by ttereshc 7 months ago

  • Status changed from POST to MODIFIED

#7 Updated by dkliban@redhat.com 7 months ago

  • Platform Release set to 2.19.1

#8 Updated by dkliban@redhat.com 7 months ago

  • Sprint/Milestone set to 2.19.1

#9 Updated by bherring 6 months ago

  • Copied to Test #4823: Modulemd profiles not getting removed from the consumer added

#11 Updated by dkliban@redhat.com 6 months ago

  • Status changed from MODIFIED to ON_QA

#12 Updated by dkliban@redhat.com 6 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF