Skip to content

CI fails to remove example recipes #33420

@milahu

Description

@milahu

trying to build

in random CI runs, i get the false error

raise ValueError("Mixing meta.yaml and recipe.yaml recipes is not supported")

examples

2026-05-21T11:40:21.2120810Z + /Users/runner/miniforge3/bin/conda index /Users/runner/bld
...
2026-05-21T11:40:23.0778480Z 2026-05-21T11:40:23 osx-arm64 Writing index HTML
2026-05-21T11:40:23.4823670Z + echo ''
2026-05-21T11:40:23.4849780Z + echo 'Finding recipes merged in main and removing them from the build.'
2026-05-21T11:40:23.4888780Z 
2026-05-21T11:40:23.4915440Z Finding recipes merged in main and removing them from the build.
2026-05-21T11:40:23.4928840Z + pushd ./recipes
2026-05-21T11:40:23.5017840Z + '[' azure '!=' '' ']'
2026-05-21T11:40:23.5343350Z + git fetch --force origin main:main
2026-05-21T11:40:24.1293390Z From ***
2026-05-21T11:40:24.2284000Z  * [new branch]            main       -> main
2026-05-21T11:40:24.3350210Z    84c8fb76a9..e785e23ec7  main       -> origin/main
2026-05-21T11:40:24.3892730Z + shopt -s extglob dotglob
2026-05-21T11:40:24.3964420Z + git ls-tree --name-only main -- bline caf.cvt i2pd miniupnpc
2026-05-21T11:40:24.3999080Z + xargs -I '{}' sh -c 'rm -rf {} && echo Removing recipe: {}'
2026-05-21T11:40:24.4052150Z + shopt -u extglob dotglob
2026-05-21T11:40:24.4115180Z + popd
2026-05-21T11:40:24.4193400Z + echo ''
2026-05-21T11:40:24.4250060Z 
2026-05-21T11:40:24.4338780Z ##[endgroup]
2026-05-21T11:40:24.4402640Z + [[ -z '' ]]
2026-05-21T11:40:24.4464830Z ++ uname -m
2026-05-21T11:40:24.4535010Z + [[ x86_64 == \a\r\m\6\4 ]]
2026-05-21T11:40:24.4899830Z + TARGET_ARCH=64
2026-05-21T11:40:24.5328700Z + echo 'Building all recipes'
2026-05-21T11:40:24.5413250Z + python .ci_support/build_all.py --arch 64
2026-05-21T11:40:24.5518320Z Building all recipes
2026-05-21T11:40:26.8889830Z Traceback (most recent call last):
2026-05-21T11:40:26.8896930Z   File "/Users/runner/work/1/s/.ci_support/build_all.py", line 409, in <module>
2026-05-21T11:40:26.8900050Z     build_all(os.path.join(root_dir, "recipes"), args.arch)
2026-05-21T11:40:26.8902400Z   File "/Users/runner/work/1/s/.ci_support/build_all.py", line 109, in build_all
2026-05-21T11:40:26.8905530Z     raise ValueError("Mixing meta.yaml and recipe.yaml recipes is not supported")
2026-05-21T11:40:26.8909760Z ValueError: Mixing meta.yaml and recipe.yaml recipes is not supported
2026-05-21T11:40:27.0487390Z 
2026-05-21T11:40:27.1154160Z ##[error]Bash exited with code '1'.
2026-05-21T11:40:27.1708270Z ##[section]Finishing: Run OSX build

the error is correct
because i do have a mix of meta.yaml and recipe.yaml files

$ git checkout add-i2pd
$ ls recipes/*/*.yaml
recipes/example/meta.yaml
recipes/example-v1/recipe.yaml
recipes/i2pd/meta.yaml
recipes/miniupnpc/meta.yaml

but the error is wrong
because recipes/example-v1/recipe.yaml is part of the main branch

$ git checkout main
$ ls recipes/*/*.yaml
recipes/example/meta.yaml
recipes/example-v1/recipe.yaml
2026-05-21T11:40:23.4915440Z Finding recipes merged in main and removing them from the build.
2026-05-21T11:40:23.4928840Z + pushd ./recipes
2026-05-21T11:40:23.5017840Z + '[' azure '!=' '' ']'
2026-05-21T11:40:23.5343350Z + git fetch --force origin main:main
2026-05-21T11:40:24.1293390Z From ***
2026-05-21T11:40:24.2284000Z  * [new branch]            main       -> main
2026-05-21T11:40:24.3350210Z    84c8fb76a9..e785e23ec7  main       -> origin/main
2026-05-21T11:40:24.3892730Z + shopt -s extglob dotglob
2026-05-21T11:40:24.3964420Z + git ls-tree --name-only main -- bline caf.cvt i2pd miniupnpc
$ (cd recipes; git ls-tree --name-only main -- bline caf.cvt i2pd miniupnpc; ) | wc -l
0

this should be

$ (cd recipes; git ls-tree --name-only -d  main -- .; )
example-v1
example

... to list all directories in recipes which are tracked by the main branch

so both linux and osx CI runners are wrong
(but why does this work most of the time?)

git ls-tree --name-only main -- !(example|example-v1) | xargs -I {} sh -c "rm -rf ~/staged-recipes-copy/recipes/{} && echo Removing recipe: {}"

git ls-tree --name-only main -- !(example|example-v1) | xargs -I {} sh -c "rm -rf {} && echo Removing recipe: {}"

$ set -x
$ (cd recipes; git ls-tree --name-only main -- !(example|example-v1); ) | wc -l
+ wc -l
+ cd recipes
+ git ls-tree --name-only main -- i2pd miniupnpc
0

only the windows version seems correct 0__o

for /f "tokens=*" %%a in ('git ls-tree --name-only main -- .') do rmdir /s /q %%a && echo Removing recipe: %%a

linux build log

2026-05-21T11:37:41.0680891Z + shopt -u extglob dotglob
2026-05-21T11:37:41.0684095Z + find /home/conda/staged-recipes-copy/recipes -maxdepth 1 -name .DS_Store -delete
2026-05-21T11:37:41.0699899Z + echo 'Pending recipes.'
2026-05-21T11:37:41.0702562Z + ls -la /home/conda/staged-recipes-copy/recipes
2026-05-21T11:37:41.0703424Z Pending recipes.
2026-05-21T11:37:41.0726750Z total 32
2026-05-21T11:37:41.0733517Z drwxr-xr-x 8 conda conda 4096 May 21 11:37 .
2026-05-21T11:37:41.0734364Z drwxr-xr-x 9 conda conda 4096 May 21 11:37 ..
2026-05-21T11:37:41.0735089Z drwxr-xr-x 2 conda conda 4096 May 21 11:37 bline
2026-05-21T11:37:41.0735857Z drwxr-xr-x 2 conda conda 4096 May 21 11:37 caf.cvt
2026-05-21T11:37:41.0736482Z drwxr-xr-x 2 conda conda 4096 May 21 11:37 example
2026-05-21T11:37:41.0737093Z drwxr-xr-x 2 conda conda 4096 May 21 11:37 example-v1
2026-05-21T11:37:41.0737731Z drwxr-xr-x 2 conda conda 4096 May 21 11:37 i2pd
2026-05-21T11:37:41.0738376Z drwxr-xr-x 2 conda conda 4096 May 21 11:37 miniupnpc
2026-05-21T11:37:41.0739063Z + echo 'Finding recipes merged in main and removing them from the build.'
2026-05-21T11:37:41.0739877Z + pushd /home/conda/staged-recipes/recipes
2026-05-21T11:37:41.0740628Z + '[' azure '!=' '' ']'
2026-05-21T11:37:41.0741225Z Finding recipes merged in main and removing them from the build.
2026-05-21T11:37:41.0741873Z + git fetch --force origin main:main
2026-05-21T11:37:41.2308289Z From ***
2026-05-21T11:37:41.2310041Z  * [new branch]            main       -> main
2026-05-21T11:37:41.2369555Z + shopt -s extglob dotglob
2026-05-21T11:37:41.2373880Z + git ls-tree --name-only main -- bline caf.cvt i2pd miniupnpc
2026-05-21T11:37:41.2383376Z + xargs -I '{}' sh -c 'rm -rf ~/staged-recipes-copy/recipes/{} && echo Removing recipe: {}'
2026-05-21T11:37:41.2442253Z Removing recipe: bline
2026-05-21T11:37:41.2482053Z Removing recipe: caf.cvt
2026-05-21T11:37:41.2490276Z + shopt -u extglob dotglob

windows build log

2026-05-21T11:38:08.9978892Z Removing recipes also present in main
2026-05-21T11:38:09.1392709Z Removing recipe: bline
2026-05-21T11:38:09.1395997Z Removing recipe: caf.cvt
2026-05-21T11:38:09.1571288Z Removing recipe: example-v1
2026-05-21T11:38:09.1572390Z Removing recipe: example
2026-05-21T11:38:09.1572905Z Index D:\bld

workaround

retry the CI run

git commit --amend --no-edit
git push --force

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions