conda / infrastructure

A repo to report issues and have discussions about the conda infrastructure
BSD 3-Clause "New" or "Revised" License
12 stars 15 forks source link

The API of anaconda.org is providing incorrect information about the latest version. #943

Closed akikuno closed 1 month ago

akikuno commented 4 months ago

When I tried to create a badge using shields for the version of the package registered on conda-forge, an old version (v0.3.1) was reported instead of the latest version (v0.4.1). I inquired about this issue with shields. https://github.com/badges/shields/issues/10177

Upon inquiry, it was found that the "latest_version" at https://api.anaconda.org/package/conda-forge/wslPath is "0.3.1", and the latest version, which is 0.4.1, is not reflected. Although version "0.4.1" is registered under "versions", why is "latest_version" showing as 0.3.1?

On top of that, in the wslpath-feedstock, the version is displayed as 0.3.1. On the other hand, the version displayed on anaconda.org is 0.4.1. I had asked conda-forge and they instructed me to post here

I would appreciate any guidance on how to address this issue.

### Tasks
akikuno commented 4 months ago

CC @jezdez @jaimergp (for awareness). Thank you in advance.

jakirkham commented 4 months ago

It is worth noting other info about the 0.4.1 is in the JSON output from the API call. Just for some reason latest_version was not updated when the new version was published. So this could be as simple as updating that field

akikuno commented 4 months ago

@jakirkham Thank you very much for your guidance! How can we update the field?

By the way, while I am unsure of the reason why latest_version was not updated, I suspect that one of the factors might be that when upgrading from 0.3.1 to 0.4.0, the file extension registered with Anaconda changed from .tar.bz2 to .conda.

https://anaconda.org/conda-forge/wslpath/files

image

jakirkham commented 4 months ago

Idk unfortunately. Am just another OSS contributor/user like you 🙂

The package format change is also interesting. We ran into a potentially related issue with the CDN on a different channel recently where a package format change affected CDN behavior ( https://github.com/conda/infrastructure/issues/945 )

jezdez commented 4 months ago

We're looking into it

jaimergp commented 4 months ago

Hm, the .conda / .tar.bz2 distinction is indeed interesting. My workaround for this in other projects is to sort all package entries by version using conda's VersionOrder as the key, but that might be infeasible for the shields API.

jakirkham commented 4 months ago

Even so, it seems reasonable that latest_version would be up-to-date

jameslamb commented 2 months ago

Linking some other relevant things.

Hopefully those provide some clues to the root cause.

akikuno commented 1 month ago

@jameslamb

Thank you for your valuable comments! After upgrading the version of wslPath and updating the conda-forge feedstock, the latest_version is now correctly reflecting the latest version.

To be honest, the root cause is still unclear, but it might be related to the fact that the update was done by regro-cf-autotick-bot this time, while the previous version was updated manually, which could explain why the latest_version was not updated before.

https://github.com/conda-forge/wslpath-feedstock/pulls?q=is%3Apr+is%3Aclosed

In any case, the issue has been resolved, so I will close this.

Thank you for all your support.