Hi everyone,
We’re considering optimizing our git descriptor, but this will introduce a subtle behavior change when Toolkit tries to get the latest version of a git descriptor. But first, a few definitions:
-
most recent tag
: This is the tag that was the most recently created. The actual value of the tag is irrelevant. -
greatest tag
: The greatest tag number. The creation time is irrelevant.
[EDIT: we’d like to clarify that the use of a version-less git descriptor is possible only for a Pipeline Configuration
and not for an individual Toolkit application, engine or framework.]
First, the TL;DR version: We’re considering a change where Toolkit would consider the latest tag of a repository to be the latest version instead of using the most recent tag. Objections?
Now…
We’re looking into making some optimizations to the git descriptor in Toolkit. One of those is around the enumeration of tags from a git repo. Our current approach, which is to consider the most recent tag as the latest version, has two pitfalls. First, it requires a complete clone of the repository so we can get the creation date of each tags, which slows down the process of retrieving the latest version. Second, the most recent tag is not necessarily the latest version. Imagine a situation where v5.7.0
is the most recent tag of your configuration, but you make a bugfix for a project that is on v5.6
branch. If you were to release v5.6.x
after you’ve released v5.7.0
, Toolkit would today consider the latest version to be v5.6.x
and not v5.7.0
, because v5.6.x
is the more recent tag.
Updating the latest version detection logic would do two things
- make sure that the greatest tag number is the latest and not the most recent tag
- sorting tags by the version string does not require a complete clone of the repository, which means getting the latest version is a LOT faster.
Does this subtle behavior change, i.e. the latest version becoming the greatest tag instead of the most recent tag, sound like something that may be an issue for any of you?
If you are using semantic versioning, you will be fine. However, if you’ve been creating tags over time like
v1.3.11.bob_fix
v1.3.11.frank_fix
v1.3.11.dom_fix
or just
second_version
third_version
fourth_version
then you’ll be impacted.
Does those two last examples sound like an issue for anyone? If it’s an issue, how feasible would it be for you to switch to semantic versioning?
Thanks for reading this far!
JF