Open der-ambi opened 1 month ago
I could not replicate the issue locally (git version 2.39.3):
→ rebar3 compile
===> Verifying dependencies...
===> Fetching certifi v2.9.0
===> Fetching grisp_updater (from {git,"https://github.com/grisp/grisp_updater.git",
{ref,"9b47ea1"}})
...
===> Compiling grisp_updater
===> Analyzing applications...
===> Compiling chk
λ [vps] chk → rebar3 version
rebar 3.23.0+build.5377.refbfc6839d on Erlang/OTP 26 Erts 14.1.1
Specifically the diagnostic view of checking out grisp_updater:
===> Fetching grisp_updater (from {git,"https://github.com/grisp/grisp_updater.git",
{ref,"9b47ea1"}})
===> sh info:
cwd: "/tmp/chk"
cmd: git --version
===> opts: []
===> Port Cmd: git --version
Port Opts: [exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof,binary]
===> sh info:
cwd: "/tmp/chk"
cmd: git clone -n https://github.com/grisp/grisp_updater.git .tmp_dir25254007423
===> opts: [{cd,"/tmp"}]
===> Port Cmd: git clone -n https://github.com/grisp/grisp_updater.git .tmp_dir25254007423
Port Opts: [{cd,"/tmp"},
exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof,binary]
===> sh info:
cwd: "/tmp/chk"
cmd: git checkout -q 9b47ea1
===> opts: [{cd,"/tmp/.tmp_dir25254007423"}]
===> Port Cmd: git checkout -q 9b47ea1
Port Opts: [{cd,"/tmp/.tmp_dir25254007423"},
exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof,binary]
===> sh info:
cwd: "/tmp/chk"
cmd: rm -rf /tmp/chk/_build/default/lib/grisp_updater
===> opts: [{use_stdout,false},abort_on_error]
===> Port Cmd: rm -rf /tmp/chk/_build/default/lib/grisp_updater
Port Opts: [exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof,binary]
===> Moving checkout "/tmp/.tmp_dir25254007423" to "/tmp/chk/_build/default/lib/grisp_updater"
===> sh info:
cwd: "/tmp/chk"
cmd: mv /tmp/.tmp_dir25254007423 /tmp/chk/_build/default/lib/grisp_updater
===> opts: [{use_stdout,false},abort_on_error]
===> Port Cmd: mv /tmp/.tmp_dir25254007423 /tmp/chk/_build/default/lib/grisp_updater
Port Opts: [exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof,binary]
I'm not sure if there's anything weird about the runners in gitlab or their filesystem that would make this happen? Are you able to replicate in other environments?
Found the culprit: The new buildroot release sets GIT_DIR=.
(https://github.com/buildroot/buildroot/commit/c07aafa087927ac6f10591bc13e30b7ecd5c7b7f)
This results in git checkout looking for the .git directory in the directory where the pipeline checked the tool that contains the rebar config files instead of the checked out dependency.
Not sure if you want to guard rebar against this, otherwise this issue can be closed.
Pre-Check
Environment
Rebar version: 3.22.1 git version: 2.40.1
rebar.config:
Current behaviour
Describe the current behaviour. In case of a failure, crash, or exception, please include the result of running the command with debug information:
It looks to me as if the git checkout is attempted in the wrong directory as the
cd /tmp/
specified in the opts does not happen (cwd does not change across command outputs)Expected behaviour
The command works as it did with Erlang 24.3.2