astropy: Dev wheel upload is broken (actually it uploaded but then get deleted)

As @larrybradley reported, grabbing astropy dev wheel from https://pypi.anaconda.org/astropy/simple/astropy/ now gets you a very old dev98 wheel. I think OpenAstronomy workflow is somehow deleting the new wheels built in the nightly job instead of uploading it. See log at https://github.com/astropy/astropy/actions/runs/7620855779/job/20756741326

I don’t know if https://github.com/OpenAstronomy/github-actions-workflows/pull/178 is going to fix it or not, but something needs fixing fast as this breaks all downstream testing against astropy-dev.

https://github.com/astropy/astropy/blob/7759561c8d8760e657cee18c22636ed2ef9fd40a/.github/workflows/publish.yml#L35

cc @ConorMacBride @astrofrog @Cadair

Blocked by

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

The sorting is date based, but it still keeps the N latest versions uploaded. Due to the incorrect sorting previously more recent builds had already been deleted so the 10th most recent was actually quite old.

@pllim - fwiw, have a look at the scientific python action, it’s well maintained and is used by a lot of other libraries, and is now capable to upload to a different anaconda space (pruning comes out of the box).

Very strange. Looks like the sorting isn’t being applied, but I can’t see any bugs in the code. I definitely tested the script on the astropy conda repository and it selected the right versions. I’ll generate a new API key later this week and test again. Maybe just disable pruning again, sorry.

I re-enabled the pruning at 0097d6a08c479402d5d6fd1e4487bcf35584f99d . @larrybradley , please open new issue if you see something weird again. Given the currently failures caused by pytest 8, we might not know for sure until that is resolved. Thanks, all!

Yes, the current sorting is alphabetical on the version string. It looks like we need a fix for this issue: https://github.com/OpenAstronomy/publish-wheels-anaconda/issues/4

remove_old_wheels needs better sorting logic for comparing 2- and 3-digit dev version numbers: https://github.com/OpenAstronomy/publish-wheels-anaconda/blob/main/remove_old_wheels.py#L26

Indeed the newly-built wheels get promptly deleted by remove_old_wheels: https://github.com/astropy/astropy/actions/runs/7620855779/job/20756741326#step:5:2306