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

Issue with conda_build.api.render with new conda-build 3.21.8 #4398

Closed
npanpaliya opened this issue Mar 17, 2022 · 3 comments
Closed

Issue with conda_build.api.render with new conda-build 3.21.8 #4398

npanpaliya opened this issue Mar 17, 2022 · 3 comments
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release help-wanted we don't know the solution or we especially want a community member to contribute the code change pending::discussion contains some ongoing discussion that needs to be resolved prior to proceeding source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity tag::api related to the public API type::tech-debt identifies or resolves some technical debt

Comments

@npanpaliya
Copy link

npanpaliya commented Mar 17, 2022

The latest version of conda-build 3.21.8 is causing a failure when conda_build.api.render is called on https://github.com/open-ce/bazel-feedstock/blob/main/recipe/meta.yaml and with config https://github.com/open-ce/open-ce/blob/main/envs/conda_build_config.yaml. However, CLI command conda render works just fine.

Actual Behavior

Our code which calls conda_build.api.render is at https://github.com/open-ce/open-ce-builder/blob/main/open_ce/conda_utils.py#L52

When this code is executed via our open-ce validate config utility, it gives below error -

  File "/153/open-ce-builder/open_ce/conda_utils.py", line 53, in render_yaml
    metas = conda_build.api.render(path,
  File "~/anaconda3/lib/python3.8/site-packages/conda_build/api.py", line 42, in render
    metadata_tuples = render_recipe(recipe_path, bypass_env_check=bypass_env_check,
  File "~/anaconda3/lib/python3.8/site-packages/conda_build/render.py", line 838, in render_recipe
    m.config.compute_build_id(m.name(), m.version(), reset=reset_build_id)
  File "~/anaconda3/lib/python3.8/site-packages/conda_build/config.py", line 611, in compute_build_id
    shutil.move(old_dir, work_dir)
  File "~/anaconda3/lib/python3.8/shutil.py", line 802, in move
    copy_function(src, real_dst)
  File "~/anaconda3/lib/python3.8/shutil.py", line 432, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "~/anaconda3/lib/python3.8/shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '~/anaconda3/conda-bld/work'

When I use conda render CLI utility, conda render -m ./open-ce/envs/conda_build_config.yaml bazel-feedstock/recipe/, it works fine without any error.

Expected Behavior

Should work with no failure. Also conda_build.api.render and conda render should be in sync.

Output of conda info
     active environment : base
    active env location : $HOME/anaconda3
            shell level : 1
       user config file : $HOME/.condarc
 populated config files : $HOME/anaconda3/.condarc
                          $HOME/.condarc
          conda version : 4.12.0
    conda-build version : 3.21.8
         python version : 3.8.5.final.0
       virtual packages : __linux=4.18.0=0
                          __glibc=2.28=0
                          __unix=0=0
                          __archspec=1=ppc64le
       base environment : $HOME/anaconda3  (writable)
      conda av data dir : $HOME/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-ppc64le
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-ppc64le
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : $HOME/anaconda3/pkgs
                          $HOME/.conda/pkgs
       envs directories : $HOME/anaconda3/envs
                          $HOME/.conda/envs
               platform : linux-ppc64le
             user-agent : conda/4.12.0 requests/2.24.0 CPython/3.8.5 Linux/4.18.0-348.7.1.el8_5.ppc64le rhel/8.5 glibc/2.28
                UID:GID : 600229:1095455
             netrc file : None
           offline mode : False

@npanpaliya
Copy link
Author

#4228 (comment)

@LtDan33 LtDan33 added type::tech-debt identifies or resolves some technical debt source::community catch-all for issues filed by community members tag::api related to the public API pending::discussion contains some ongoing discussion that needs to be resolved prior to proceeding backlog issue has been triaged but has not been earmarked for any upcoming release labels May 31, 2022
@kenodegard kenodegard added the help-wanted we don't know the solution or we especially want a community member to contribute the code change label May 31, 2022
@kenodegard
Copy link
Contributor

@npanpaliya Thanks for reporting this. The conda CLI does a lot of setup work that the API simply does not perform. It's definitely important for us to bring the CLI and API in sync. The conda CLI should be a very thin wrapper for the API calls.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Jun 24, 2023
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Jul 25, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release help-wanted we don't know the solution or we especially want a community member to contribute the code change pending::discussion contains some ongoing discussion that needs to be resolved prior to proceeding source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity tag::api related to the public API type::tech-debt identifies or resolves some technical debt
Projects
Archived in project
Development

No branches or pull requests

3 participants