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

v1 recipe fails when using git as source on Windows #2239

Open
hadim opened this issue Feb 4, 2025 · 0 comments
Open

v1 recipe fails when using git as source on Windows #2239

hadim opened this issue Feb 4, 2025 · 0 comments

Comments

@hadim
Copy link
Member

hadim commented Feb 4, 2025

When using this recipe with the c-f infrastructure:

context:
  name: katago
  version: 1.15.3

package:
  name: ${{ name|lower }}
  version: ${{ version }}

source:
  git: https://github.com/lightvector/KataGo.git
  tag: v${{ version }}

build:
  number: 0
  script:
    - touch hello.txt

about:
  summary: GTP engine and self-play learning in Go
  license: MIT
  license_file: LICENSE
  homepage: https://github.com/lightvector/KataGo

extra:
  recipe-maintainers:
    - hadim

It fails during a window build with:

 ╭─ Running build for recipe: katago-1.15.3-h57928b3_0
 │
 │ ╭─ Fetching source code
 │ │ Fetching source from git repo: https://github.com/lightvector/KataGo.git
 │ │ Fetching repository from https://github.com/lightvector/KataGo.git at refs/tags/v1.15.3 into D:\bld\src_cache\KataGo.git
 │ │ × error Command failed: `git rev-parse "refs/tags/v1.15.3"`
 │ │
 │ ╰─────────────────── (took 8 seconds)
 │
 ╰─────────────────── (took 8 seconds)
Error: 
  × Failed to run git command: failed to get valid hash for rev

Traceback (most recent call last):
  File "D:\a\1\s\.ci_support\build_all.py", line 356, in <module>
    build_all(os.path.join(root_dir, "recipes"), args.arch)
  File "D:\a\1\s\.ci_support\build_all.py", line 192, in build_all
    build_folders_rattler_build(recipes_dir, platform, arch, channel_urls)
  File "D:\a\1\s\.ci_support\build_all.py", line 292, in build_folders_rattler_build
    subprocess.run(args + ["--variant-config", fp.name], check=True)

Note that it does not fail on osx and linux.

See this simple experiment to reproduce: conda-forge/staged-recipes#28906


The original issue has been spotted at conda-forge/katago-feedstock#11 where I was seeing actually two different but maybe related errors depending on the conda_install_tool used:

  • conda_install_tool: micromamba: same as above in staged-recipes
 ╭─ Running build for recipe: katago-1.15.3-h57928b3_0
 │
 │ ╭─ Fetching source code
 │ │ Fetching source from git repo: https://github.com/lightvector/KataGo.git
 │ │ Fetching repository from https://github.com/lightvector/KataGo.git at refs/tags/v1.15.3 into D:\bld\src_cache\KataGo.git
 │ │ × error Command failed: `git rev-parse "refs/tags/v1.15.3"`
 │ │
 │ ╰─────────────────── (took 8 seconds)
 │
 ╰─────────────────── (took 8 seconds)
Error: 
  × Failed to run git command: failed to get valid hash for rev

Traceback (most recent call last):
  File "D:\a\1\s\.ci_support\build_all.py", line 356, in <module>
    build_all(os.path.join(root_dir, "recipes"), args.arch)
  File "D:\a\1\s\.ci_support\build_all.py", line 192, in build_all
    build_folders_rattler_build(recipes_dir, platform, arch, channel_urls)
  File "D:\a\1\s\.ci_support\build_all.py", line 292, in build_folders_rattler_build
    subprocess.run(args + ["--variant-config", fp.name], check=True)
  • conda_install_tool: pixi:
Error: 
  × Failed to run git command: Git clone failed for source: Cloning into '/d/
  │ bld/src_cache/KataGo.git'...
  │ fatal: unable to access 'https://github.com/lightvector/KataGo.git/':
  │ error setting certificate file: /usr/ssl/certs/ca-bundle.crt

Important: this issue is likely c-f related, since it does not happen when building those same recipes on Windows' runner in a simple GH action without any of the c-f infra setup (experiment not shown since it's in a private repo).

For completeness and given the above comment, I also opened two tickets in the pixi and rattler-build repos but I doubt those are the culprit here:

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

No branches or pull requests

1 participant