8000 Deploy dev wheels to rackspace from travis by ogrisel · Pull Request #6768 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Deploy dev wheels to rackspace from travis #6768

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
merged 1 commit into from
Dec 11, 2015

Conversation

ogrisel
Copy link
Contributor
@ogrisel ogrisel commented Dec 4, 2015

This is a fix for #6493. The python 3.5 build with the USE_WHEEL=1 option is now configured to upload a timestamped dev wheel to a public rackspace file container so that downstreams projects like scipy and scikit-learn can configure their own CI to test against the master branch of numpy without having to build it from source them-selves.

wheelhouse_uploader>=0.9 automatically timestamps the local segment of the version of any wheel file it uploads to make it possible for pip to download the last uploaded dev version of the project. Only the 5 last uploaded dev wheels for a given platform are kept on the rackspace container.

The tools/travis-test.sh script will only try to upload the wheels generated from the master branch, outside of any pull request (that is, only on travis builds triggered from merge commits in the master branch).

The rackspace API key for the user account travis.numpy is encrypted with the public key of the github.com/numpy/numpy repo using the travis encrypt -r numpy/numpy WHEELHOUSE_UPLOADER_SECRET=deadbeefcafebabe command. I can send the rackspace credentials to a few numpy maintainers by private emails if you wish to change those credentials later.

I tested it on my ogrisel/numpy travis account (with a different secure key) and it worked:
http://66ce22ef0bf26a5e2cca-4ffdece11fd3f72855e4665bc61c7445.r49.cf2.rackcdn.com/index.html

cc @njsmith @stefanv

$PIP install --pre --no-index --upgrade --find-links=. numpy
$PIP install nose
pip install --pre --use-wheel --no-index --upgrade --find-links=. numpy
pip install nose
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the --use-wheel option is actually not required but it does not hurt either. The pip command should be taken from the currently activate virtualenv instead of the $PIP env.

Copy link
Member

Choose a reason for hiding this comment

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

--no-use-wheel is deprecated in pip 8.0, and --use-wheel isn't even listed in the help text of pip install anymore. So I wouldn't add it.

@ogrisel
Copy link
Contributor Author
ogrisel commented Dec 4, 2015

BTW, initially I wanted to have this build run on python nightly but the tests are currently broken as reported in #6764.

@njsmith
Copy link
Member
njsmith commented Dec 5, 2015

Awesome, thanks!

Does it upload unconditionally, or only if the tests pass? (This wasn't immediately obvious to me from just the diff.) Probably the latter is better, so that if we break things downstream folks won't see it :-)

Not sure we really need to know the unencrypted secret, since if we ever change the wheelhouse password then we'll need to reencrypt anyway, but if you want to send it around then I guess the steering council is the group to send it to.

@ogrisel
Copy link
Contributor Author
ogrisel commented Dec 5, 2015

It's after the runtest function so I assumed that the script would end before uploading if the tests do not pass but I have not actually checked. The travis-test.sh script has a set -exstatement at the beginning to it should quit as soon as a command such as nosetests return a non-zero code.

@seberg
Copy link
Member
seberg commented Dec 5, 2015

Not sure, but my guess is that it does not work like that? The exit status of the test script is important, so either you check the exit value after run_test, or which may be a bit cleaner, we just add the if into the run_test itself with an explicit exit there.

@ogrisel
Copy link
Contributor Author
ogrisel commented Dec 7, 2015

I could also move the upload code in the after_success section of .travis.yml to make it more explicit.

@rgommers
Copy link
Member
rgommers commented Dec 9, 2015

moving to after_success sounds good to me

@rgommers
Copy link
Member
rgommers commented Dec 9, 2015

Very nice, thanks Olivier!

@ogrisel
Copy link
Contributor Author
ogrisel commented Dec 10, 2015

Comments addressed!

@njsmith
Copy link
Member
njsmith commented Dec 11, 2015

LGTM.

For this to actually make a difference, we also need to convince downstream projects to start using this wheel in their travis configurations :-). Do you think you could send around an email explaining how to do that and why it's a good idea?

njsmith added a commit that referenced this pull request Dec 11, 2015
Deploy dev wheels to rackspace from travis
@njsmith njsmith merged commit 582f1fd into numpy:master Dec 11, 2015
@ogrisel
Copy link
Contributor Author
ogrisel commented Dec 11, 2015

It works: the merge commit just pushed a new version of the dev wheel:

http://66ce22ef0bf26a5e2cca-4ffdece11fd3f72855e4665bc61c7445.r49.cf2.rackcdn.com/index.html

For this to actually make a difference, we also need to convince downstream projects to start using this wheel in their travis configurations :-). Do you think you could send around an email explaining how to do that and why it's a good idea?

I will soon work on a PR to do it for scipy if @rgommers or someone else does not do it before me. Then it's going to be easier for other downstream projects to replicate what's done for scipy.

I am at conference right now so it I might do it slowly though.

< 8000 div class="js-timeline-item js-timeline-progressive-focus-container" data-gid="MDEyOklzc3VlQ29tbWVudDE2NTI3MzUzNA==">
@charris
Copy link
Member
charris commented Dec 16, 2015

If this uploads on merge, might that not cause a problem when 1.11 is branched? At that point we will be merging to two branches.

@njsmith
Copy link
Member
njsmith commented Dec 16, 2015

The upload is protected by an if branch == "master" check.

charris added a commit to charris/numpy that referenced this pull request May 26, 2020
PR numpy#6768 introduced the uploading of wheels built during travisCI
testing to a Rackspace account. We are moving away from Rackspace and
already produce more complete sets of wheels for development testing on
a weekly schedule. Consequently those wheels are not longer useful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0