ci: don’t pass GIT_EXEC_PATH inside test container #32935

issue olegrok openend this issue on July 10, 2025
  1. olegrok commented at 10:22 am on July 10, 2025: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    https://github.com/bitcoin/bitcoin/blob/83ae7802fe14af7eed9edd830f51a3269cc2bd23/ci/test/02_run_container.sh#L15C22-L15C24

    If host system is not ubuntu it could set GIT_EXEC_PATH to /usr/libexec/git-core (it should be /usr/lib/git-core) that causes git: 'remote-https' is not a git command. See 'git --help'. error.

    You need to change it to something like:

    0  python3 -c '
    1import os
    2
    3exclude = {"HOME", "PATH", "USER", "GIT_EXEC_PATH"}
    4
    5for key, value in os.environ.items():
    6    if "\n" in value or key in exclude:
    7        continue
    8    print(f"{key}={value}")
    9' | tee "/tmp/env-$USER-$CONTAINER_NAME"
    

    Expected behaviour

    git clone works fine

    Steps to reproduce

    Run CI script on e.g. awslinux and try to clone something inside build scripts

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master

    Operating system and version

    awslinux

    Machine specifications

    No response

  2. fanquake added the label Tests on Jul 10, 2025
  3. maflcko commented at 10:50 am on July 10, 2025: member

    Steps to reproduce

    Run CI script on e.g. awslinux and try to clone something inside build scripts

    You’ll have to include the full and exact steps to reproduce.

    Did you use https://github.com/bitcoin/bitcoin/blob/c4f90900b55f1a77fa68b627f73a494fab0ed98d/ci/README.md#L46 ?

    exclude

    I don’t think a list with excludes is maintainable. It is never going to be complete anyway. (see e.g. #31349 (comment), or any linux system that sets HOST, …)

    If this is an issue, even if you use the documented command from the readme, we’ll probably have to use explicit arg-passing (and arg-parsing). However, that is a breaking change, so I haven’t yet done it.

  4. olegrok commented at 11:30 am on July 10, 2025: none

    Did you use?

    No. I hoped that everything will works fine out-of-box. So here I just highlight possible issue. It was really hard to debug it.

    I don’t think a list with excludes is maintainable.

    That’s true. So feel free to close this issue if you don’t think anything actually can’t be improved here.

  5. maflcko commented at 11:40 am on July 10, 2025: member

    I think the possible solutions here are:

    • Keep everything as-is and just let people figure out that they need to follow the docs exactly.
    • Rename all env vars used internally in the ci to have some prefix like CI_... and then filter for those and only pass them. (easy-ish change, but still a breaking change)
    • Wrap the ci invocation into an arg-parser (larger re-write, also a breaking change)
    • something else?


olegrok maflcko

Labels
Tests


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-11 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me