conda-build icon indicating copy to clipboard operation
conda-build copied to clipboard

`tests/test_api_build.py::test_checkout_tool_as_dependency` failure

Open kenodegard opened this issue 1 year ago • 0 comments

What happened?

GitHub is discontinuing SVN support: https://github.blog/2023-01-20-sunsetting-subversion-support/

This caused the tests/test_api_build.py::test_checkout_tool_as_dependency test to start failing.

Fixing the failure started to uncover more issues than could be reasonably resolved while trying to get a hotfix out (see https://github.com/conda/conda-build/pull/5096), so for now the test has been marked as xfail until we have time to address all of the issues.

Discovery:

  1. I first tried to refactor the test to use Git instead of SVN, this worked for Linux/macOS but on Windows resulted in some perplexing cloning errors
  2. After digging some more it seems the cloning error comes from how git is invoked. Before cloning a git repo, we "detect" the git executable using conda_build.os_utils.external.find_executable which injects the root_dir (a.k.a. context.root_prefix) paths ahead of everything on PATH. IOW the build env is shadowed by the root env (SVN and Mercurial on the other hand do not do this detection and rather just runs svn and hg commands via subprocess.Popen and so the build env takes priority).
  3. The special git executable detection done appears to be done in order to later pass the same executable to the patching logic? Not sure yet why this is necessary.

kenodegard avatar Dec 06 '23 02:12 kenodegard