Project

Profile

Help

Issue #5459

Response data from CollectionVersionViewSet is incompatible with ansible-galaxy

Added by alikins 30 days ago. Updated 21 days ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Severity:
2. Medium
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 59

Description

The ansible-galaxy bug is at https://github.com/ansible/ansible/issues/62076

The response from CollectionVersionViewSet (GET GET
/pulp/api/v3/content/ansible/collection_versions/ - https://pulp-ansible.readthedocs.io/en/latest/restapi.html#operation/content_ansible_collections_list)

has 'namespace' as a single string, where the ansible-galaxy client expect a dictionary.

Essentially, the 'namespace' value needs to be a dict with a 'name' key with the namespace string as value.

Current result (truncated for brevity)

{
  # ...
    "namespace": "alikins",
}

Exceptected

{
 # ...
 "namespace": {"name": "alikins"},
}

https://github.com/ansible/galaxy-api/compare/master...alikins:collection_version_detail_99_reopen is an example workaround in galaxy-api that adds the data.

Note that branch also adds some fields to the "metadata" item that is missing, though I don't believe that impacts ansible-galaxy. It does make the result more inline with the galaxy v2 result however.

pulp_collection_version_viewset.txt (1.52 KB) output of `http "http://127.0.0.1:5002/api/automation-hub/v3/collections/alikins/collection_ntp/versions/0.1.182/" alikins, 09/17/2019 05:59 PM pulp_collection_version_viewset.txt
pulp_example_expected.txt (2.49 KB) Example expected output alikins, 09/17/2019 06:01 PM pulp_example_expected.txt

Associated revisions

Revision 2d5f7a5a View on GitHub
Added by alikins 30 days ago

Return collection version namespace as a dict

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

Revision 65728315 View on GitHub
Added by bmbouter 30 days ago

Merge pull request #206 from alikins/collection_ver_5459_serializer

Return collection version 'namespace' as a dict (Fixes #5459)

History

#4 Updated by bmbouter 30 days ago

  • Status changed from NEW to POST
  • Assignee set to alikins

PR available from @alikins here: https://github.com/pulp/pulp_ansible/pull/206

#5 Updated by alikins 30 days ago

  • Status changed from POST to MODIFIED

#7 Updated by rchan 21 days ago

  • Sprint set to Sprint 59

Please register to edit this issue

Also available in: Atom PDF