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

Matrix is sometimes incorrect #49

Closed
jakirkham opened this issue Jul 17, 2016 · 16 comments
Closed

Matrix is sometimes incorrect #49

jakirkham opened this issue Jul 17, 2016 · 16 comments

Comments

@jakirkham
Copy link
Member

jakirkham commented Jul 17, 2016

I'm running into this issue with 0.13.0 and 0.13.1, but not with 0.12.0. It sometimes fails to get all of the items in a matrix that I would expect. An example would be trying to run conda smithy rerender on this feedstock at that commit. It only provides Python with 3.5 and not any earlier versions. Though there is no version constraint or skip provided. I have provided all of the version info below to help narrow this down.

conda list -n root
anaconda-client           1.4.0                    py27_0    defaults
anaconda-verify           1.1.0                    py27_0    defaults
conda                     4.1.8                    py27_0    defaults
conda-build               1.21.5                   py27_0    defaults
ca-certificates           2016.2.28                     1    conda-forge
clyent                    1.2.1                    py27_0    conda-forge
conda-build-all           0.12.0                   py27_1    conda-forge
conda-env                 2.5.2                    py27_0    conda-forge
conda-execute             0.6.0                    py27_0    conda-forge
conda-smithy              1.0.1                    py27_0    conda-forge
curl                      7.49.1                        0    conda-forge
expat                     2.1.0                         1    conda-forge
funcsigs                  1.0.2                    py27_0    conda-forge
gitdb                     0.6.4                    py27_0    conda-forge
gitpython                 1.0.1                    py27_0    conda-forge
jinja2                    2.8                      py27_0    conda-forge
markupsafe                0.23                     py27_0    conda-forge
mock                      2.0.0                    py27_0    conda-forge
ncurses                   5.9                           7    conda-forge
openssl                   1.0.2h                        0    conda-forge
psutil                    4.3.0                    py27_0    conda-forge
pycosat                   0.6.1                    py27_0    conda-forge
pycrypto                  2.6.1                    py27_0    conda-forge
pygithub                  1.26.0                   py27_0    conda-forge
python-dateutil           2.5.2                    py27_0    conda-forge
pytz                      2016.3                   py27_0    conda-forge
pyyaml                    3.11                     py27_0    conda-forge
readline                  6.2                           0    conda-forge
requests                  2.10.0                   py27_0    conda-forge
ruamel.ordereddict        0.4.6                    py27_0    conda-forge
ruamel.yaml               0.11.11                  py27_1    conda-forge
setuptools                23.0.0                   py27_0    conda-forge
six                       1.10.0                   py27_0    conda-forge
smmap                     0.9.0                    py27_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
yaml                      0.1.6                         0    conda-forge
zlib                      1.2.8                         3    conda-forge
constructor               1.3.0                    py27_0    defaults
libconda                  4.0.0                    py27_0    defaults
pbr                       1.10.0                   py27_0    defaults
pip                       8.1.2                    py27_0    defaults
python                    2.7.12                        1    defaults
ruamel_yaml               0.11.7                   py27_0    defaults
tk                        8.5.18                        0    defaults
wheel                     0.29.0                   py27_0    defaults
@jakirkham
Copy link
Member Author

Weird. Now I can't reproduce it. 😕

@pelson
Copy link
Contributor

pelson commented Aug 8, 2016

Closing until we are able to reproduce. Could easily have been a conda-build transient issue.

@pelson pelson closed this as completed Aug 8, 2016
@pelson
Copy link
Contributor

pelson commented Aug 25, 2016

Struggling to reproduce this on my local machine, but have the same problem on heroku. I'm going to track it down and will update here.

@pelson pelson reopened this Aug 25, 2016
@pelson
Copy link
Contributor

pelson commented Aug 25, 2016

Using the following script on the cartopy-feedstock:

# conda execute
# env:
#  - python 2*
#  - conda-smithy >=1.1.1
#  - conda-build-all >=0.13.3
#  - conda-build 1.21.14
#  - conda 4.1.11
# channels:
#  - conda-forge
# run_with: python

import conda_smithy.configure_feedstock as cf
import conda_build_all.version_matrix as vm
import conda_build.metadata
import conda.api

def build_matrix(meta):
    with cf.fudge_subdir('win-64'):
        index = conda.api.get_index()
        mtx = vm.special_case_version_matrix(meta, index)
        mtx = list(vm.filter_cases(mtx, ['python >=2.7,<3|>=3.4', 'numpy >=1.10']))
        return mtx

if __name__ == '__main__':
    meta = conda_build.metadata.MetaData('./recipe')
    print(build_matrix(meta))

I see an empty build matrix on Heroku:

conda-build               1.21.14                  py27_0  
anaconda-client           1.5.1                    py27_0    conda-forge
ca-certificates           2016.8.2                      3    conda-forge
certifi                   2016.8.2                 py27_0    conda-forge
clyent                    1.2.1                    py27_0    conda-forge
conda                     4.1.11                   py27_1    conda-forge
conda-build-all           0.13.3                   py27_0    conda-forge
conda-env                 2.5.2                    py27_0    conda-forge
conda-smithy              1.1.1                    py27_0    conda-forge
funcsigs                  1.0.2                    py27_0    conda-forge
gitdb                     0.6.4                    py27_0    conda-forge
gitpython                 2.0.8                    py27_0    conda-forge
jinja2                    2.8                      py27_1    conda-forge
markupsafe                0.23                     py27_0    conda-forge
mock                      2.0.0                    py27_0    conda-forge
ncurses                   5.9                           8    conda-forge
openssl                   1.0.2h                        2    conda-forge
patchelf                  0.9                           0    conda-forge
pbr                       1.10.0                   py27_0    conda-forge
pip                       8.1.2                    py27_0    conda-forge
pycosat                   0.6.1                    py27_0    conda-forge
pycrypto                  2.6.1                    py27_0    conda-forge
pygithub                  1.27.1                   py27_0    conda-forge
python                    2.7.12                        0    conda-forge
python-dateutil           2.5.3                    py27_0    conda-forge
pytz                      2016.6.1                 py27_0    conda-forge
pyyaml                    3.11                     py27_0    conda-forge
readline                  6.2                           0    conda-forge
requests                  2.11.0                   py27_0    conda-forge
ruamel.ordereddict        0.4.6                    py27_0    conda-forge
ruamel.yaml               0.11.11                  py27_1    conda-forge
ruamel_yaml               0.11.7                   py27_0    conda-forge
setuptools                25.1.6                   py27_0    conda-forge
six                       1.10.0                   py27_0    conda-forge
smmap                     0.9.0                    py27_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        0    conda-forge
wheel                     0.29.0                   py27_0    conda-forge
yaml                      0.1.6                         0    conda-forge
zlib                      1.2.8                         3    conda-forge

vs. on OSX (where I don't see the problem):

conda-build               1.21.14                  py27_0    defaults
anaconda-client           1.5.1                    py27_0    conda-forge
ca-certificates           2016.8.2                      3    conda-forge
certifi                   2016.8.2                 py27_0    conda-forge
clyent                    1.2.1                    py27_0    conda-forge
conda                     4.1.11                   py27_1    conda-forge
conda-build-all           0.13.3                   py27_0    conda-forge
conda-env                 2.5.2                    py27_0    conda-forge
funcsigs                  1.0.2                    py27_0    conda-forge
gitdb                     0.6.4                    py27_0    conda-forge
gitpython                 2.0.8                    py27_0    conda-forge
jinja2                    2.8                      py27_1    conda-forge
markupsafe                0.23                     py27_0    conda-forge
mock                      2.0.0                    py27_0    conda-forge
ncurses                   5.9                           8    conda-forge
openssl                   1.0.2h                        2    conda-forge
pbr                       1.10.0                   py27_0    conda-forge
pip                       8.1.2                    py27_0    conda-forge
pycosat                   0.6.1                    py27_0    conda-forge
pycrypto                  2.6.1                    py27_0    conda-forge
pygithub                  1.27.1                   py27_0    conda-forge
python                    2.7.12                        0    conda-forge
python-dateutil           2.5.3                    py27_0    conda-forge
pytz                      2016.6.1                 py27_0    conda-forge
pyyaml                    3.11                     py27_0    conda-forge
readline                  6.2                           0    conda-forge
requests                  2.10.0                   py27_0    conda-forge
ruamel.ordereddict        0.4.6                    py27_0    conda-forge
ruamel.yaml               0.11.11                  py27_1    conda-forge
ruamel_yaml               0.11.7                   py27_0    conda-forge
setuptools                25.1.6                   py27_0    conda-forge
six                       1.10.0                   py27_0    conda-forge
smmap                     0.9.0                    py27_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        0    conda-forge
wheel                     0.29.0                   py27_0    conda-forge
yaml                      0.1.6                         0    conda-forge
zlib                      1.2.8                         3    conda-forge
conda-smithy              1.1.1                    py27_0    file:///Users/pelson//miniconda/conda-bld

The diff of these two isn't particularly illuminating:

--- working.env 2016-08-25 07:25:20.000000000 +0100
+++ broken.env  2016-08-25 07:25:58.000000000 +0100
@@ -1,6 +1,6 @@
-# packages in environment at /Users/pelson/miniconda/tmp_envs/32985938ccb9c13253f1:
+# packages in environment at /app/.conda/tmp_envs/32985938ccb9c13253f1:
 #
-conda-build               1.21.14                  py27_0    defaults
+conda-build               1.21.14                  py27_0  
 anaconda-client           1.5.1                    py27_0    conda-forge
 ca-certificates           2016.8.2                      3    conda-forge
 certifi                   2016.8.2                 py27_0    conda-forge
@@ -8,6 +8,7 @@
 conda                     4.1.11                   py27_1    conda-forge
 conda-build-all           0.13.3                   py27_0    conda-forge
 conda-env                 2.5.2                    py27_0    conda-forge
+conda-smithy              1.1.1                    py27_0    conda-forge
 funcsigs                  1.0.2                    py27_0    conda-forge
 gitdb                     0.6.4                    py27_0    conda-forge
 gitpython                 2.0.8                    py27_0    conda-forge
@@ -16,6 +17,7 @@
 mock                      2.0.0                    py27_0    conda-forge
 ncurses                   5.9                           8    conda-forge
 openssl                   1.0.2h                        2    conda-forge
+patchelf                  0.9                           0    conda-forge
 pbr                       1.10.0                   py27_0    conda-forge
 pip                       8.1.2                    py27_0    conda-forge
 pycosat                   0.6.1                    py27_0    conda-forge
@@ -26,7 +28,7 @@
 pytz                      2016.6.1                 py27_0    conda-forge
 pyyaml                    3.11                     py27_0    conda-forge
 readline                  6.2                           0    conda-forge
-requests                  2.10.0                   py27_0    conda-forge
+requests                  2.11.0                   py27_0    conda-forge
 ruamel.ordereddict        0.4.6                    py27_0    conda-forge
 ruamel.yaml               0.11.11                  py27_1    conda-forge
 ruamel_yaml               0.11.7                   py27_0    conda-forge
@@ -37,5 +39,3 @@
 tk                        8.5.19                        0    conda-forge
 wheel                     0.29.0                   py27_0    conda-forge
 yaml                      0.1.6                         0    conda-forge
-zlib                      1.2.8                         3    conda-forge
-conda-smithy              1.1.1                    py27_0    file:///Users/pelson//miniconda/conda-bld

@pelson
Copy link
Contributor

pelson commented Aug 25, 2016

When I look at just the index keys, overwhelmingly on OSX the keys include the channel. On Heroku, none appear to have the channel...

@pelson
Copy link
Contributor

pelson commented Aug 25, 2016

On Heroku the resolve believes that the constraints [('python', u'3.3'), ('numpy', u'1.8')] cannot be solved, yet on my OSX machine, they can. This is with what seems to be the same index... (except the keys differ as per the comment above). It is likely that it is this index difference that is causing the problem.

@pelson
Copy link
Contributor

pelson commented Aug 25, 2016

Solved by adding the conda-forge channel. That is embarrassing.... suggests that conda-smithy should be run with the conda-forge+defaults channel...

@pelson
Copy link
Contributor

pelson commented Aug 25, 2016

Maybe not solved... hmmm, this is a tricky one to track down.
Sorry for all the noise John.

@jakirkham
Copy link
Member Author

No worries, @pelson. Agreed this is a slippery one.

Maybe this doesn't help, but it might be worth keeping in mind. All the dependencies appear the same. So maybe it is something subtler like the order they were installed/upgraded. Perhaps there is a caching issue like ( conda/conda#3319 )? We've also seen channels misidentified before ( conda-forge/openssl-feedstock#3 (comment) ). Maybe something there too.

@pelson
Copy link
Contributor

pelson commented Aug 26, 2016

OK, blowing out the package cache on my OSX and I was able to reproduce.

I have now tracked this down to:

from conda_smithy.configure_feedstock import *

def build_matrix(meta):
    with fudge_subdir('win-64'):
        meta.parse_again()
        matrix = compute_build_matrix(meta)

If I keep the parse_again I get an empty matrix (the problem we are seeing). If I remove it, I get a non empty matrix. I'm still figuring out what that means, but noting the progress here.

@pelson
Copy link
Contributor

pelson commented Aug 26, 2016

The difference being that cartopy is pulling in msinttypes for windows only - it is this that is causing the empty resolve. Assumption is therefore that the index is no longer being "fudged" in the right way to get the windows index and the package dependencies cannot be resolved - hence, an empty build matrix.

@pelson
Copy link
Contributor

pelson commented Aug 26, 2016

Confirmed. The bug is with fudge_subdir not fudging the right things for the index to be for the correct platform.

@pelson
Copy link
Contributor

pelson commented Aug 26, 2016

Was a conda-smithy issue (whereby we were trying to control the platform). conda-forge/conda-smithy#274 fixes.

@pelson pelson closed this as completed Aug 26, 2016
@jakirkham
Copy link
Member Author

I'm starting to suspect this is related or is the same as other issues. Like issue ( conda-forge/conda-smithy#257 ).

@jakirkham
Copy link
Member Author

Are we really sure that all variant of this bug are fixed? How come is it we are getting odd re-renderings still?

@pelson
Copy link
Contributor

pelson commented Sep 30, 2016

Turned out to be because we had a different set of channels available to us (conda-forge vs no conda-forge).

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

No branches or pull requests

2 participants