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

Long stack traces from conda-build even in case of benign build failures #296

Closed
h-vetinari opened this issue Nov 19, 2023 · 1 comment
Closed

Comments

@h-vetinari
Copy link
Member

After the switch to conda-build (in v4 of the ci setup), something that happens very regularly on feedstocks -- a failing build script -- will now (occasionally?) cause long error reports from conda, which make it more confusing where the error is coming from. Here's an example. Everything but the first and last two lines should not be there.

  ERROR: Failed building wheel for mesas
ERROR: Could not build wheels for mesas, which is required to install pyproject.toml-based projects

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "C:\Miniforge\lib\site-packages\conda\exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "C:\Miniforge\lib\site-packages\conda\cli\main.py", line 83, in main_subshell
        exit_code = do_call(args, parser)
      File "C:\Miniforge\lib\site-packages\conda\cli\conda_argparse.py", line 140, in do_call
        result = plugin_subcommand.action(getattr(args, "_args", args))
      File "C:\Miniforge\lib\site-packages\conda_build\plugin.py", line 10, in build
        execute(*args, **kwargs)
      File "C:\Miniforge\lib\site-packages\conda_build\cli\main_build.py", line 568, in execute
        outputs = api.build(
      File "C:\Miniforge\lib\site-packages\conda_build\api.py", line 253, in build
        return build_tree(
      File "C:\Miniforge\lib\site-packages\conda_build\build.py", line 3804, in build_tree
        packages_from_this = build(
      File "C:\Miniforge\lib\site-packages\conda_build\build.py", line 2629, in build
        windows.build(
      File "C:\Miniforge\lib\site-packages\conda_build\windows.py", line 344, in build
        check_call_env(
      File "C:\Miniforge\lib\site-packages\conda_build\utils.py", line 445, in check_call_env
        return _func_defaulting_env_to_os_environ("call", *popenargs, **kwargs)
      File "C:\Miniforge\lib\site-packages\conda_build\utils.py", line 421, in _func_defaulting_env_to_os_environ
        raise subprocess.CalledProcessError(proc.returncode, _args)
    subprocess.CalledProcessError: Command '['cmd.exe', '/d', '/c', 'conda_build.bat']' returned non-zero exit status 1.

`$ C:\Miniforge\Scripts\conda-script.py build recipe -m .ci_support\win_64_python3.9.____cpython.yaml --suppress-variables --extra-meta flow_run_id=azure_20231108.1.2 remote_url=*** sha=dadb1c68ff0ffc1af148ec1922f6943671dfea26`

  environment variables:
BUILD_DEFINITIONFOLDERPATH=\
BUILD_REPOSITORY_LOCALPATH=D:\a\1\s
                 CIO_TEST=<not set>
                    CONDA=C:\Miniconda
    CONDA_ALLOW_SOFTLINKS=false
           CONDA_BLD_PATH=D:\\bld\\
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=C:\Miniforge\condabin\..\Scripts\conda.exe
CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1
             CONDA_PREFIX=C:\Miniforge
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=C:\Miniforge\python.exe
               CONDA_ROOT=C:\Miniforge
              CONDA_SHLVL=1
             CONDA_SOLVER=libmamba
           CURL_CA_BUNDLE=<not set>
           ENTRYPOINTPATH=C:\Miniforge\Scripts\SetPageFileSize.ps1
                 HOMEPATH=\Users\VssAdministrator
               LD_PRELOAD=<not set>
                     PATH=C:\Miniforge;C:\Miniforge\Library\mingw-
                          w64\bin;C:\Miniforge\Library\usr\bin;C:\Miniforge\Library\bin;C:\Minif
                          orge\Scripts;C:\Miniforge\bin;C:\Miniforge\condabin;C:\Miniforge\Scrip
                          ts;C:\agents\3.230.0\externals\git\cmd;C:\agents\3.230.0\externals\git
                          \mingw64\bin;C:\PROGRA~1\MongoDB\bin;C:\aliyun-cli;C:\vcpkg;C:\Program
                          Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\h\windows
                          \stack\2.13.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program
                          Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program
                          Files\R\R-4.3.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Program
                          Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)
                          \pipx_bin;C:\npm\prefix;C:\h\windows\go\1.20.11\x64\bin;C:\h\windows\P
                          ython\3.9.13\x64\Scripts;C:\h\windows\Python\3.9.13\x64;C:\h\windows\R
                          uby\3.0.6\x64\bin;C:\tools\kotlinc\bin;C:\h\windows\Java_Temurin-
                          Hotspot_jdk\8.0.392-8\x64\bin;C:\Program
                          Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure
If submitted, this report will be used by core maintainers to improve
                          \CLI2\wbin;C:\ProgramData\kind;C:\Windows\system32;C:\Windows;C:\Windo
future releases of conda.
                          ws\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows
                          \System32\OpenSSH;C:\Program Files\dotnet;C:\Program
                          Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform
                          Installer;C:\Program Files\Microsoft SQL Server\Client
                          SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL
                          Server\150\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows
                          Performance Toolkit;C:\Program Files\Microsoft SQL
                          Server\130\DTS\Binn;C:\Program Files\Microsoft SQL
                          Server\140\DTS\Binn;C:\Program Files\Microsoft SQL
                          Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn
                          ;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program
                          Files\TortoiseSVN\bin;C:\ProgramData\chocolatey\lib\maven\apache-
                          maven-3.8.7\bin;C:\Program Files\Microsoft Service
                          Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service
                          Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program
                          Files\nodejs;C:\Program Files\GitHub CLI;C:\SeleniumWebDrivers\ChromeD
                          river;C:\SeleniumWebDrivers\EdgeDriver;C:\Program
                          Files\Amazon\AWSCLIV2;C:\Program
                          Files\Amazon\SessionManagerPlugin\bin;C:\Program
                          Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL
                          Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\VssAdministra
                          tor\.dotnet\tools;C:\Users\VssAdministrator\.cargo\bin;C:\Users\VssAdm
                          inistrator\AppData\Local\Microsoft\WindowsApps
PSMODULEANALYSISCACHEPATH=C:\PSModuleAnalysisCachePath\ModuleAnalysisCache
             PSMODULEPATH=C:\Users\VssAdministrator\Documents\WindowsPowerShell\Modules;C:\\Modu
                          les\azurerm_2.1.0;C:\\Modules\azure_2.1.0;C:\Users\packer\Documents\Wi
                          ndowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\
                          Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program
                          Files\Microsoft SQL Server\130\Tools\PowerShell\Modules\
         PYTHONUNBUFFERED=1
       REQUESTS_CA_BUNDLE=<not set>
        SELENIUM_JAR_PATH=C:\selenium\selenium-server.jar
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : C:\Miniforge
            shell level : 1
       user config file : C:\Users\VssAdministrator\.condarc
 populated config files : C:\Miniforge\.condarc
                          C:\Users\VssAdministrator\.condarc
          conda version : 23.10.0
    conda-build version : 3.27.0
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : C:\Miniforge  (writable)
      conda av data dir : C:\Miniforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Miniforge\pkgs
                          C:\Users\VssAdministrator\.conda\pkgs
                          C:\Users\VssAdministrator\AppData\Local\conda\conda\pkgs
       envs directories : C:\Miniforge\envs
                          C:\Users\VssAdministrator\.conda\envs
                          C:\Users\VssAdministrator\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.10.0 requests/2.31.0 CPython/3.10.12 Windows/10 Windows/10.0.20348 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.3
          administrator : True
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>


No report sent. To permanently opt-out, use

    $ conda config --set report_errors false

##[error]Cmd.exe exited with code '1'.
##[section]Finishing: Run Windows build

CC @jaimergp, who asked me to open this issue after it came up in discussion in last week's core call.

@jaimergp
Copy link
Member

jaimergp commented Jun 7, 2024

This was addressed by changing to conda-build instead of conda build. This conversation also started a series of changes in conda-build to report the exceptions in a less noisy way (e.g. conda/conda-build#5264).

I think we can close now :)

@jaimergp jaimergp closed this as completed Jun 7, 2024
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