[openstack-dev] [Glance][Artifacts] Object Version format: SemVer vs pep440

Alexander Tivelkov ativelkov at mirantis.com
Tue Feb 10 15:28:55 UTC 2015


Hi folks,

One of the key features that we are adding to Glance with the
introduction of Artifacts is the ability to have multiple versions of
the same object in the repository: this gives us the possibility to
query for the latest version of something, keep track on the changes
history, and build various continuous delivery solutions on top of
Artifact Repository.

We need to determine the format and rules we will use to define,
increment and compare versions of artifacts in the repository. There
are two alternatives we have to choose from, and we are seeking advice
on this choice.

First, there is Semantic Versioning specification, available at [1].
It is a very generic spec, widely used and adopted in many areas of
software development. It is quite straightforward: 3 mandatory numeric
components for version number, plus optional string labels for
pre-release versions and build metadata.

And then there is PEP-440 spec, which is a "recommended approach to
identifying versions and specifying dependencies when distributing
Python". It is a "pythonic" way to set versions of python packages,
including PIP version strings.

Conceptually PEP-440 and Semantic Versioning are similar in purpose,
but slightly different in syntax. Notably, the count of version number
components and rules of version precedence resolution differ between
PEP-440 and SemVer. Unfortunately, the two version string formats are
not compatible, so we have to choose one or the other.

According to my initial vision, the Artifact Repository should be as
generic as possible in terms of potential adoption. The artifacts were
never supposed to be python packages only, and even the projects which
will create and use these artifacts are not mandatory limited to be
pythonic, the developers of that projects may not be python
developers! So, I'd really wanted to avoid any python-specific
notations, such as PEP-440 for artifacts.

I've put this vision into a spec [3] which also contains a proposal on
how to convert the semver-compatible version strings into the
comparable values which may be mapped to database types, so a database
table may be queried, ordered and filtered by the object version.

So, we need some feedback on this topic. Would you prefer artifacts to
be versioned with SemVer or with PEP-440 notation? Are you interested
in having some generic utility which will map versions (in either
format) to database columns? If so, which version format would you
prefer?

We are on a tight schedule here, as we want to begin landing
artifact-related code soon. So, I would appreciate your feedback
during this week: here in the ML or in the comments to [3] review.

Thanks!



[1] www.semver.org
[2] www.python.org/dev/peps/pep-0440/
[3] https://review.openstack.org/#/c/139595/

--
Regards,
Alexander Tivelkov



More information about the OpenStack-dev mailing list