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

Make sure $MINIFORGE_HOME exists during osx build #2142

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

hadim
Copy link
Member

@hadim hadim commented Nov 19, 2024

Checklist

  • Added a news entry
  • Regenerated schema JSON if schema altered (python conda_smithy/schema.py)

I noticed this issue when using pixi as conda install tool. The mkdir command is outside the pixi condition but I can also move it inside it if you prefer. Let me know.

@hadim hadim requested a review from a team as a code owner November 19, 2024 19:13
@hadim
Copy link
Member Author

hadim commented Nov 19, 2024

For the record, the failure happens at https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1085096&view=logs&j=7df89df7-19f1-5ccc-b210-32c1d05c0f56&t=c5e4c004-2534-57b9-b739-c5013de31afa

 ╭─ Finding outputs from recipe
 │ Found 1 variants
 │ Build variant: fasttext-for-deepsearch-glm-0.1.0-np122py39h4efc4f0_2
 │ 
 │ ╭──────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
 │ │ Variant                  ┆ Version                                                                                                 │
 │ ╞══════════════════════════╪═════════════════════════════════════════════════════════════════════════════════════════════════════════╡
 │ │ CONDA_BUILD_SYSROOT      ┆ /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk │
 │ │ MACOSX_DEPLOYMENT_TARGET ┆ 11.0                                                                                                    │
 │ │ build_platform           ┆ osx-64                                                                                                  │
 │ │ c_stdlib                 ┆ macosx_deployment_target                                                                                │
 │ │ c_stdlib_version         ┆ 11.0                                                                                                    │
 │ │ channel_targets          ┆ conda-forge main                                                                                        │
 │ │ cxx_compiler             ┆ clangxx                                                                                                 │
 │ │ cxx_compiler_version     ┆ 18                                                                                                      │
 │ │ numpy                    ┆ 1.22                                                                                                    │
 │ │ python                   ┆ 3.9.* *_cpython                                                                                         │
 │ │ target_platform          ┆ osx-arm64                                                                                               │
 │ ╰──────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 │
 ╰─────────────────── (took 0 seconds)
Error:   × failed to create directory `/Users/runner/miniforge3/conda-bld`: No such
  │ file or directory (os error 2)

@hadim
Copy link
Member Author

hadim commented Nov 19, 2024

I am now seeing a new issue where validate_recipe_outputs is looking for the built packages into a pixi env directory instead of conda-bld. It only happens on osx and not linux:

Adding in variants from internal_defaults
Adding in variants from argument_variants
Traceback (most recent call last):
  File "/Users/runner/work/1/s/.pixi/envs/default/bin/validate_recipe_outputs", line 11, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/runner/work/1/s/.pixi/envs/default/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/1/s/.pixi/envs/default/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/runner/work/1/s/.pixi/envs/default/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/1/s/.pixi/envs/default/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/1/s/.pixi/envs/default/lib/python3.12/site-packages/conda_forge_ci_setup/feedstock_outputs.py", line 158, in main
    distributions = built_distributions_from_recipe_variant(recipe_dir=recipe_dir, variant=variant)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/1/s/.pixi/envs/default/lib/python3.12/site-packages/conda_forge_ci_setup/utils.py", line 126, in built_distributions_from_recipe_variant
    for dist in built_distributions(subdirs=allowed_subdirs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/1/s/.pixi/envs/default/lib/python3.12/site-packages/conda_forge_ci_setup/utils.py", line 109, in built_distributions
    for path in os.listdir(os.path.join(conda_build.config.croot, subdir)):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/runner/work/1/s/.pixi/envs/default/conda-bld/noarch'

Full logs at https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1085116&view=logs&j=c8b8640e-759f-5af3-65b5-809c078c71b1&t=afb740aa-a99a-548c-edee-7cc314e30345

@beckermr
Copy link
Member

Let's merge this pr and then make a new issue+pr for the validation stuff.

@beckermr beckermr merged commit 9b81225 into conda-forge:main Nov 19, 2024
2 checks passed
@hadim hadim deleted the pixi_osx branch November 19, 2024 23:28
@@ -8,6 +8,8 @@ set -xe

MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3}
MINIFORGE_HOME=${MINIFORGE_HOME%/} # remove trailing slash
mkdir -p ${MINIFORGE_HOME}
Copy link
Member

@jakirkham jakirkham Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work with Miniforge however

The following...

mkdir tst_mf_home_already_present
bash ~/Downloads/Miniforge3-24.9.0-0-MacOSX-arm64.sh -b -p tst_mf_home_already_present

...gives this error...

ERROR: File or directory already exists: 'tst_mf_home_already_present'
If you want to update an existing installation, use the -u option.

Think this should be moved into the pixi block instead or we add -u to the Miniforge command

Edit: Micromamba would likely have the same issue

@beckermr
Copy link
Member

I can't revert from my phone but feel free to go ahead. Otherwise I can do it later.

@jakirkham
Copy link
Member

Let's just fix it instead of reverting as it is a one line change: #2146

Was mentioning in case we were planning to release soon. Think we should hold off until it is confirmed fixed

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

Successfully merging this pull request may close these issues.

3 participants