-
-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Currently we use a flat index for our repository format, and this works rather well. However, we need to add a couple of layers above this in order to support an "Update forever" approach.
Chiefly, we need to generate a root level index on the repo side which in turn has links to moss format versioned indices.
So, for each versioned release of the repo, the tooling repo side would record the highest used moss format version in all of those packages, and in turn set the minimum required moss version as metadata in the root level index.
Client side we would only look at the highest moss version that we can support, filtering out later moss versions to eliminate any unsupported features / fields creeping into the equation. We will need to decide (soon) how we wish to "cut" releases on the repo side, and establish a shared format in libmoss/vessel/moss.
Lastly, we also need to minimise the time spent refreshing indexes. As we need to support dumb-transport / latent mirror cases, we cannot always rely on http headers for "changed since" usage. It is more likely we need to emit a detached checksum (potentially as a moss format files) that includes a new Checksum type, eliminating the need to hex-encode hashes.
Checksum { type, len, data }
We should also work to incorporate the Checksum type as a replacement for PackageHash
meta field in future, by renaming the existing enum member to LegacyPackageHash
, accounting for a new PackageChecksum
that is strongly typed and robust.
Human explanation:
this is a bit of an explanation re versioned repos.
tlder if we add new things to the format or change it, you'll need a version of moss capable of reading it
so we lockstep each repo version to the moss version
this way we can push out a new moss build that will enable incoming features, and cut a release
then we can land packages using those new features ahead of that cut point
so your client wont see the new packages yet, they'd need to move to the new moss first in the last supported version
it has the effect of staggering the update into chunks
ensuring the right moss is in use