Ensure per repository version structure content integrity
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 71
- Forks
- 91
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 22
Description
Unless all users do is sync, there are currently numerous ways to create repository versions that have inconsistent structure and metadata content.
Metadata content: Release
Structure content: ReleaseComponent, ReleaseArchitecture, PackageReleaseComponent
What do we mean by consistent?
The following rules are necessary and sufficient for a given repo version to be described as structurally consistent/sound:
- For each
Package, there should be at least onePackageReleaseComponentreferencing that package. - For each
PackageReleaseComponentthe referencedReleaseComponentshould be present in the repo version. - For each
PackageReleaseComponentthe referencedPackageshould be present in the repo version. - For each
ReleaseComponentthere should be exactly oneReleasewith the samedistribution(not strictly required sinceReleasejust stores optional release file fields). For eachReleaseComponentthere should be at least onePackageReleaseComponentreferncing it.- For each package with a given
architectureassociated with someReleasevia the above association chain, there should be aReleaseArchitecturewith that samedistributionas theReleaseand the samearchitectureas thePackage. - For each
Release, there should be at least oneReleaseComponentwith the samedistribution.
Example problems caused by "inconsistent" repo versions
https://github.com/pulp/pulp_deb/issues/777
Steps we are taking to ensure consistency
- The advanced copy can be used to move packages from repo A to repo B while also "dragging along" all the structure content associated with the package.
- The structured upload can be used to upload a package to a repo while simultaneously creating structure content to go with it.
- Currently packages present in a Release, that is missing a ReleaseArchitecture for that package throw a warning during publish. They are added to the pool folder, but not to the relevant package index. (see #778)
Releasehave repo uniqueness constraint on thedistributionfield, so we guarantee at most oneReleaseperdistribution.
Ideas to improve consistency further
- Provide some kind of validation feature
- Go over every method of adding or removing content from a repo, and make sure it ensures consistency
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Release, ReleaseComponent, ReleaseArchitecture, and PackageReleaseComponent relationships and the listed consistency rules. Compare the advanced copy, structured upload, publish, and other content-addition or removal paths; done means a defined validation feature or consistent handling across those paths, with the relevant behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100