Project

Profile

Help

Task #5550

Remove "_type" / "pulp_type" as a public-facing field, and MasterModelSerializer

Added by dalley about 1 year ago. Updated 11 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

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

Description

Rationale:

"_type" / "pulp_type" is a field that shows up on models using master-detail inheritance. However, there is no way to query these types generically. In order to query these types, you have to provide the app name and the type name, which are the two components of that field. Therefore it doesn't really provide the end user any valuable information.

This is probably a leftover relic from when the /content/ endpoint existed and returned content of all types.

Pulpcore still needs this information for various things, but, the user doesn't. Therefore we can remove it from the serializers.

"_type" / "pulp_type" is the only thing provided by MasterModelSerializer, so the whole thing can go. Everything inheriting from MasterModelSerializer can inherit from ModelSerializer instead.

https://github.com/pulp/pulpcore/blob/master/pulpcore/app/serializers/base.py#L81-L110


Related issues

Related to Pulp - Task #5454: rename _type to pulp_typeCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 57e1f2ca View on GitHub
Added by Fabricio Aguiar about 1 year ago

Removing _type field

ref #5550 https://pulp.plan.io/issues/5550

Revision e69bba70 View on GitHub
Added by Fabricio Aguiar about 1 year ago

Removing _type field

ref #5550 https://pulp.plan.io/issues/5550

Revision 3e4c9db8 View on GitHub
Added by Fabricio Aguiar about 1 year ago

Removing _type field

ref #5550 https://pulp.plan.io/issues/5550

Revision 3e4c9db8 View on GitHub
Added by Fabricio Aguiar about 1 year ago

Removing _type field

ref #5550 https://pulp.plan.io/issues/5550

Revision 3e4c9db8 View on GitHub
Added by Fabricio Aguiar about 1 year ago

Removing _type field

ref #5550 https://pulp.plan.io/issues/5550

Revision 3e4c9db8 View on GitHub
Added by Fabricio Aguiar about 1 year ago

Removing _type field

ref #5550 https://pulp.plan.io/issues/5550

Revision 507eee94 View on GitHub
Added by Fabricio Aguiar about 1 year ago

Removing _type field

ref #5550 https://pulp.plan.io/issues/5550

History

#1 Updated by bmbouter about 1 year ago

+1 I agree this information isn't valuable to users, and it likely restricts improvements we can make for them in the future.

#2 Updated by dalley about 1 year ago

  • Sprint/Milestone set to 3.0.0

#3 Updated by fao89 about 1 year ago

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

#4 Updated by fao89 about 1 year ago

  • Related to Task #5454: rename _type to pulp_type added

#5 Updated by fao89 about 1 year ago

Docker uses _type:
https://github.com/pulp/pulp_docker/pull/424/commits/b4e3aed646d8e99c27a35a9a41586bcdcef88ed3
I'm wondering if I should remove _type on core and add it on docker serializers

#7 Updated by Anonymous about 1 year ago

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

#8 Updated by daviddavis about 1 year ago

  • Status changed from MODIFIED to POST

#9 Updated by fao89 about 1 year ago

  • Status changed from POST to MODIFIED

#10 Updated by bmbouter 11 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF