PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

error in release logic in wheel building script #656

Closed grlee77 closed 1 year ago

grlee77 commented 1 year ago

Just now while building 1.4.0 I had cancelled the wheel building early, but unfortunately the release stage still ran and uploaded the source distribution and two of the wheels that had already completed. I had pushed one additional commit to fix a missing link to 1.3.0 and 1.4.0 changelogs in the docs.

Now the remaining wheels are building and should be uploaded, but until they appear this may cause problems in CI for some downstream projects since they will temporarily try to build from that 1.4.0 source tarball.

I will take a look at the wheel building script and check that it should not upload unless all wheel builds completed successfully.

The only issue once the wheels are all present is that the source distribution that was uploaded early will be missing the link to the changelogs in the docs. If we want to fix that, I can just tag a v1.4.1 after this as we cannot overwrite any existing files already uploaded to PyPI.

grlee77 commented 1 year ago

Hmmm, we do have the following condition that is intended to only deploy if wheel building succeeds. I guess maybe manual cancellation does not end up causing them to be marked as failed?

  deploy:
    name: Release
    needs: [build_linux_x86_64_wheels, build_linux_aarch64_wheels, build_macos_wheels, build_windows_wheels]
rgommers commented 1 year ago

Hmm, that is a strange thing. Ah well, it happens. The rebuild is almost done now.

This is a downside of uploading directly from CI to PyPI. Using a staging area like we do on SciPy is a bit safer. But the damage seems minor here.

If we want to fix that, I can just tag a v1.4.1 after this as we cannot overwrite any existing files already uploaded to PyPI.

I think that's not necessary, it's a very minor issue.

Thanks for getting this release done!

alexandervaneck commented 1 year ago

I believe that the rebuild failed uploading to PyPi because those two wheels were already uploaded.

https://github.com/PyWavelets/pywt/actions/runs/3061775973/jobs/4944423015

Perhaps a 1.4.1 would be in order?

hrnn commented 1 year ago

is this issue causing this error?

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
--
| [end of output]
|  
| note: This error originates from a subprocess, and is likely not a problem with pip.
| ERROR: Failed building wheel for PyWavelets
grlee77 commented 1 year ago

Yeah, most likely it is trying to build from source somewhere because the wheels were missing. I will upload them manually now since the automated upload failed.

grlee77 commented 1 year ago

I was away from home most of the day, but all 1.4.0 wheels should be there now. I downloaded them from the artifacts section of that same GH Actions run that did not complete the uploads and just manually uploaded via twine. My apologies for the confusion/delay!

rgommers commented 1 year ago

They're all there now, and the release yaml logic looks fine (I verified that the default behaviour of needs: is that the previous jobs need to be succcesful - let's just remember not to manually cancel jobs.