Project

Profile

Help

Issue #5459

closed

Response data from CollectionVersionViewSet is incompatible with ansible-galaxy

Added by alikins about 5 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 59
Quarter:

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.


Files

pulp_collection_version_viewset.txt (1.52 KB) pulp_collection_version_viewset.txt 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_example_expected.txt (2.49 KB) pulp_example_expected.txt Example expected output alikins, 09/17/2019 06:01 PM
Actions #4

Updated by bmbouter about 5 years ago

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

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

Added by alikins about 5 years ago

Revision 2d5f7a5a | View on GitHub

Return collection version namespace as a dict

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

Added by bmbouter about 5 years ago

Revision 65728315 | View on GitHub

Merge pull request #206 from alikins/collection_ver_5459_serializer

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

Actions #5

Updated by alikins about 5 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by rchan about 5 years ago

  • Sprint set to Sprint 59
Actions #8

Updated by bmbouter about 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF