Skip to content

regsitry preference header should be a comma separated list #148

@staticfloat

Description

@staticfloat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions