Skip to content

ci: Fix Windows Conan build hanging on pip's git clone - #1480

Draft
cedrik-fuoco-adsk wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:fix-windows-conan-pip-git-hang
Draft

cedrik-fuoco-adsk wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:fix-windows-conan-pip-git-hang

Conversation

@cedrik-fuoco-adsk

Copy link
Copy Markdown
Contributor

Linked issues

None.

Summarize your change.

On Windows, pip's install of the Python requirements now clones git+ requirements with the git CMake found (Git for Windows on CI) instead of msys2's git.

Describe the reason for the change.

The Windows Conan job still hangs after #1453, for example https://github.com/AcademySoftwareFoundation/OpenRV/actions/runs/41551959301/job/125641485096.

#1453 works for every clone CMake runs: in that run they all used C:/Program Files/Git/cmd/git.exe and finished. The hang moved to pip. Installing requirements.txt, pip ran git clone --filter=blob:none --quiet https://github.com/cedrik-fuoco-adsk/OpenTimelineIO.git ... and it never returned, with two orphan git processes left at the six-hour cancel.

pip doesn't use find_program, so CMAKE_PROGRAM_PATH has no effect on it. It runs git by name from PATH, and in the msys2 shell msys2's /usr/bin/git.exe comes first, which is the git that hangs.

I scoped this to the pip command rather than the job's PATH, because putting Git for Windows first on the global PATH broke FFmpeg's build in #1453.

Describe what you have tested and on which operating system.

Not tested on Windows yet; this draft is to get the Conan Windows build to run. cmake-format passes, and I checked cmake -E env --modify PATH=path_list_prepend: with a path containing a space on macOS. The hang is intermittent, so one green run won't prove the fix. A few nightlies without a hang would.

Add a list of changes, and note any that might need special attention during the review.

  • cmake/dependencies/python3.cmake: on Windows, prepended the directory of GIT_EXECUTABLE to PATH for the pip requirements install, using the same --modify PATH=path_list_prepend: pattern already used there for cmake and cl.exe.
  • GIT_EXECUTABLE comes from FIND_PACKAGE(Git) in cmake/dependencies/CMakeLists.txt, which runs before INCLUDE(python3) and honors CMAKE_PROGRAM_PATH. If git isn't found, nothing changes.

pip clones git+ requirements with "git" from PATH, which inside msys2 is
msys2's git, the binary that intermittently hangs on Windows. The
CMAKE_PROGRAM_PATH fix only covers find_program, so pip's clone of
OpenTimelineIO still used msys2's git. Prepend the directory of
GIT_EXECUTABLE to PATH for the pip requirements install so it uses the
same git as the rest of the build.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Print which sh, make and awk FFmpeg's build uses, the dependency command configure wrote to ffbuild/config.mak, and a make/sh/awk backslash round trip started both from sh and from MSBuild. Remove before merge.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
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.

1 participant