-
Notifications
You must be signed in to change notification settings - Fork 146
Document best practices for version label usage? #582
Description
Wanted to have a short discussion on what some thoughts were about "best practices" for version label usage in ACI images.
In the spec, version
is just a label, and label values are just strings. However, the version label is also a special one in that it plays a more prominent role in the discovery process than other labels.
In particular, looking at version settings and practices around prefixing the version string, such as with a v
. Other fields within AppC that enforce version semantics like the acVersion
field focus on prefixes, and are simply 0.7.4
. JSON examples for the ACI format include version
labels with 1.0.0
as the value. However, actual usage wise, the etcd ACI image uses v2.3.0
as the value.
Although agree with labels generally be freeform strings and don't want strict settings around the version label, being too undefined here does have end-user implications. Someone using a container engine that supports AppC could end up getting whether the app they're wanting to use is prefixing versions or not. This is something that also exists in the Docker ecosystem with no clear guidelines.
So instead of a strict requirement, thinking it may make sense to have some written best practices to help guide image authors.
I think it'd also be good to look at some common ways in which the version
label could be used, since version itself could be rather ambiguous.
Some common usages may be:
latest
(obviously)- Release version, such as
1.2.3
,1.2.3+git
,v0.1.0-120-g122abae
(git describe --tags
format) - Plain build number, such as auto generated images from a dev CI system
- Branch/commit tags, such as images from a CI system
- Feature defintions, thinking of the Docker image
concourse/busyboxplus:git
orconcourse/busyboxplus:iptables
Any others?
Personally, I'm sort of torn on "to v
or not to v
". Some examples:
coreos.com/etcd:v2.3.0
looks better thancoreos.com/etcd:2.3.0
coreos.com/etcd,version=2.3.0
probably looks better thancoreos.com/etcd,version=v2.3.0