conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
152 stars 181 forks source link

regenerate fails with ci-skeleton setup #1875

Closed marcohalder closed 7 months ago

marcohalder commented 7 months ago

Solution to issue cannot be found in the documentation.

Issue

I noticed that conda smithy regenerate started to fail with my conda-forge.yml because of the skip_render entries failing validation. So I created a minimal setup using ci-skeleton. It generated the following conda-forge.yml

clone_depth: 0
recipe_dir: recipe
skip_render:
  - README.md
  - LICENSE.txt
  - .gitattributes
  - .gitignore
  - build-locally.py
  - LICENSE
  - .github/CONTRIBUTING.md
  - .github/ISSUE_TEMPLATE.md
  - .github/PULL_REQUEST_TEMPLATE.md
  - .github/workflows

When trying to regenerate, it raised the same error.

(conda_build) PS C:\Users\XXXX\Documents\workspace\test> conda-smithy regenerate
  + Exception Group Traceback (most recent call last):
  |   File "C:\Users\XXXX\.conda\envs\conda_build\Scripts\conda-smithy-script.py", line 9, in <module>
  |     sys.exit(main())
  |   File "C:\Users\XXXX\.conda\envs\conda_build\lib\site-packages\conda_smithy\cli.py", line 733, in main
  |     args.subcommand_func(args)
  |   File "C:\Users\XXXX\.conda\envs\conda_build\lib\site-packages\conda_smithy\cli.py", line 584, in __call__
  |     self._call(args, tmpdir)
  |   File "C:\Users\XXXX\.conda\envs\conda_build\lib\site-packages\conda_smithy\cli.py", line 589, in _call
  |     configure_feedstock.main(
  |   File "C:\Users\XXXX\.conda\envs\conda_build\lib\site-packages\conda_smithy\configure_feedstock.py", line 2537, in main
  |     config = _load_forge_config(forge_dir, exclusive_config_file, forge_yml)
  |   File "C:\Users\XXXX\.conda\envs\conda_build\lib\site-packages\conda_smithy\configure_feedstock.py", line 2087, in _load_forge_config
  |     config = _read_forge_config(forge_dir, forge_yml=forge_yml)
  |   File "C:\Users\XXXX\.conda\envs\conda_build\lib\site-packages\conda_smithy\configure_feedstock.py", line 2003, in _read_forge_config
  |     raise ExceptionGroup("lints", [*map(ValueError, validate_lints)])
  | exceptiongroup.ExceptionGroup: lints (1 sub-exception)
  +-+---------------- 1 ----------------
    | ValueError: ['README.md', 'LICENSE.txt', '.gitattributes', '.gitignore', 'build-locally.py', 'LICENSE', '.github/CONTRIBUTING.md', '.github/ISSUE_TEMPLATE.md', '.github/PULL_REQUEST_TEMPLATE.md', '.github/workflows'] is not valid under any of the given schemas
    |
    | Failed validating 'anyOf' in schema['properties']['skip_render']:
    |     {'anyOf': [{'items': {'$ref': '#/$defs/BotConfigSkipRenderChoices'},
    |                 'type': 'array'},
    |                {'type': 'null'}],
    |      'description': 'This option specifies a list of files which `conda '
    |                     'smithy` will skip rendering.\n'
    |                     'This is useful for files that are not templates, but '
    |                     'are still in the recipe\n'
    |                     'directory. The default value is an empty list [ ], '
    |                     'which will consider that\n'
    |                     'all files can be rendered. For example, if you want '
    |                     'to skip rendering\n'
    |                     'the .gitignore and LICENSE.txt files, you can add the '
    |                     'following:\n'
    |                     '\n'
    |                     '```yaml\n'
    |                     'skip_render:\n'
    |                     '    - .gitignore\n'
    |                     '    - LICENSE.txt\n'
    |                     '```',
    |      'title': 'Skip Render'}
    |
    | On instance['skip_render']:
    |     ['README.md',
    |      'LICENSE.txt',
    |      '.gitattributes',
    |      '.gitignore',
    |      'build-locally.py',
    |      'LICENSE',
    |      '.github/CONTRIBUTING.md',
    |      '.github/ISSUE_TEMPLATE.md',
    |      '.github/PULL_REQUEST_TEMPLATE.md',
    |      '.github/workflows']
    +------------------------------------

Installed packages

# Name                    Version                   Build  Channel
anyio                     4.3.0              pyhd8ed1ab_0    conda-forge
archspec                  0.2.3              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
blinker                   1.7.0              pyhd8ed1ab_0    conda-forge
boltons                   23.1.1             pyhd8ed1ab_0    conda-forge
boolean.py                4.0                pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py310h00ffb61_1    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2024.2.2             h56e8100_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py310h8d17308_0    conda-forge
chardet                   5.2.0           py310h5588dad_1    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
cirun                     0.30               pyhd8ed1ab_0    conda-forge
click                     8.1.7           win_pyh7428d3b_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     24.1.2          py310h5588dad_0    conda-forge
conda-build               24.1.2          py310h5588dad_0    conda-forge
conda-forge-pinning       2024.03.15.08.29.55      hd8ed1ab_0    conda-forge
conda-index               0.4.0              pyhd8ed1ab_0    conda-forge
conda-libmamba-solver     24.1.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
conda-smithy              3.32.0             pyhd8ed1ab_0    conda-forge
conda-verify              3.1.1           py310h5588dad_1006    conda-forge
cryptography              42.0.5          py310h6e82f81_0    conda-forge
deprecated                1.2.14             pyh1a96a4e_0    conda-forge
distlib                   0.3.8              pyhd8ed1ab_0    conda-forge
distro                    1.9.0              pyhd8ed1ab_0    conda-forge
editables                 0.5                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
filelock                  3.13.1             pyhd8ed1ab_0    conda-forge
fmt                       10.2.1               h181d51b_0    conda-forge
future                    1.0.0              pyhd8ed1ab_0    conda-forge
git                       2.44.0               h57928b3_0    conda-forge
gitdb                     4.0.11             pyhd8ed1ab_0    conda-forge
gitpython                 3.1.42             pyhd8ed1ab_0    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hatch                     1.9.4              pyhd8ed1ab_0    conda-forge
hatchling                 1.21.1             pyhd8ed1ab_0    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  1.0.4              pyhd8ed1ab_0    conda-forge
httpx                     0.27.0             pyhd8ed1ab_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
hyperlink                 21.0.0             pyhd3deb0d_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.0.2              pyha770c72_0    conda-forge
importlib_metadata        7.0.2                hd8ed1ab_0    conda-forge
importlib_resources       6.3.0              pyhd8ed1ab_0    conda-forge
isodate                   0.6.1              pyhd8ed1ab_0    conda-forge
jaraco.classes            3.3.1              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.3              pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py310h5588dad_3    conda-forge
jsonschema                4.21.1             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
keyring                   24.3.1          py310h5588dad_0    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
libarchive                3.7.2                h313118b_1    conda-forge
libcurl                   8.5.0                hd5e4a3a_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
liblief                   0.12.3               h63175ca_0    conda-forge
libmamba                  1.5.7                h3f09ed1_0    conda-forge
libmambapy                1.5.7           py310h04f2035_0    conda-forge
libsolv                   0.7.28               h12be248_0    conda-forge
libsqlite                 3.45.2               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libxml2                   2.12.5               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
license-expression        30.1.1             pyhd8ed1ab_0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he774522_1000    conda-forge
m2-conda-epoch            20230914               0_x86_64    conda-forge
m2-patch                  2.7.6.2              hd8ed1ab_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5           py310h8d17308_0    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
menuinst                  2.0.2           py310h00ffb61_0    conda-forge
more-itertools            10.2.0             pyhd8ed1ab_0    conda-forge
msrest                    0.6.21             pyh44b312d_0    conda-forge
oauthlib                  3.2.2              pyhd8ed1ab_0    conda-forge
openssl                   3.2.1                hcfcfb64_0    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pathspec                  0.12.1             pyhd8ed1ab_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pkginfo                   1.10.0             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.4.0              pyhd8ed1ab_0    conda-forge
psutil                    5.9.8           py310h8d17308_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py-lief                   0.12.3          py310h00ffb61_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6           py310h8d17308_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pycryptodome              3.20.0          py310h8d17308_0    conda-forge
pygithub                  2.2.0              pyhd8ed1ab_0    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
pyjwt                     2.8.0              pyhd8ed1ab_1    conda-forge
pynacl                    1.5.0           py310h635b8f1_3    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.10.13         h4de0772_1_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-libarchive-c       5.1             py310h5588dad_0    conda-forge
python_abi                3.10                    4_cp310    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pywin32-ctypes            0.2.2           py310h5588dad_1    conda-forge
pyyaml                    6.0.1           py310h8d17308_1    conda-forge
referencing               0.33.0             pyhd8ed1ab_0    conda-forge
reproc                    14.2.4.post0         hcfcfb64_1    conda-forge
reproc-cpp                14.2.4.post0         h63175ca_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
requests-oauthlib         1.4.0              pyhd8ed1ab_0    conda-forge
rich                      13.7.1             pyhd8ed1ab_0    conda-forge
ripgrep                   11.0.2                        1    conda-forge
rpds-py                   0.18.0          py310h87d50f1_0    conda-forge
ruamel.yaml               0.18.6          py310h8d17308_0    conda-forge
ruamel.yaml.clib          0.2.8           py310h8d17308_0    conda-forge
scrypt                    0.8.24          py310h03188d8_0    conda-forge
setuptools                69.2.0             pyhd8ed1ab_0    conda-forge
shellingham               1.5.4              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smmap                     5.0.0              pyhd8ed1ab_0    conda-forge
sniffio                   1.3.1              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomli-w                   1.0.0              pyhd8ed1ab_0    conda-forge
tomlkit                   0.12.4             pyha770c72_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
tqdm                      4.66.2             pyhd8ed1ab_0    conda-forge
trove-classifiers         2024.3.3           pyhd8ed1ab_0    conda-forge
truststore                0.8.0              pyhd8ed1ab_0    conda-forge
typer                     0.9.0              pyhd8ed1ab_0    conda-forge
typing-extensions         4.10.0               hd8ed1ab_0    conda-forge
typing_extensions         4.10.0             pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
userpath                  1.7.0              pyhd8ed1ab_0    conda-forge
vc                        14.3                hcf57466_18    conda-forge
vc14_runtime              14.38.33130         h82b7239_18    conda-forge
virtualenv                20.25.1            pyhd8ed1ab_0    conda-forge
vs2015_runtime            14.38.33130         hcb4865c_18    conda-forge
vsts-python-api           0.1.25             pyhd8ed1ab_1    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
wrapt                     1.16.0          py310h8d17308_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
yaml-cpp                  0.8.0                h63175ca_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstandard                 0.22.0          py310h0009e47_0    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge

Environment info

active environment : conda_build
    active env location : C:\Users\XXXX\.conda\envs\conda_build
            shell level : 4
       user config file : C:\Users\XXXX\.condarc
 populated config files : C:\ProgramData\XXXX\.condarc
          conda version : 23.7.3
    conda-build version : 3.26.1
         python version : 3.9.18.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : C:\ProgramData\XXXX  (read only)
      conda av data dir : C:\ProgramData\XXXX\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\ProgramData\XXXX\pkgs
                          C:\Users\XXXX\.conda\pkgs
                          C:\Users\XXXX\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\XXXX\.conda\envs
                          C:\ProgramData\XXXX\envs
                          C:\Users\XXXX\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.7.3 requests/2.31.0 CPython/3.9.18 Windows/10 Windows/10.0.14393
          administrator : False
             netrc file : None
           offline mode : False
isuruf commented 7 months ago

I think it's better to remove validation for this. Adding all the files to the validation is tedious.

beckermr commented 7 months ago

I agree. I think anything is allowed here, right?

isuruf commented 7 months ago

Yes

jaimergp commented 7 months ago

Opened https://github.com/conda-forge/conda-smithy/pull/1878