Task #6421
closed
Review of write_only fields in pulp and plugins
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.
Adding to sprint 69 since it blocks an issue on the sprint.
- Blocks Issue #6346: Remote fields username and password not showing up in REST docs added
- Description updated (diff)
- Description updated (diff)
- Sprint changed from Sprint 69 to Sprint 70
- Sprint changed from Sprint 70 to Sprint 71
- Sprint changed from Sprint 71 to Sprint 72
- Sprint changed from Sprint 72 to Sprint 73
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.
- Sprint/Milestone set to 3.4.0
Adding to 3.4.0 blockers list per May 19th open floor.
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.
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.
- Related to Task #6823: Remove write_only from fields that don't require it added
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
- Status changed from ASSIGNED to POST
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
- Status changed from MODIFIED to CLOSED - COMPLETE
Also available in: Atom
PDF
Remove unnecessary write_only option from RepositoryAddRemoveContentSerializer
fixes #6421