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

unexpected urllib3 DEBUG logging from conda-build #4539

Closed
2 tasks done
maddenp opened this issue Jul 26, 2022 · 11 comments
Closed
2 tasks done

unexpected urllib3 DEBUG logging from conda-build #4539

maddenp opened this issue Jul 26, 2022 · 11 comments
Labels
duplicate indicate issues/PRs that are duplicates of another type::bug describes erroneous operation, use severity::* to classify the type

Comments

@maddenp
Copy link
Contributor

maddenp commented Jul 26, 2022

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

conda-build emits a stream of urllib3 DEBUG messages, which are distracting and unhelpful. For example:

(base) ~/zlib-feedstock % conda build recipe 2>&1 | tee out
...
INFO:conda_build.metadata:Attempting to finalize metadata for libzlib
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/channeldata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/channeldata.json HTTP/1.1" 200 None
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/gcc_linux-64-11.2.0-h5c386dc_0.conda HTTP/1.1" 200 26109
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Attempting to finalize metadata for zlib
INFO:conda_build.metadata:Attempting to finalize metadata for zlib
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/libgcc-ng-11.2.0-h1234567_1.conda HTTP/1.1" 200 5602184
...

and many more.

Conda Info

active environment : base
    active env location : /users/PYS0343/pmadden/miniconda
            shell level : 1
       user config file : /users/PYS0343/pmadden/.condarc
 populated config files : 
          conda version : 4.13.0
    conda-build version : 3.21.9
         python version : 3.9.12.final.0
       virtual packages : __linux=3.10.0=0
                          __glibc=2.17=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /users/PYS0343/pmadden/miniconda  (writable)
      conda av data dir : /users/PYS0343/pmadden/miniconda/etc/conda
  conda av metadata url : None
           channel URLs : 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 : /users/PYS0343/pmadden/miniconda/pkgs
                          /users/PYS0343/pmadden/.conda/pkgs
       envs directories : /users/PYS0343/pmadden/miniconda/envs
                          /users/PYS0343/pmadden/.conda/envs
               platform : linux-64
             user-agent : conda/4.13.0 requests/2.27.1 CPython/3.9.12 Linux/3.10.0-1160.71.1.el7.x86_64 rhel/7.9 glibc/2.17
                UID:GID : 30065:5387
             netrc file : /users/PYS0343/pmadden/.netrc
           offline mode : False

Conda Config

<no output>

Conda list

(base) ~/zlib-feedstock % conda list --show-channel-urls
# packages in environment at /users/PYS0343/pmadden/miniconda:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    defaults
_openmp_mutex             4.5                       1_gnu    defaults
backports                 1.1                pyhd3eb1b0_0    defaults
backports.functools_lru_cache 1.6.4              pyhd3eb1b0_0    defaults
backports.tempfile        1.0                pyhd3eb1b0_1    defaults
backports.weakref         1.0.post1                  py_1    defaults
beautifulsoup4            4.11.1           py39h06a4308_0    defaults
brotlipy                  0.7.0           py39h27cfd23_1003    defaults
bzip2                     1.0.8                h7b6447c_0    defaults
ca-certificates           2022.07.19           h06a4308_0    defaults
certifi                   2022.6.15        py39h06a4308_0    defaults
cffi                      1.15.0           py39hd667e15_1    defaults
chardet                   4.0.0           py39h06a4308_1003    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
click                     8.0.4            py39h06a4308_0    defaults
colorama                  0.4.4              pyhd3eb1b0_0    defaults
conda                     4.13.0           py39h06a4308_0    defaults
conda-build               3.21.9           py39h06a4308_0    defaults
conda-content-trust       0.1.1              pyhd3eb1b0_0    defaults
conda-package-handling    1.8.1            py39h7f8727e_0    defaults
conda-verify              3.4.2                      py_1    defaults
cryptography              36.0.0           py39h9ce1e76_0    defaults
filelock                  3.6.0              pyhd3eb1b0_0    defaults
future                    0.18.2           py39h06a4308_1    defaults
glob2                     0.7                pyhd3eb1b0_0    defaults
icu                       58.2                 he6710b0_3    defaults
idna                      3.3                pyhd3eb1b0_0    defaults
jinja2                    2.11.3             pyhd3eb1b0_0    defaults
ld_impl_linux-64          2.35.1               h7274673_9    defaults
libarchive                3.5.2                h5de8990_0    defaults
libffi                    3.3                  he6710b0_2    defaults
libgcc-ng                 9.3.0               h5101ec6_17    defaults
libgomp                   9.3.0               h5101ec6_17    defaults
liblief                   0.11.5               h295c915_1    defaults
libstdcxx-ng              9.3.0               hd4cf53a_17    defaults
libxml2                   2.9.14               h74e7548_0    defaults
lz4-c                     1.9.3                h295c915_1    defaults
markupsafe                2.0.1            py39h27cfd23_0    defaults
ncurses                   6.3                  h7f8727e_2    defaults
openssl                   1.1.1q               h7f8727e_0    defaults
patchelf                  0.13                 h295c915_0    defaults
pip                       21.2.4           py39h06a4308_0    defaults
pkginfo                   1.8.2              pyhd3eb1b0_0    defaults
psutil                    5.8.0            py39h27cfd23_1    defaults
py-lief                   0.11.5           py39h295c915_1    defaults
pycosat                   0.6.3            py39h27cfd23_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pyopenssl                 22.0.0             pyhd3eb1b0_0    defaults
pysocks                   1.7.1            py39h06a4308_0    defaults
python                    3.9.12               h12debd9_0    defaults
python-libarchive-c       2.9                pyhd3eb1b0_1    defaults
pytz                      2022.1           py39h06a4308_0    defaults
pyyaml                    6.0              py39h7f8727e_1    defaults
readline                  8.1.2                h7f8727e_1    defaults
requests                  2.27.1             pyhd3eb1b0_0    defaults
ripgrep                   12.1.1                        0    defaults
ruamel_yaml               0.15.100         py39h27cfd23_0    defaults
setuptools                61.2.0           py39h06a4308_0    defaults
six                       1.16.0             pyhd3eb1b0_1    defaults
soupsieve                 2.3.1              pyhd3eb1b0_0    defaults
sqlite                    3.38.2               hc218d9a_0    defaults
tk                        8.6.11               h1ccaba5_0    defaults
tqdm                      4.63.0             pyhd3eb1b0_0    defaults
tzdata                    2022a                hda174b7_0    defaults
urllib3                   1.26.8             pyhd3eb1b0_0    defaults
wheel                     0.37.1             pyhd3eb1b0_0    defaults
xz                        5.2.5                h7b6447c_0    defaults
yaml                      0.2.5                h7b6447c_0    defaults
zlib                      1.2.12               h7f8727e_1    defaults
zstd                      1.5.2                ha4553b6_0    defaults

Additional Context

I just picked a random coda-forge feedstock (https://github.com/conda-forge/zlib-feedstock) and ran conda build recipe to reproduce this.

@maddenp maddenp added the type::bug describes erroneous operation, use severity::* to classify the type label Jul 26, 2022
@skupr-anaconda
Copy link
Contributor

It seems like the issue will be fixed in the latest release 3.22.0, see #4517

@nviraj
Copy link

nviraj commented Aug 12, 2023

Hi,

I seem to be facing this after updating my environment. Not sure what is changed.

Tried setting verbosity to 0. Any way to disable this?

If it helps, other folks seem to be facing similar issues here

(base) C:\Users\user>conda config --set verbosity 0

(base) C:\Users\user>conda update --all -n base
Collecting package metadata (current_repodata.json): \ DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
| DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/win-64/current_repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/win-64/current_repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/msys2/noarch/current_repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/current_repodata.json HTTP/1.1" 304 0
/ DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/msys2/win-64/current_repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/current_repodata.json HTTP/1.1" 304 0
done
Solving environment: done

# All requested packages already installed.

@floriandierickx
Copy link

floriandierickx commented Aug 14, 2023

I have the same issue on conda 23.7.2 [Windows x64 Power shell]. Although the previously mentioned issue/commit #4517 merged urllib3.connectionpool to default_loggers in the master branch (currently renamed to main branch), the issue seems to have re-appeared?

Currently on lines 1387-1211 of conda-build/conda_build/utils.py in the main branch https://github.com/conda/conda-build/blob/f004c5d9a175263ba4ed7bd87bdcd2d507ab6ad2/conda_build/utils.py#L1387C1-L1411C6:

class LoggingContext:
    default_loggers = [
        "conda",
        "binstar",
        "install",
        "conda.install",
        "fetch",
        "conda.instructions",
        "fetch.progress",
        "print",
        "progress",
        "dotupdate",
        "stdoutlog",
        "requests",
        "conda.core.package_cache",
        "conda.plan",
        "conda.gateways.disk.delete",
        "conda_build",
        "conda_build.index",
        "conda_build.noarch_python",
        "urllib3.connectionpool",
        "conda_index",
        "conda_index.index",
        "conda_index.index.convert_cache",
    ]

@jacobsvensmark
Copy link

jacobsvensmark commented Aug 15, 2023

I get similar output from a completely fresh Anaconda3 23.7.2 installation on Ubuntu 22.04.3 (x86_64) when I do basically anything with conda:

$ conda create --name myenv
Collecting package metadata (current_repodata.json): done
Solving environment: done
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/current_repodata.json HTTP/1.1" 200 None

### Package Plan ###

 environment location: /home/jsv/anaconda3/envs/myenv



Proceed ([y]/n)?

@sniffo
Copy link

sniffo commented Aug 15, 2023

I have the same issue. Fresh Anaconda Install on Ubuntu 22.04.3 (x86_64). An example:

Collecting package metadata (repodata.json): - 
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/repodata.json HTTP/1.1" 304 0

@Nayeli-Luis
Copy link

I have the same issue with Ubuntu 23.04 (x86_64):

Collecting package metadata (current_repodata.json): / DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
| DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/linux-64/current_repodata.json HTTP/1.1" 200 None
done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): - DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
\ DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/repodata.json HTTP/1.1" 200 None
| DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/linux-64/repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/noarch/repodata.json HTTP/1.1" 200 None

I have conda 23.7.2.

@nandobonf
Copy link

Same issue here. Looks like a bug

@doem97
Copy link

doem97 commented Aug 16, 2023

Same here, MacOS, zsh shell, conda 23.7.2

@AliMiraftab
Copy link

The same issue on Mac. Conda info:

     active environment : base
    active env location : /Users/.../anaconda3
            shell level : 1
       user config file : /Users/.../.condarc
 populated config files : /Users/.../.condarc
          conda version : 23.7.2
    conda-build version : 3.26.0
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=arm64
                          __osx=13.5=0
                          __unix=0=0
       base environment : /Users/.../anaconda3  (writable)
      conda av data dir : /Users/.../anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/.../anaconda3/pkgs
                          /Users/.../.conda/pkgs
       envs directories : /Users/.../anaconda3/envs
                          /Users/.../.conda/envs
               platform : osx-arm64
             user-agent : conda/23.7.2 requests/2.31.0 CPython/3.11.4 Darwin/22.6.0 OSX/13.5
                UID:GID : 501:20
             netrc file : None
           offline mode : False

@chen861019
Copy link

chen861019 commented Aug 17, 2023

https://anaconda.org/anaconda/conda-build/files
1.Download version 3.25
2."conda install /path/conda-build-3.25.0-py38haa95532_0.tar.bz2"
(Please note the path for the package.)

@kenodegard kenodegard added the duplicate indicate issues/PRs that are duplicates of another label Aug 17, 2023
@kenodegard
Copy link
Contributor

This recent regression is a duplicate of #4949 and has already been fixed in #4953 and will be available in the upcoming conda-build 3.26.1 release (see #4969).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate indicate issues/PRs that are duplicates of another type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

No branches or pull requests