Project

Profile

Help

Task #5744

closed

Ensure required fields are always set on the models

Added by ttereshc over 4 years ago. Updated over 2 years ago.

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

0%

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

Description

Ticket moved to GitHub: "pulp/pulp_rpm/2227":https://github.com/pulp/pulp_rpm/issues/2227


Currently there is no enforcement at the db level to require certain fields for the majority of content models.

Package needs NEVRA, pkgId, checksum_type at minimum.
UpdateRecord - id, issued_date, updated_date, digest
UpdateCollectionPackage - NEVRA
Modulemd - NSVCA
Module-defaults - module, digest
PackageGroup/Environment/Category - id, digest
PackageLangpacks - matches, digest
RepoMetadataFile - data_type, checksum

DistributionTree - header_version, release_name, release_version, arch, build_timestamp
Checksum - path, checksum
Image - name, path
Addon - addon_id, uid, name, type, packages
Variant - variant_id, uid, name, type, packages

Actions #1

Updated by ttereshc over 4 years ago

  • Tags Pulp 3 RPM blocker added
Actions #2

Updated by ttereshc over 4 years ago

  • Subject changed from Set null=False for required fields on the models to Ensure required fields are always set on the models
Actions #3

Updated by ttereshc over 4 years ago

  • Tags deleted (Pulp 3 RPM blocker)

Unsetting RPM blocker tag.
After some discussion with @daviddavis. The majority of content goes through createrepo_c and is validated by it to some extent.

Idea of having the validation at DB level might not be good and also is somewhat against DRF concepts. Multiple serializers for different purposes might be a solution.

Here is the relevant thread https://www.redhat.com/archives/pulp-dev/2019-December/msg00026.html

Actions #4

Updated by pulpbot over 2 years ago

  • Description updated (diff)
  • Status changed from NEW to CLOSED - DUPLICATE

Also available in: Atom PDF