Skip to content

MNT: Skip existing wheels during nightly wheel upload #22759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

matthewfeickert
Copy link
Contributor

@matthewfeickert matthewfeickert commented Apr 1, 2022

PR Summary

Resolves #22757

Amends PR #22733

Add the --skip-existing option for anaconda upload to

Skip errors on package batch upload if it already exists

This will keep the nightlies.yml workflow from erroring out if no new wheels were generated, or if a workflow is manually rerun.

As anaconda-client does not have any stable releases on PyPI that support the API desired for uploads (c.f. anaconda/anaconda-client#540), pin it to the last commit on https://github.com/Anaconda-Platform/anaconda-client known to install and work (which is the merge commit of anaconda/anaconda-client#589). This is done for API stability.

PR Checklist

Tests and Styling

  • [n/a] Has pytest style unit tests (and pytest passes).
  • [n/a] Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs should build without error).

matthewfeickert and others added 2 commits March 31, 2022 23:30
Add the '--skip-existing' option for anaconda upload to

> Skip errors on package batch upload if it already exists

This will keep the nightlies.yml workflow from erroring out if
no new wheels were generated, or if a workflow is manually rerun.

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
As anaconda-client does not have any stable releases on PyPI that
support the API desired for uploads, pin it to the last commit on
https://github.com/Anaconda-Platform/anaconda-client known to
install and work (which is the merge commit of
Anaconda-Platform/anaconda-client PR 589). This is done for API
stability.
@matthewfeickert matthewfeickert force-pushed the ci/avoid-duplicate-uploads branch from 38cb779 to 4599e81 Compare April 1, 2022 04:48
@@ -54,11 +54,12 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
# c.f. https://github.com/Anaconda-Platform/anaconda-client/issues/540
python -m pip install git+https://github.com/Anaconda-Server/anaconda-client
python -m pip install git+https://github.com/Anaconda-Server/anaconda-client@be1e14936a8e947da94d026c990715f0596d7043
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this does run the risk of things breaking if this commit were to ever be removed from history, pinning it to something seems much safer then having an API break happen with no warning.

@oscargus oscargus added CI: Run cibuildwheel Run wheel building tests on a PR and removed CI: Run cibuildwheel Run wheel building tests on a PR labels Apr 1, 2022
@tacaswell tacaswell added this to the v3.6.0 milestone Apr 1, 2022
@tacaswell tacaswell removed the CI: Run cibuildwheel Run wheel building tests on a PR label Apr 1, 2022
@tacaswell
Copy link
Member

I do not think we need the wheel building to run on this PR because it is only looking at artifacts it finds on the main branch, not actually making them.

@matthewfeickert
Copy link
Contributor Author

matthewfeickert commented Apr 1, 2022

I do not think we need the wheel building to run on this PR because it is only looking at artifacts it finds on the main branch, not actually making them.

Correct. Thanks Thomas!

@oscargus oscargus merged commit 8b1881f into matplotlib:main Apr 3, 2022
@matthewfeickert matthewfeickert deleted the ci/avoid-duplicate-uploads branch April 3, 2022 17:29
@matthewfeickert
Copy link
Contributor Author

Thanks for the fast review @tacaswell and fast merge @oscargus! Now that this is in and should get applied for the first time in the scheduled run tonight (2022-04-03), do you have thoughts on the curation/removal of old nightly wheels as described in #22757 (comment)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate uploads of nightly wheels to scipy-wheels-nightly Anaconda cloud package index fails
3 participants