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

conda build has non-zero exit status despite successful build #5167

Closed
Tracked by #5134
sebp opened this issue Feb 4, 2024 · 10 comments · Fixed by #5169
Closed
Tracked by #5134

conda build has non-zero exit status despite successful build #5167

sebp opened this issue Feb 4, 2024 · 10 comments · Fixed by #5169
Assignees
Labels
in-progress issue is actively being worked on locked [bot] locked due to inactivity severity::1 blocker; broken functionality with no workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type

Comments

@sebp
Copy link

sebp commented Feb 4, 2024

What happened?

When building a recipe with conda-build version 24.1.0, the return status is non-zero despite the build being successful. This does not happen with conda-build version 3.28.4.

Conda Details

conda info
     active environment : /…/envs/miniconda3
    active env location : /…/envs/miniconda3
            shell level : 2
       user config file : /…/.condarc
 populated config files : /…/.condarc
          conda version : 23.11.0
    conda-build version : 24.1.0
         python version : 3.11.5.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=zen
                          __conda=23.11.0=0
                          __cuda=12.3=0
                          __glibc=2.38=0
                          __linux=6.6.13=0
                          __unix=0=0
       base environment : /…/miniconda3  (writable)
      conda av data dir : /…/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/sebp/linux-64
                          https://conda.anaconda.org/sebp/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /…/miniconda3/pkgs
                          /…/.conda/pkgs
       envs directories : /…/miniconda3/envs
                          /…/.conda/envs
               platform : linux-64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.11.5 Linux/6.6.13-200.fc39.x86_64 fedora/39 glibc/2.38 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.3 aau/0.4.3 c/K7pj3PuF7vhwR8S115QX0A s/oxhLIYnOkyClhlSbRCzyKA e/oS9vSrZdGoblDAkkam1dig
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
conda config
add_pip_as_python_dependency: False
auto_update_conda: False
changeps1: False
channel_priority: flexible
channels:
  - sebp
  - defaults
show_channel_urls: True
always_yes: True
report_errors: False
anaconda_upload: False
conda_build:
  pkg_format: 2
conda list
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    defaults
_openmp_mutex             5.1                       1_gnu    defaults
anaconda-anon-usage       0.4.3           py311hfc0e8ea_100    defaults
anaconda-client           1.12.2          py311h06a4308_0    defaults
archspec                  0.2.1              pyhd3eb1b0_0    defaults
attrs                     23.1.0          py311h06a4308_0    defaults
beautifulsoup4            4.12.2          py311h06a4308_0    defaults
boltons                   23.0.0          py311h06a4308_0    defaults
brotli-python             1.0.9           py311h6a678d5_7    defaults
bzip2                     1.0.8                h7b6447c_0    defaults
c-ares                    1.19.1               h5eee18b_0    defaults
ca-certificates           2023.12.12           h06a4308_0    defaults
certifi                   2023.11.17      py311h06a4308_0    defaults
cffi                      1.16.0          py311h5eee18b_0    defaults
chardet                   4.0.0           py311h06a4308_1003    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
click                     8.1.7           py311h06a4308_0    defaults
conda                     23.11.0         py311h06a4308_0    defaults
conda-build               24.1.0          py311h06a4308_0    defaults
conda-content-trust       0.2.0           py311h06a4308_0    defaults
conda-index               0.4.0              pyhd3eb1b0_0    defaults
conda-libmamba-solver     23.12.0            pyhd3eb1b0_1    defaults
conda-package-handling    2.2.0           py311h06a4308_0    defaults
conda-package-streaming   0.9.0           py311h06a4308_0    defaults
cryptography              41.0.7          py311hdda0065_0    defaults
defusedxml                0.7.1              pyhd3eb1b0_0    defaults
distro                    1.8.0           py311h06a4308_0    defaults
filelock                  3.13.1          py311h06a4308_0    defaults
fmt                       9.1.0                hdb19cb5_0    defaults
icu                       73.1                 h6a678d5_0    defaults
idna                      3.4             py311h06a4308_0    defaults
jinja2                    3.1.3           py311h06a4308_0    defaults
jsonpatch                 1.32               pyhd3eb1b0_0    defaults
jsonpointer               2.1                pyhd3eb1b0_0    defaults
jsonschema                4.19.2          py311h06a4308_0    defaults
jsonschema-specifications 2023.7.1        py311h06a4308_0    defaults
jupyter_core              5.5.0           py311h06a4308_0    defaults
krb5                      1.20.1               h143b758_1    defaults
ld_impl_linux-64          2.38                 h1181459_1    defaults
libarchive                3.6.2                h6ac8c49_2    defaults
libcurl                   8.4.0                h251f7ec_1    defaults
libedit                   3.1.20230828         h5eee18b_0    defaults
libev                     4.33                 h7f8727e_1    defaults
libffi                    3.4.4                h6a678d5_0    defaults
libgcc-ng                 11.2.0               h1234567_1    defaults
libgomp                   11.2.0               h1234567_1    defaults
liblief                   0.12.3               h6a678d5_0    defaults
libmamba                  1.5.3                haf1ee3a_0    defaults
libmambapy                1.5.3           py311h2dafd23_0    defaults
libnghttp2                1.57.0               h2d74bed_0    defaults
libsolv                   0.7.24               he621ea3_0    defaults
libssh2                   1.10.0               hdbd6064_2    defaults
libstdcxx-ng              11.2.0               h1234567_1    defaults
libuuid                   1.41.5               h5eee18b_0    defaults
libxml2                   2.10.4               hf1b16e4_1    defaults
lz4-c                     1.9.4                h6a678d5_0    defaults
markupsafe                2.1.3           py311h5eee18b_0    defaults
menuinst                  2.0.1           py311h06a4308_1    defaults
more-itertools            10.1.0          py311h06a4308_0    defaults
nbformat                  5.9.2           py311h06a4308_0    defaults
ncurses                   6.4                  h6a678d5_0    defaults
openssl                   3.0.13               h7f8727e_0    defaults
packaging                 23.1            py311h06a4308_0    defaults
patch                     2.7.6             h7b6447c_1001    defaults
patchelf                  0.17.2               h6a678d5_0    defaults
pcre2                     10.42                hebb0a14_0    defaults
pip                       23.3.1          py311h06a4308_0    defaults
pkginfo                   1.9.6           py311h06a4308_0    defaults
platformdirs              3.10.0          py311h06a4308_0    defaults
pluggy                    1.0.0           py311h06a4308_1    defaults
psutil                    5.9.0           py311h5eee18b_0    defaults
py-lief                   0.12.3          py311h6a678d5_0    defaults
pybind11-abi              4                    hd3eb1b0_1    defaults
pycosat                   0.6.6           py311h5eee18b_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pyopenssl                 23.2.0          py311h06a4308_0    defaults
pysocks                   1.7.1           py311h06a4308_0    defaults
python                    3.11.5               h955ad1f_0    defaults
python-dateutil           2.8.2              pyhd3eb1b0_0    defaults
python-fastjsonschema     2.16.2          py311h06a4308_0    defaults
python-libarchive-c       2.9                pyhd3eb1b0_1    defaults
pytz                      2023.3.post1    py311h06a4308_0    defaults
pyyaml                    6.0.1           py311h5eee18b_0    defaults
readline                  8.2                  h5eee18b_0    defaults
referencing               0.30.2          py311h06a4308_0    defaults
reproc                    14.2.4               h295c915_1    defaults
reproc-cpp                14.2.4               h295c915_1    defaults
requests                  2.31.0          py311h06a4308_0    defaults
requests-toolbelt         1.0.0           py311h06a4308_0    defaults
rpds-py                   0.10.6          py311hb02cf49_0    defaults
ruamel.yaml               0.17.21         py311h5eee18b_0    defaults
setuptools                68.2.2          py311h06a4308_0    defaults
six                       1.16.0             pyhd3eb1b0_1    defaults
soupsieve                 2.5             py311h06a4308_0    defaults
sqlite                    3.41.2               h5eee18b_0    defaults
tk                        8.6.12               h1ccaba5_0    defaults
tqdm                      4.65.0          py311h92b7b1e_0    defaults
traitlets                 5.7.1           py311h06a4308_0    defaults
truststore                0.8.0           py311h06a4308_0    defaults
tzdata                    2023c                h04d1e81_0    defaults
urllib3                   1.26.18         py311h06a4308_0    defaults
wheel                     0.41.2          py311h06a4308_0    defaults
xz                        5.4.5                h5eee18b_0    defaults
yaml                      0.2.5                h7b6447c_0    defaults
yaml-cpp                  0.8.0                h6a678d5_0    defaults
zlib                      1.2.13               h5eee18b_0    defaults
zstandard                 0.19.0          py311h5eee18b_0    defaults
zstd                      1.5.5                hc292b87_0    defaults

Additional Context

Example recipe:

{% set name = "tqdm" %}
{% set version = "4.66.1" %}
{% set sha256 = "d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  fn: {{ name }}-{{ version }}.tar.gz
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 0
  script: {{ PYTHON }} -m pip install -vvv .

requirements:
  host:
    - python
    - pip
    - setuptools_scm
  run:
    - python

about:
  home: https://github.com/tqdm/tqdm
  license: MPL-2.0 AND MIT
  license_file: LICENCE
  summary: 'A Fast, Extensible Progress Bar for Python and CLI'
@sebp sebp added the type::bug describes erroneous operation, use severity::* to classify the type label Feb 4, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Feb 4, 2024
@kenodegard
Copy link
Contributor

@sebp hm I was unable to replicate this behavior, are you able to provide more context? the commands you ran?

@kenodegard kenodegard added type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere pending::feedback indicates we are waiting on feedback from the user source::community catch-all for issues filed by community members and removed type::bug describes erroneous operation, use severity::* to classify the type labels Feb 5, 2024
@cmeyer
Copy link

cmeyer commented Feb 5, 2024

I'm not the original poster, and I already reverted to the previous version of conda-build in my workflows, but my command (running on Windows) was something like the following:

conda build -q --python 3.12 -c conda-forge --no-anaconda-upload --no-test .

I didn't debug fully, but I got extraneous output that looked like the output path:

['\path\to\the_package.tar.gz']

Furthermore, the following command, which is supposed to output the output path also failed in some way:

conda build --python 3.12 --output .

Sorry to be vague, and hopefully some of this helps. This was only occurring on a CI that took around 30+ minutes to get to this point, so I punted rather quickly once I saw others were having this same issue.

@conda-bot conda-bot added pending::support indicates user is waiting on support from triage engineers and removed pending::feedback indicates we are waiting on feedback from the user labels Feb 5, 2024
@sebp
Copy link
Author

sebp commented Feb 5, 2024

I just ran "conda build" using the conda config I posted above. I originally encountered the problem because builds on GitHub Actions failed.

See the output below:

+ /miniconda3/bin/conda-build ./recipe
WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.23
Adding in variants from internal_defaults
Attempting to finalize metadata for tqdm
Reloading output folder (local): ...working... done
Getting pinned dependencies: ...working... done
Reloading output folder (local): ...working... done
Getting pinned dependencies: ...working... done
BUILD START: ['tqdm-4.66.1-py311_0.conda']
Channels:
 - local
 - conda-forge
 - sebp
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /miniconda3/conda-bld/tqdm_1707161703840/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh


The following NEW packages will be INSTALLED:

    _libgcc_mutex:     0.1-conda_forge           conda-forge
    _openmp_mutex:     4.5-2_gnu                 conda-forge
    bzip2:             1.0.8-hd590300_5          conda-forge
    ca-certificates:   2024.2.2-hbcca054_0       conda-forge
    ld_impl_linux-64:  2.40-h41732ed_0           conda-forge
    libexpat:          2.5.0-hcb278e6_1          conda-forge
    libffi:            3.4.2-h7f98852_5          conda-forge
    libgcc-ng:         13.2.0-h807b86a_5         conda-forge
    libgomp:           13.2.0-h807b86a_5         conda-forge
    libnsl:            2.0.1-hd590300_0          conda-forge
    libsqlite:         3.44.2-h2797004_0         conda-forge
    libuuid:           2.38.1-h0b41bf4_0         conda-forge
    libxcrypt:         4.4.36-hd590300_1         conda-forge
    libzlib:           1.2.13-hd590300_5         conda-forge
    ncurses:           6.4-h59595ed_2            conda-forge
    openssl:           3.2.1-hd590300_0          conda-forge
    packaging:         23.2-pyhd8ed1ab_0         conda-forge
    pip:               24.0-pyhd8ed1ab_0         conda-forge
    python:            3.11.7-hab00c5b_1_cpython conda-forge
    readline:          8.2-h8228510_1            conda-forge
    setuptools:        69.0.3-pyhd8ed1ab_0       conda-forge
    setuptools-scm:    8.0.4-pyhd8ed1ab_0        conda-forge
    setuptools_scm:    8.0.4-hd8ed1ab_0          conda-forge
    tk:                8.6.13-noxft_h4845f30_101 conda-forge
    tomli:             2.0.1-pyhd8ed1ab_0        conda-forge
    typing-extensions: 4.9.0-hd8ed1ab_0          conda-forge
    typing_extensions: 4.9.0-pyha770c72_0        conda-forge
    tzdata:            2024a-h0c530f3_0          conda-forge
    wheel:             0.42.0-pyhd8ed1ab_0       conda-forge
    xz:                5.2.6-h166bdaf_0          conda-forge

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Channels:
 - local
 - conda-forge
 - sebp
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Source cache directory is: /miniconda3/conda-bld/src_cache
Found source in cache: tqdm-4.66.1_d88e651f9d.tar.gz
Extracting download
source tree in: /miniconda3/conda-bld/tqdm_1707161703840/work
export PREFIX=/miniconda3/conda-bld/tqdm_1707161703840/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh
export BUILD_PREFIX=/miniconda3/conda-bld/tqdm_1707161703840/_build_env
export SRC_DIR=/miniconda3/conda-bld/tqdm_1707161703840/work
Using pip 24.0 from $PREFIX/lib/python3.11/site-packages/pip (python 3.11)
Non-user install because user site-packages disabled
Ignoring indexes: https://pypi.org/simple
Created temporary directory: /tmp/pip-build-tracker-mdik4k7i
Initialized build tracking at /tmp/pip-build-tracker-mdik4k7i
Created build tracker: /tmp/pip-build-tracker-mdik4k7i
Entered build tracker: /tmp/pip-build-tracker-mdik4k7i
Created temporary directory: /tmp/pip-install-3motlbwv
Created temporary directory: /tmp/pip-ephem-wheel-cache-ti2ss2na
Processing $SRC_DIR
  Added file://$SRC_DIR to build tracker '/tmp/pip-build-tracker-mdik4k7i'
  Created temporary directory: /tmp/pip-modern-metadata-n_3dc43p
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating /tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info
  writing /tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/dependency_links.txt
  writing entry points to /tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/entry_points.txt
  writing requirements to /tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/requires.txt
  writing top-level names to /tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/SOURCES.txt'
  adding license file 'LICENCE'
  writing manifest file '/tmp/pip-modern-metadata-n_3dc43p/tqdm.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-n_3dc43p/tqdm-4.66.1.dist-info'
  Preparing metadata (pyproject.toml): finished with status 'done'
  Source in $SRC_DIR has version 4.66.1, which satisfies requirement tqdm==4.66.1 from file://$SRC_DIR
  Removed tqdm==4.66.1 from file://$SRC_DIR from build tracker '/tmp/pip-build-tracker-mdik4k7i'
Created temporary directory: /tmp/pip-unpack-sh_s01dx
Building wheels for collected packages: tqdm
  Created temporary directory: /tmp/pip-wheel-rkezdm38
  Destination directory: /tmp/pip-wheel-rkezdm38
  Building wheel for tqdm (pyproject.toml): started
  Running command Building wheel for tqdm (pyproject.toml)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/tqdm
  copying tqdm/asyncio.py -> build/lib/tqdm
  copying tqdm/rich.py -> build/lib/tqdm
  copying tqdm/_tqdm.py -> build/lib/tqdm
  copying tqdm/_monitor.py -> build/lib/tqdm
  copying tqdm/autonotebook.py -> build/lib/tqdm
  copying tqdm/__init__.py -> build/lib/tqdm
  copying tqdm/_tqdm_notebook.py -> build/lib/tqdm
  copying tqdm/gui.py -> build/lib/tqdm
  copying tqdm/std.py -> build/lib/tqdm
  copying tqdm/dask.py -> build/lib/tqdm
  copying tqdm/cli.py -> build/lib/tqdm
  copying tqdm/tk.py -> build/lib/tqdm
  copying tqdm/notebook.py -> build/lib/tqdm
  copying tqdm/_utils.py -> build/lib/tqdm
  copying tqdm/_main.py -> build/lib/tqdm
  copying tqdm/__main__.py -> build/lib/tqdm
  copying tqdm/version.py -> build/lib/tqdm
  copying tqdm/_dist_ver.py -> build/lib/tqdm
  copying tqdm/_tqdm_pandas.py -> build/lib/tqdm
  copying tqdm/auto.py -> build/lib/tqdm
  copying tqdm/keras.py -> build/lib/tqdm
  copying tqdm/utils.py -> build/lib/tqdm
  copying tqdm/_tqdm_gui.py -> build/lib/tqdm
  creating build/lib/tqdm/contrib
  copying tqdm/contrib/itertools.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/slack.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/bells.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/__init__.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/concurrent.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/utils_worker.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/discord.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/telegram.py -> build/lib/tqdm/contrib
  copying tqdm/contrib/logging.py -> build/lib/tqdm/contrib
  running egg_info
  writing tqdm.egg-info/PKG-INFO
  writing dependency_links to tqdm.egg-info/dependency_links.txt
  writing entry points to tqdm.egg-info/entry_points.txt
  writing requirements to tqdm.egg-info/requires.txt
  writing top-level names to tqdm.egg-info/top_level.txt
  reading manifest file 'tqdm.egg-info/SOURCES.txt'
  adding license file 'LICENCE'
  writing manifest file 'tqdm.egg-info/SOURCES.txt'
  copying tqdm/completion.sh -> build/lib/tqdm
  copying tqdm/tqdm.1 -> build/lib/tqdm
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/asyncio.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/rich.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_tqdm.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_monitor.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/autonotebook.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/__init__.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_tqdm_notebook.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/gui.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/std.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/dask.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/cli.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/tk.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/notebook.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_utils.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/completion.sh -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_main.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/__main__.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/version.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_dist_ver.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/tqdm.1 -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_tqdm_pandas.py -> build/bdist.linux-x86_64/wheel/tqdm
  creating build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/itertools.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/slack.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/bells.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/__init__.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/concurrent.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/utils_worker.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/discord.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/telegram.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/contrib/logging.py -> build/bdist.linux-x86_64/wheel/tqdm/contrib
  copying build/lib/tqdm/auto.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/keras.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/utils.py -> build/bdist.linux-x86_64/wheel/tqdm
  copying build/lib/tqdm/_tqdm_gui.py -> build/bdist.linux-x86_64/wheel/tqdm
  running install_egg_info
  Copying tqdm.egg-info to build/bdist.linux-x86_64/wheel/tqdm-4.66.1-py3.11.egg-info
  running install_scripts
  creating build/bdist.linux-x86_64/wheel/tqdm-4.66.1.dist-info/WHEEL
  creating '/tmp/pip-wheel-rkezdm38/.tmp-sdmrkdp_/tqdm-4.66.1-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
  adding 'tqdm/__init__.py'
  adding 'tqdm/__main__.py'
  adding 'tqdm/_dist_ver.py'
  adding 'tqdm/_main.py'
  adding 'tqdm/_monitor.py'
  adding 'tqdm/_tqdm.py'
  adding 'tqdm/_tqdm_gui.py'
  adding 'tqdm/_tqdm_notebook.py'
  adding 'tqdm/_tqdm_pandas.py'
  adding 'tqdm/_utils.py'
  adding 'tqdm/asyncio.py'
  adding 'tqdm/auto.py'
  adding 'tqdm/autonotebook.py'
  adding 'tqdm/cli.py'
  adding 'tqdm/completion.sh'
  adding 'tqdm/dask.py'
  adding 'tqdm/gui.py'
  adding 'tqdm/keras.py'
  adding 'tqdm/notebook.py'
  adding 'tqdm/rich.py'
  adding 'tqdm/std.py'
  adding 'tqdm/tk.py'
  adding 'tqdm/tqdm.1'
  adding 'tqdm/utils.py'
  adding 'tqdm/version.py'
  adding 'tqdm/contrib/__init__.py'
  adding 'tqdm/contrib/bells.py'
  adding 'tqdm/contrib/concurrent.py'
  adding 'tqdm/contrib/discord.py'
  adding 'tqdm/contrib/itertools.py'
  adding 'tqdm/contrib/logging.py'
  adding 'tqdm/contrib/slack.py'
  adding 'tqdm/contrib/telegram.py'
  adding 'tqdm/contrib/utils_worker.py'
  adding 'tqdm-4.66.1.dist-info/LICENCE'
  adding 'tqdm-4.66.1.dist-info/METADATA'
  adding 'tqdm-4.66.1.dist-info/WHEEL'
  adding 'tqdm-4.66.1.dist-info/entry_points.txt'
  adding 'tqdm-4.66.1.dist-info/top_level.txt'
  adding 'tqdm-4.66.1.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Building wheel for tqdm (pyproject.toml): finished with status 'done'
  Created wheel for tqdm: filename=tqdm-4.66.1-py3-none-any.whl size=78257 sha256=3d449328a61418ea6a674bb66d2b995ec7f421a867f71c6fe19fe8c5c674ee01
  Stored in directory: /tmp/pip-ephem-wheel-cache-ti2ss2na/wheels/ec/25/d4/a693c83309fb7aa3286587a613e639de1a3c6be6797b2a3e76
Successfully built tqdm
Installing collected packages: tqdm

  changing mode of $PREFIX/bin/tqdm to 755
Successfully installed tqdm-4.66.1
Removed build tracker: '/tmp/pip-build-tracker-mdik4k7i'

Resource usage statistics from building tqdm:
   Process count: 2
   CPU time: Sys=0:00:00.0, User=0:00:00.0
   Memory: 15.0M
   Disk usage: 1.0K
   Time elapsed: 0:00:02.0


Packaging tqdm
Packaging tqdm-4.66.1-py311_0
compiling .pyc files...
number of files: 76
Fixing permissions
Packaged license file/s.
INFO :: Time taken to mark (prefix)
        0 replacements in 0 files was 0.03 seconds
Files containing CONDA_PREFIX
-----------------------------
bin/tqdm (text): Patching
WARNING: Importing conda-verify failed.  Please be sure to test your packages.  conda install conda-verify to make this message go away.
TEST START: /miniconda3/conda-bld/linux-64/tqdm-4.66.1-py311_0.conda
Adding in variants from /tmp/tmpw9mh3ub7/info/recipe/conda_build_config.yaml
Nothing to test for: /miniconda3/conda-bld/linux-64/tqdm-4.66.1-py311_0.conda
Renaming work directory '/miniconda3/conda-bld/tqdm_1707161703840/work' to '/miniconda3/conda-bld/tqdm_1707161703840/work_moved_tqdm-4.66.1-py311_0_linux-64_main_build_loop'
shutil.move(work)=/miniconda3/conda-bld/tqdm_1707161703840/work, dest=/miniconda3/conda-bld/tqdm_1707161703840/work_moved_tqdm-4.66.1-py311_0_linux-64_main_build_loop)
# Automatic uploading is disabled
# If you want to upload package(s) to anaconda.org later, type:


# To have conda build upload to anaconda.org automatically, use
# conda config --set anaconda_upload yes
anaconda upload \
    /miniconda3/conda-bld/linux-64/tqdm-4.66.1-py311_0.conda
anaconda_upload is not set.  Not uploading wheels: []

INFO :: The inputs making up the hashes for the built packages are as follows:
{
  "tqdm-4.66.1-py311_0.conda": {
    "recipe": {}
  }
}


####################################################################################
Resource usage summary:

Total time: 0:02:20.0
CPU usage: sys=0:00:00.0, user=0:00:00.0
Maximum memory usage observed: 15.0M
Total disk usage observed (not including envs): 1.0K
['/miniconda3/conda-bld/linux-64/tqdm-4.66.1-py311_0.conda']

@kenodegard kenodegard pinned this issue Feb 5, 2024
@kenodegard kenodegard self-assigned this Feb 5, 2024
@schuylermartin45
Copy link
Contributor

schuylermartin45 commented Feb 5, 2024

I started running into this on Friday on this repository's GitHub Actions: https://github.com/anaconda-distribution/percy/actions

I've determined locally this morning that if a conda-build operation runs a pytest with warnings, it will return with 1. Pytest at 7.4 seems to return 0. The build says it succeeds, but still returns with 1 as an error code.

...
INFO :: The inputs making up the hashes for the built packages are as follows:
{
  "percy-0.1.5-py_0.tar.bz2": {
    "recipe": {}
  }
}


####################################################################################
Resource usage summary:

Total time: 0:00:41.4
CPU usage: sys=0:00:00.4, user=0:00:03.5
Maximum memory usage observed: 282.9M
Total disk usage observed (not including envs): 1.8K
Error: Process completed with exit code 1.

What makes matters worse (and how I ran into this in percy) is if you don't specify the Python version and get set to 3.12 you can hit new pytest deprecation warnings that you would not have seen in your previous version of Python.

@kenodegard kenodegard added type::bug describes erroneous operation, use severity::* to classify the type severity::1 blocker; broken functionality with no workaround in-progress issue is actively being worked on and removed pending::support indicates user is waiting on support from triage engineers type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere labels Feb 5, 2024
@schuylermartin45
Copy link
Contributor

Upon further testing, I think the pytest warnings might be a bit of a red herring.

At @JeanChristopheMorinPerso's suggestion, I added a echo $? to my recipe's test section:

  commands:
    - pip check
    - python -m pytest -n auto percy/tests/
    - echo TODO rm get explicit error code $?

And it looks like the test itself produced a 0.

...
=============================== warnings summary ===============================
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.12/site-packages/boltons/timeutils.py:441: 12 warnings
  $PREFIX/lib/python3.12/site-packages/boltons/timeutils.py:441: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    EPOCH_NAIVE = datetime.utcfromtimestamp(0)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================== 57 passed, 1 skipped, 12 warnings in 7.15s ==================
+ echo TODO rm get explicit error code 0
+ exit 0
TODO rm get explicit error code 0

But conda-build still returns a 1.

@jaimergp
Copy link
Contributor

jaimergp commented Feb 5, 2024

conda-build will return non-zero, but conda build will correctly return 0 if no errors happened. This is caused by the recent change in which function the entry-points are targetting. execute() returns the list of built outputs, which is considered truthy by the sys.exit() wrapper injected in the entry point boilerplate.

xref #5158, #5151

@Callek
Copy link
Contributor

Callek commented Feb 5, 2024

conda-build will return non-zero, but conda build will correctly return 0 if no errors happened. This is caused by the recent change in which function the entry-points are targetting. execute() returns the list of built outputs, which is considered truthy by the sys.exit() wrapper injected in the entry point boilerplate.

xref #5158, #5151

I should note that I hit this issue even with conda build -- specifically in an environment specifically crafted to have conda-build installed I had run:

conda run -n special-env conda build -c some-channel --output-folder ./foo ../bar

(Its an internal repository but I can certainly share this with the conda maintainers)

EDIT: Entirely possible we're looking at two different issues surfacing in the same way.

@cmeyer
Copy link

cmeyer commented Feb 5, 2024

@jaimergp In my case, I am definitely runing with conda build and not conda-build.

Despite this, I get error messages like this (which have confused me). Maybe some wrapper is not launching properly.

2024-02-04T23:17:15.9377128Z Building conda package
2024-02-04T23:17:17.6601773Z C:\Users\runneradmin\miniconda3\envs\test\Scripts\conda-build-script.py:10: DeprecationWarning: conda_build.cli.main_build.main is deprecated and will be removed in 24.1.0. Use `conda build` instead.
2024-02-04T23:17:17.6603352Z   sys.exit(main())
2024-02-04T23:20:18.9255467Z WARNING: Using legacy MSVC compiler setup.  This will be removed in conda-build 4.0. If this recipe does not use a compiler, this message is safe to ignore.  Otherwise, use {{compiler('<language>')}} jinja2 in requirements/build.

@sebp
Copy link
Author

sebp commented Feb 5, 2024

conda-build will return non-zero, but conda build will correctly return 0 if no errors happened. This is caused by the recent change in which function the entry-points are targetting. execute() returns the list of built outputs, which is considered truthy by the sys.exit() wrapper injected in the entry point boilerplate.

xref #5158, #5151

You are correct, the conda-build wrapper passes the output of execute() to sys.exit():

import re
import sys

from conda_build.cli.main_build import execute

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(execute())

Executing conda run instead of conda-build does return the proper return code.

@kenodegard kenodegard moved this from 🆕 New to 🏗️ In Progress in 🧭 Planning Feb 5, 2024
@kenodegard kenodegard moved this from 🏗️ In Progress to 👀 In Review in 🧭 Planning Feb 6, 2024
sebp added a commit to sebp/scikit-survival-conda that referenced this issue Feb 6, 2024
@kenodegard kenodegard linked a pull request Feb 7, 2024 that will close this issue
3 tasks
@kenodegard kenodegard mentioned this issue Feb 7, 2024
43 tasks
@kenodegard
Copy link
Contributor

Fixed in #5169, working on a conda-build 24.1.1 patch (follow along here)

@github-project-automation github-project-automation bot moved this from 👀 In Review to 🏁 Done in 🧭 Planning Feb 7, 2024
@kenodegard kenodegard unpinned this issue Feb 20, 2024
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in-progress issue is actively being worked on locked [bot] locked due to inactivity severity::1 blocker; broken functionality with no workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants