Project

Profile

Help

Task #5198

Move CollectionVersion.metadata JSON field to be top-level fieldson the Model

Added by bmbouter about 1 year ago. Updated about 1 year ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 57
Quarter:

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.

Associated revisions

Revision ca98cb3b View on GitHub
Added by bmbouter about 1 year ago

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

Revision f67cd5e1 View on GitHub
Added by bmbouter about 1 year ago

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.

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

History

#1 Updated by daviddavis about 1 year ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 56

#2 Updated by bmbouter about 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#3 Updated by rchan about 1 year ago

  • Sprint changed from Sprint 56 to Sprint 57

#4 Updated by bmbouter about 1 year ago

  • Status changed from ASSIGNED to POST

#5 Updated by bmbouter about 1 year ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by bmbouter about 1 year ago

  • Status changed from MODIFIED to POST

Bringing back to POST for small followup fix.

#8 Updated by bmbouter about 1 year ago

  • Status changed from POST to MODIFIED

Please register to edit this issue

Also available in: Atom PDF