-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure per repository version structure content integrity #785
Comments
Note: I am not actually sure about rule 5 above. I suppose it could be legal to have a component, that does not actually include any packages in its package indices. Not very useful, but probably legal. |
I don't agree with this one:
It should be possible for the release and/or component to be defined but not yet have any content. As for validity checking I think it's a good idea but I'm not sure there's a perfect time to do it. You either have to check validity at the content modification time / repo version creation time (which is when I would prefer) which gives early feedback to the user but also forces them to make all their content modification changes at once in one request. Or you do it at Publication time, which makes publication an operation that can unexpectedly fail, which is not great. But other then that I agree with everything here. I think ensuring validity is a good first step, but there's probably also some extra that could be done around automating validity. In particular I'm thinking about Users never care about the existence / non-existence of a We have wrapped our interaction with the
It may also make sense to extend that logic further, for example if the user removes a |
One concrete next step I would like to see is that removing a Package from a repo, will automatically remove any associated PackageReleaseComponents. A dangling PackageReleaseComponents is simply meaningless, and can cause orphan cleanup to fail. See #865 |
Another thing we might consider: Provide a DB cleanup script to clean up dangling PackageReleaseComponents in existing repo versions. The idea is to provide a possibility to clean up if they are causing orphan cleanup to fail. |
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:
Package
, there should be at least onePackageReleaseComponent
referencing that package.PackageReleaseComponent
the referencedReleaseComponent
should be present in the repo version.PackageReleaseComponent
the referencedPackage
should be present in the repo version.ReleaseComponent
there should be exactly oneRelease
with the samedistribution
(not strictly required sinceRelease
just stores optional release file fields).For eachReleaseComponent
there should be at least onePackageReleaseComponent
referncing it.architecture
associated with someRelease
via the above association chain, there should be aReleaseArchitecture
with that samedistribution
as theRelease
and the samearchitecture
as thePackage
.Release
, there should be at least oneReleaseComponent
with the samedistribution
.Example problems caused by "inconsistent" repo versions
#777
Steps we are taking to ensure consistency
Release
have repo uniqueness constraint on thedistribution
field, so we guarantee at most oneRelease
perdistribution
.Ideas to improve consistency further
The text was updated successfully, but these errors were encountered: