openworm / owmeta-core

Core library for owmeta
MIT License
3 stars 2 forks source link

Support pre-release marking in Bundles #43

Open mwatts15 opened 2 years ago

mwatts15 commented 2 years ago

In creating Bundles, it can happen that a publisher wants to publish a "pre-release" Bundle which, although available for wide distribution, may not be considered by the publisher to be the long-term version recommended for all consumers of the bundle. We have a concept of a "latest" Bundle mediated by Bundle Loaders that support querying for Bundle versions. We should be able to specify "latest non-pre-release version" so to exclude pre-releases when we want the latest version for development against a latest stable baseline without regard to which version(s) in particular are the latest. (Actual "production" references should use fixed version numbers for all Bundles, so this issue would not be relevant to such use cases.)

Although it is possible to limit pre-releases to separate Remotes from full releases, it may be impractical for a given publisher to maintain the separate remote. Another alternative, of using a different name / ID for the pre-release Bundle versions is less desirable for two reasons: 1) it makes the relationship between the pre-release Bundles and the full release Bundles less visible since the bundles wouldn't be seen in the same series 2) users of the bundle would have to update all references to the name in order to test properly compared to not specifying the bundle version at all until reaching the release preparation phase.

Note that Bundle version numbers are just positive integers: we don't have dotted version numbers or pre-release markings like in Python (e.g., ".dev") or Maven ("-SNAPSHOT"). Instead we add another field to the Bundle manifest that Bundle storage can recognize and expose. Fetcher, the owm bundle fetch command, Bundle all need to adjust to support requesting exclusion of pre-releases.