-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Duplicate uploads of nightly wheels to scipy-wheels-nightly Anaconda cloud package index fails #22757
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
Comments
If you are motivated I do not think we will turn down the improvement! I just would not necessarily ask anyone to do it if that makes sense. |
Yup! Makes sense to me. 🙂 |
The output says |
Oh snap I should have read the error message more.
Yeah $ docker run --rm -ti python:3.10 /bin/bash
root@0ad6f9d32f6b:/# python -m venv venv && . venv/bin/activate
(venv) root@0ad6f9d32f6b:/# python -m pip --quiet install --upgrade pip setuptools wheel
(venv) root@0ad6f9d32f6b:/# python -m pip --quiet install git+https://github.com/Anaconda-Server/anaconda-client
(venv) root@0ad6f9d32f6b:/# anaconda upload --help
usage: anaconda upload [-h] [-c CHANNELS] [-l LABELS] [--no-progress] [-u USER] [--all] [-p PACKAGE] [-v VERSION] [-s SUMMARY] [-t PACKAGE_TYPE]
[-d DESCRIPTION] [--thumbnail THUMBNAIL] [--private] [--no-register | --register] [--build-id BUILD_ID]
[-i | -f | --force | --skip-existing]
files [files ...]
Upload packages to your Anaconda repository
positional arguments:
files Distributions to upload
options:
-h, --help show this help message and exit
-c CHANNELS, --channel CHANNELS
[DEPRECATED] Add this file to a specific channel. Warning: if the file channels do not include "main", the file will not show
up in your user channel
-l LABELS, --label LABELS
Add this file to a specific label. Warning: if the file labels do not include "main", the file will not show up in your user
label
--no-progress Don't show upload progress
-u USER, --user USER User account or Organization, defaults to the current user
--all Use conda convert to generate packages for all platforms and upload them
--no-register Don't create a new package namespace if it does not exist
--register Create a new package namespace if it does not exist
--build-id BUILD_ID Anaconda repository Build ID (internal only)
-i, --interactive Run an interactive prompt if any packages are missing
-f, --fail Fail if a package or release does not exist (default)
--force Force a package upload regardless of errors
--skip-existing Skip errors on package batch upload if it already exists
metadata options:
-p PACKAGE, --package PACKAGE
Defaults to the package name in the uploaded file
-v VERSION, --version VERSION
Defaults to the package version in the uploaded file
-s SUMMARY, --summary SUMMARY
Set the summary of the package
-t PACKAGE_TYPE, --package-type PACKAGE_TYPE
Set the package type [env, ipynb]. Defaults to autodetect
-d DESCRIPTION, --description DESCRIPTION
description of the file(s)
--thumbnail THUMBNAIL
Notebook's thumbnail image
--private Create the package with private access
anaconda upload CONDA_PACKAGE_1.bz2
anaconda upload notebook.ipynb
anaconda upload environment.yml
##### See Also
* [Uploading a Conda Package](https://docs.anaconda.com/anaconda-repository/user-guide/tasks/pkgs/use-pkg-managers/#uploading-a-conda-package)
* [Uploading a PyPI Package](https://docs.anaconda.com/anaconda-repository/user-guide/tasks/pkgs/use-pkg-managers/#uploading-pypi-packages) so yeah. Just adding |
So, a related question to all of this is how and when to do cleanup of the wheels that are uploaded to https://anaconda.org/scipy-wheels-nightly/matplotlib. At the moment, there are two nights of wheels uploaded at https://anaconda.org/scipy-wheels-nightly/matplotlib/files $ python -m pip index --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --pre versions matplotlib
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
matplotlib (3.6.0.dev1954+g6c3412baf6)
Available versions: 3.6.0.dev1954+g6c3412baf6, 3.6.0.dev1948+gd8ede1a710 but eventually these need to get cleaned up so that there aren't multiple GBs of nightly wheels. Though this clearly isn't a problem, as looking at the other projects in https://anaconda.org/scipy-wheels-nightly/repo and their queries with
makes it clear that they have a much longer upload history than $ anaconda show scipy-wheels-nightly
Using Anaconda API: https://api.anaconda.org
Username: scipy-wheels-nightly
Member since: Mon Feb 10 12:40:19 2020
+company: None
+description: None
+location: None
+name: None
+url: None
+user_type: org
Packages:
Name | Version | Access | Package Types | Platforms | Builds
------------------------- | ------ | ------------ | --------------- | --------------- | ----------
scipy-wheels-nightly/dipy | 1.6.0.dev0 | public | pypi | [] |
scipy-wheels-nightly/h5py | 3.6.0 | public | pypi | [] |
scipy-wheels-nightly/matplotlib | 3.6.0.dev1948+gd8ede1a710 | public | pypi | [] |
scipy-wheels-nightly/numpy | 1.23.0.dev0+749.ga41e64367 | public | pypi | [] |
scipy-wheels-nightly/pandas | 1.5.0.dev0+112.g21b7dafcb2 | public | pypi | [] |
scipy-wheels-nightly/scikit-image | 0.19.0.dev0 | public | pypi | [] |
scipy-wheels-nightly/scikit-learn | 1.1.dev0 | public | pypi | [] |
scipy-wheels-nightly/scipy | 1.9.0.dev0+1049.c9cdbf2 | public | pypi | [] |
scipy-wheels-nightly/statsmodels | 0.14.0.dev0 | public | pypi | [] |
$ anaconda show scipy-wheels-nightly/matplotlib
Using Anaconda API: https://api.anaconda.org
Name: matplotlib
Summary:
Access: public
Package Types: pypi
Versions:
+ 3.6.0.dev1948+gd8ede1a710
+ 3.6.0.dev1954+g6c3412baf6
To install this package with pypi run:
pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple matplotlib Though if the
before upload to delete all previous nighties (...or if you need to drill down all the way to the file name then perhaps it makes sense to run the $ anaconda remove --help
usage: anaconda remove [-h] [-f] specs [specs ...]
Remove an object from your Anaconda repository.
example::
anaconda remove sean/meta/1.2.0/meta.tar.gz
positional arguments:
specs Package written as <user>[/<package>[/<version>[/<filename>]]]
options:
-h, --help show this help message and exit
-f, --force Do not prompt removal So that could look like Before upload:
After upload
I would want one of the project maintainers that know Example:
|
On one hand, 👍 for thinking about resource exhaustion, that is the sort of thing I tend to not think about until it is actually a problem. I think we should leave the clean up policy to the nightly repo / @ogrisel as we should do what ever else everyone else is doing. It also makes sense to me to enforce that policy centrally (rather than on a per-uploader) . I also think there is value to having a decent range of built nightlies as it will let you run bisects without needing to be able to build. Not sure .how annoying that would be to actually do, but seems plausible. |
SGTM 👍 @ogrisel I'm going to consider this closed and that it is in the domain of scipy-wheels-nightly org now, but if there are actions that you want
Ah that's a good point that I hadn't even considered. |
@ogrisel the nightly wheel uploads are failing as the scipy-wheels-nightly matplotlib storage is full:
Can you comment on how you would like removal of old wheels to work? |
Sorry I had not seen the notifications of the previous discussion. Indeed I think it would be great to have shared script to automatically clean-up old nightly files and only keep the 5 most recent dev wheels for a given project and platform spec for instance. Assuming one dev build per day, that's approximately one week of history which might be helpful to avoid deleting wheels that might still be used by automated systems with a bit of lag between successive steps. Note that scikit-learn does not cause too much space usage because with use the fixed |
In the mean time we can do a bit of manual clean-up to avoid further errors in the short term. |
That sounds quite useful. 👍 I'm not part of the dev team on any of the scipy-wheels-nightly projects, but if I can be of any help in getting this working let me know. |
In the interest of un-blocking things I just went and manually deleted ~20 pages (at 50/pg) of files so hopefully we have unbroken upload for everyone and gotten some head-room to sort this out. |
Pandas has 8000 files (at ~10MB / file), numpy has 600 files (at 10-17MB/file), dipy re-uses the .dev0 name, statsmodel has 1300 files (at just under 10MB each), h5py has ~100 (and a really odd upload pattern...I think we are just slow on that project). scipy has 350 files at (37MB - 50MB), but has not uploaded in ~5 months, scikit-image has less that 1 page of files, but has not uploaded in a year. |
@ogrisel The nightly matplotlib wheel uploads have run out of space again. While I assume that @tacaswell will manually delete files again to fix this, it would be nice to see if we can get something like what you described in #22757 (comment) before the next time this hits. Has there been any discussion on this with the other projects? If not, I could work with the matplotlib dev team to try to make a script that works for matplotlib and runs as part of the nightly upload and then it could be generalized/made part of the |
That would be great, thanks! |
I just accidentally took out all of the Matplotlib wheels....Going to go re-run the nightly job so we get one version up. |
I think the cap is on the org, @ogrisel who would you feel comfortable giving me permission to purge the pandas files? |
@tacaswell while I am hopefully going to have time to start looking at this before SciPy 2022, as this script will require authentication for testing properly this might benefit from being worked on together at the matplotlib sprints. edit: Done in PR #23349 |
@ogrisel what are your thoughts on a scipy-wheels-nightly org hosted GitHub action? c.f. #23349 (comment) |
@ogrisel gentle ping on this so that if it is of interest we can make some movement on it during the SciPy 2022 sprints this weekend. |
@ogrisel ping on this again to get your thoughts. Also @mattip, @rgommers, and @charris (Charles is manually doing the SciPy removal at the moment), given your interest in anaconda/anaconda-client#540 (comment) and the creation of |
Thanks @matthewfeickert for your efforts and sorry for the slow replies on my end. Would you mind starting a collaboration effort on https://discuss.scientific-python.org/ ? Maybe we could have an official SPEC for publishing nightly wheels and a policy and shared tools to avoid shared resource exhaustion. @tacaswell where did you find the information displayed in #22757 (comment) ? It would be nice to get some pandas dev onboard given the fact that this is the project that currently uses the most shared resources. As a scikit-learn developer I do not feel the same pressure to fix the problem given our comparatively small storage space usage according to the UI. |
@ogrisel the information is available to the admins at https://anaconda.org/scipy-wheels-nightly/settings/storage |
I think it is fine to duplicate a 40 line code snippet to the 9 projects uploading to the site. Some of the uploads are done from travis (for aarch64 and ppc64) so a github action will not work there. |
Done in https://discuss.scientific-python.org/t/interest-in-github-action-for-scipy-wheels-nightly-uploads-and-removals/397. 👍 I'll move all further discussion there so that we don't keep this Issue more active then need be. :) |
If no one minds I don't mind throwing in some additional logic to check just before the upload stage. This is pretty easy with
pip index versions
and somesed
So all you'd need to do would be something like
and then just check if that shows up as version of the wheels that just got downloaded from the GitHub Actions workflow artifact
(maybe a more elegant way to do that but that's not the worst)
I'll make an Issue from this and I'm happy to PR it, unless you would prefer to avoid touching it as much as possible.
Originally posted by @matthewfeickert in #22733 (comment)
The text was updated successfully, but these errors were encountered: