Project

Profile

Help

Task #6421

Review of write_only fields in pulp and plugins

Added by daviddavis 4 months ago. Updated 3 months ago.

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

100%

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

Description

In #6346, we are trying to fix the problem where write_only fields are not showing up in the api schema. We think though that most of the use of write_only fields are unnecessary. In some cases, a serializer with write_only fields can be split in two: one for read operations and one for write operations. In other cases, write_only fields can be converted to SecretCharFields.

This task is to go through and try to eliminate write_only field usage when possible. From there we can examine which use cases still require use of write_only fields.


Related issues

Related to Container Support - Task #6823: Remove write_only from fields that don't require itCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Pulp - Issue #6346: Remote fields username and password not showing up in REST docsCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 89653ff8 View on GitHub
Added by daviddavis 3 months ago

Remove unnecessary write_only option from RepositoryAddRemoveContentSerializer

fixes #6421

History

#1 Updated by daviddavis 4 months ago

  • Sprint set to Sprint 69

Adding to sprint 69 since it blocks an issue on the sprint.

#2 Updated by daviddavis 4 months ago

  • Blocks Issue #6346: Remote fields username and password not showing up in REST docs added

#3 Updated by daviddavis 4 months ago

  • Description updated (diff)

#4 Updated by daviddavis 4 months ago

  • Description updated (diff)

#5 Updated by rchan 4 months ago

  • Sprint changed from Sprint 69 to Sprint 70

#6 Updated by rchan 4 months ago

  • Sprint changed from Sprint 70 to Sprint 71

#7 Updated by rchan 3 months ago

  • Sprint changed from Sprint 71 to Sprint 72

#8 Updated by rchan 3 months ago

  • Sprint changed from Sprint 72 to Sprint 73

#9 Updated by mdellweg 3 months ago

List of write_only still in use:

pulpcore:

  • relative_path on the SingleArtifactContentSerializer OK, since there is no relative_path in the database model. Also it is dynamically deactivated.
  • dry_run on the PulpExportSerializer. Obviously ok, as this will not persist in the db.
  • full and versions on the PulpExportSerializer. Should those values be persisted?
  • add/remove_content_units' on the RepositoryAddRemoveContentSerializer`. Is this a POST-only serializer?
  • file on the UploadChunkSerializer. OK, special case for file uploads.
  • file and repository on the UploadSerializerFieldsMixin. OK, special case for file uploads and the repository being used for a non exclusive convenience association.

pulp_gem:

  • file, repository and artifact on theGemContentSerializer. Could use the UploadSerializerFieldsMixin. Artifact is special here.

pulp_container:

  • content_units on the RecursiveManageSerializer. Probably a POST-only serializer.
  • source_repository and source_repository_version on the CopySerializer. Probably a POST-only serializer.
  • containerfile on the OCIBuildImageSerializer. Probably a POST-only serializer.

#10 Updated by bmbouter 3 months ago

  • Sprint/Milestone set to 3.4.0

Adding to 3.4.0 blockers list per May 19th open floor.

#11 Updated by ggainey 3 months ago

mdellweg wrote:

List of write_only still in use:

pulpcore:

  • full and versions on the PulpExportSerializer. Should those values be persisted?

Everything on the PulpExporter POST is persisted in the 'params' field.

#12 Updated by dkliban@redhat.com 3 months ago

We need to remove the write_only designation on the RepositoryAddRemoveContentSerializer serializer fields in pulpcore.

We need to remove the write_only designation on the OCIBuildImageSerializer, CopySerializer, RecursiveManageSerializer serializers in pulp_container.

#13 Updated by daviddavis 3 months ago

  • Related to Task #6823: Remove write_only from fields that don't require it added

#14 Updated by daviddavis 3 months ago

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

#15 Updated by pulpbot 3 months ago

  • Status changed from ASSIGNED to POST

#16 Updated by daviddavis 3 months ago

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

#17 Updated by dkliban@redhat.com 3 months ago

  • Status changed from MODIFIED to CLOSED - COMPLETE

Please register to edit this issue

Also available in: Atom PDF