Story #9574

Updated by fao89 about 1 year ago


 **Ticket moved to GitHub**: "pulp/pulpcore/2062": 


 When the validate_duplicate_content function finds illegal duplicate content in a repo version being created, the output is (pulp_deb example): 

 "Cannot create repository version. More than one deb.package content with the duplicate values for package, version, architecture." 

 For users to have any chance of debugging this situation, it would be vital for the error to provide them with a list of the offending duplicate units, preferably the pulp_href, so they can go and look at them in detail. 

 Without this information I just know "I have duplicate units somewhere in the potentially tens of thousands of units in the repo version being created". (Since the repo version is then not created, I can't even go hunting for the duplicate units myself...) Right now, I can't even distinguish a situation where two packages are clashing, from one where all my packages are double (for example). 

 User reported backtrace for the error they encountered: 
 File \"/usr/lib/python3.6/site-packages/pulpcore/tasking/\", line 317, in _perform_task 
   result = func(*args, **kwargs) 
 File \"/usr/lib/python3.6/site-packages/pulpcore/app/tasks/\", line 219, in add_and_remove 
 File \"/usr/lib/python3.6/site-packages/pulpcore/app/models/\", line 963, in __exit__ 
 File \"/usr/lib/python3.6/site-packages/pulp_deb/app/models/\", line 57, in finalize_new_version 
 File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/\", line 137, in validate_repo_version 
 File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/\", line 108, in validate_duplicate_content 
   _(\"Cannot create repository version. {msg}\").format(msg=\", \".join(error_messages))