pulp_ansible
pulp_ansible copied to clipboard
Add missing distribution validation for `move_collection_version` and `copy_collection_version` endpoints
AAH Issue: https://issues.redhat.com/browse/AAH-2852
Version
pulp-ansible 0.20.2
galaxy-ng 4.9.0
Describe the bug
move_collection_version and copy_collection_version endpoints are missing validation if destination repository has no distribution. Task is completed, but the user doesn't get notified about which repositories succeeded or failed.
To Reproduce
- Create a repository without distribution (foobar)
-
/api/galaxy/pulp/api/v3/repositories/ansible/ansible/{pulp_id}/move_collection_version/
{
"destination_repositories": [
"<foobar pulp_href>"
],
"collection_versions": ...
"signing_service": ...
}
- Task completed, but collection is not in the repository.
Expected behavior Return an error message with missing distributions before dispatching the task or alternatively, fail the task with an error about missing distributions.