-
Notifications
You must be signed in to change notification settings - Fork 80
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
Document why Package
manifests won't have a uniform schema in the Registry
#18
Comments
Hm, to me this sounds a bit awkward for clients. If clients are going to have to handle all versions of the registry, does that mean we are committing to only making changes to the registry type definitions which allow automatic migrations? |
@hdgarrood can you detail an example of schema change that cannot be automatically performed? And to answer your question: yes, but I'll precise that we only have to guarantee this for forward-compatibility: since published packages are immutable, we only have to care about clients being able to read all the schemas, but we don't have to support "downgrading" the schema for clients that cannot support the latest one. |
For schema changes we might not be able to handle automatically, how about:
|
In #76 we introduce the notion that package Manifests will only guarantee forwards-compatibility, so the only changes allowed will be (quoting from the new draft):
@hdgarrood: by this definition all the changes you listed in the last comment will not be allowed. I think this is fine though, as long as we are careful to be strict in constraints and minimal in defining fields right now, because we can always relax constraints and add fields in later versions. This said, I think the new draft clarifies the original purpose of this issue, so I think we could close this? |
Sounds good 👍 |
In #4 I expressed this concern:
A recap of the problem first: we'll want to change the
Package
schema over time. How do we handle migrations, old versions, clients coding against one interface, etc?In the quote above you can find a solution for how to handle data migration, but what's still not clear is how to ensure that clients can pull the manifest files in the schema they expect.
At first I thought we had a choice between these two options:
Package
schemaOption 2 would be really nice, because e.g. a client that needs to query the manifest for
prelude/v5.1.2
could choose to do it forv1
orv2
...however, we cannot do this, because of the constraint of keeping in the registry repo the exact manifest that was contained in the published tarball.
If we had multiple instances of the same manifest (but in different schemas), then we wouldn't know which one got into the tarball.
This means that clients will have to negotiate the version of the
Package
schema version they're trying to use.This means:
v1
v2
This is of course totally fine, as long as we are aware of it.
So all of this needs to be documented.
The text was updated successfully, but these errors were encountered: