Task #5198
closedMove CollectionVersion.metadata JSON field to be top-level fieldson the Model
100%
Description
Problem¶
'metadata' contains data that isn't being exposed in the bindings directly. Here's an example of 'metadata' data:
"metadata": {
"namespace": "my_namespace",
"name": "my_collection",
"version": "1.2.0",
"description": "A collection that performs...",
"license": [
"MIT",
],
"authors": [
"John Smith <jsmith@example.com>",
],
"readme": "README.md",
"tags": [
"deployment",
],
"dependencies": {},
"documentation": null,
"license_file": null,
"issues": null,
"homepage": null,
"repository": null,
},
Solution¶
Make each it's own field. Use ArrayField, CharField, TextField. Also use some ForeignKey modeling for 'dependencies' and 'tags'. Tags needs to become its own Model and it will needs its own Viewset also. This allows for filter searching on the current known Tags through that viewset.
Updated by daviddavis over 5 years ago
- Groomed changed from No to Yes
- Sprint set to Sprint 56
Updated by bmbouter over 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
Updated by bmbouter over 5 years ago
- Status changed from ASSIGNED to POST
PR available at: https://github.com/pulp/pulp_ansible/pull/148
Added by bmbouter over 5 years ago
Updated by bmbouter over 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp_ansible|ca98cb3b8057d97707dbd645626affe431746a75.
Updated by bmbouter over 5 years ago
- Status changed from MODIFIED to POST
Bringing back to POST for small followup fix.
Updated by bmbouter over 5 years ago
PR available at: https://github.com/pulp/pulp_ansible/pull/153
Added by bmbouter over 5 years ago
Revision f67cd5e1 | View on GitHub
Followup fix to modelling changes
Some inputs would cause an unexpected keyword argument to the model which would be rejected. This ensures those fields returned by the importer but unused by the model don't fail the object creation.
Updated by bmbouter over 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp_ansible|f67cd5e1c80ffe3440c44f3c770bc0cc0d4cc71a.
Updated by bmbouter about 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Moving 'metadata' to be fields
This adds many fields to CollectionVersion. Also it adds a migration to introduce the field changes. Also the fields are added to the serializer.
A new
Tag
model is introduced which uniquely tags many CollectionVersion objects.https://pulp.plan.io/issues/5198 closes #5198