Skip to content

Introduce go-style pseudoversions for cli + engine releases #7760

Closed

Description

@jedevc

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.

Activity

  1. sipsma commented on Jun 26, 2024

    @sipsma
    Contributor

    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-semver

    Only slight advantage being that we can continue using existing semver libs/tools to parse it. Not a big deal either way though.

  2. added this to the v0.12.0 milestone on Jul 5, 2024
  3. jedevc commented on Jul 9, 2024

    @jedevc
    ContributorAuthor

    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.

  4. modified the milestones: v0.12.0, v0.12.1 on Jul 11, 2024
  5. added
    area/engine
    on Jul 12, 2024
  6. modified the milestones: v0.12.1, v0.12.2 on Jul 18, 2024
  7. modified the milestones: v0.12.2, v0.12.3 on Jul 22, 2024
  8. modified the milestones: v0.12.3, v0.12.4 on Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/engine

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions