Skip to content
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

regsitry preference header should be a comma separated list #148

Open
staticfloat opened this issue Nov 8, 2021 · 0 comments
Open

regsitry preference header should be a comma separated list #148

staticfloat opened this issue Nov 8, 2021 · 0 comments

Comments

@staticfloat
Copy link
Member

We should allow the registry preference header (Julia-Registry-Preference) to not just be a single value, but a comma-separated list. The Pkg server should attempt to serve each registry flavor, in order. The client can use the meta-flavor default to allow the PkgServer to make an informed decision, and if none of the choices can be found, /registries should return 404. If the header is missing, it is assumed to be equal to default, thereby maintaining the current behavior.

Examples:

Julia-Registry-Preference: super-conservative, conservative

Let us imagine that this is a hypothetical Julia v2.3 client, which knows about the existence of the super-conservative flavor, but allows fallback to the conservative flavor if the server doesn't serve the former. In this scenario, if the server does not serve either kind, it should return a 404.

Julia-Registry-Preference: eager, conservative, default

This will select the eager flavor first, if it exists, and if it doesn't it chooses conservative, then finally falling back to whatever flavor the PkgServer thinks is best. This is a convenient way to future-proof clients against naming changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant