You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Introduce go-style pseudoversions for cli + engine releases #7760
Currently, all releases are tagged using semantic versioning - e.g. v0.11.9, the latest release. This tag is builtin to the resulting CLI and Engine binaries, and is used (among other things) for determining version compatibility (see #7640 for more information).
However, all builds cut from main are instead built using a commit SHA version, and all builds made in a local dev environment are built using a dev-<id> version.
This is workable, but isn't great. The issue is that because these other cases aren't semver, we can't easily compare them. Currently, we just assume that any semver version is the newest, and should be excluded from various version compat checks. Users installing these versions though (including core devs for testing, or users living on the bleeding edge) have a bad experience, where we would still want to perform version compat checking, or serve the right collection of APIs.
To do this, we should always generate a semver tag, in similar style to go.
If the last release was v0.11.9, a main build should have a tag of the form v0.11.10-<timestamp>-<commit>
If the last release was v0.11.9, a dev build should have a tag of the form v0.11.10-<timestamp>-dev-<id>
With this, it's now possible to compare versions - both of these above are prereleases, so will be correctly sorted to be later than v0.11.9, but before v0.11.10. The timestamps help to ensure some level of sorting when building off of main - this isn't perfect, but it's probably about the best we can do.
Ahh, so I tried this - the issue is that by using build metadata, "vX+" counts as a release of "vX" (with metadata). I don't think we want that.
Instead, we're doing go's trick where we use the pre-release - since technically, this is a prerelease. Also, note, if we do an actual pre-release, like "v0.12.0-rc1", then this sorts after v0.12.0-<number> which is the format we're using here.
Activity
sipsma commentedon Jun 26, 2024
Agree we should do this, only nit is it might be nice to stay in semver spec, which I think allows for all of this via
+metadata tags: https://semver.org/#semantic-versioning-specification-semverOnly slight advantage being that we can continue using existing semver libs/tools to parse it. Not a big deal either way though.
jedevc commentedon Jul 9, 2024
Ahh, so I tried this - the issue is that by using build metadata, "vX+" counts as a release of "vX" (with metadata). I don't think we want that.
Instead, we're doing go's trick where we use the pre-release - since technically, this is a prerelease. Also, note, if we do an actual pre-release, like "v0.12.0-rc1", then this sorts after
v0.12.0-<number>which is the format we're using here.