jacobtomlinson / gha-anaconda-package-version

Get the latest version of an Anaconda package
MIT License
3 stars 4 forks source link

Action Doesn't Seem to Sort CalVer Versions Correctly #9

Closed ajschmidt8 closed 1 year ago

ajschmidt8 commented 1 year ago

We use the workflow below to keep dask-sql up-to-date in our Docker images.

https://github.com/rapidsai/docker/blob/branch-22.10/.github/workflows/update-dask-sql.yml

However, from the latest workflow run logs here, it seems that the action is picking up 2022.9.0 as the latest dask-sql version despite 2022.10.0 being out.

It seems the API is returning the correct 2022.10.0 entry, so I think this has to do with lexicographic sorting issues between 2022.9.0 and 2022.10.0

jacobtomlinson commented 1 year ago

Yeah looks like we are just doing a basic sort for CalVer which will fail in oct/nov/dev.

https://github.com/jacobtomlinson/gha-anaconda-package-version/blob/678fe9333d95771811b52e9968006249760a8e0c/main.go#L92

If you set it to be semver instead it will more intelligently sort, but that was causing problems for some users who were using calver tags that were not semver compliant.

For example 2022.09.0 is not valid semver because you cannot have leading zeroes. (Note that this also sorts correctly with the lexicographic sort).

It looks like dask-sql tags are valid semver because there is no leading zero, so I wonder if switching to the semver mode would be a good workaround?

      - name: Get latest cuDF nightly version
        id: cudf_latest
        uses: jacobtomlinson/gha-anaconda-package-version@0.1.3
        with:
          org: "rapidsai-nightly"
          package: "cudf"
-         version_system: "CalVer"
+         version_system: "SemVer"
ajschmidt8 commented 1 year ago

I will try that

ajschmidt8 commented 1 year ago

that seemed to work. latest log w/ debugging enabled is below. closing.