Skip to content

Confirm the order of prereleases #859

Open

Description

While working on elastic/apm-server#8491, I found an interesting problem: are all prerelease tags comparable?

The package-spec allows for defining the prerelease part as tag + timestamp. Which rules should EPR follow to figure out which revision is the newest one.

Few "tricky" comparisons:

8.5.0-preview-1111111111111 vs 8.5.0-preview-2111111
8.5.0-preview-1111111111111 vs 8.5.0-beta-1111111111111

I guess that we have to apply more rules (first thoughts below) to the IsNewerOrEqual function like:

  1. Compare timestamp when the prerelease starts with rc/beta/preview.
  2. rc/beta/preview has higher priority than SNAPSHOT/next.

BTW the APM team selected the preview tag as it seemed to be the most accurate for them.

Feel free to chime in, @jsoriano @mrodm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Team:EcosystemLabel for the Packages Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions