You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to debug by reproducing ERROR:kicad-diff.py:Nothing to compare! here https://gitlab.com/olliver/lapod/-/jobs/5926844760, I noticed that things may not work as expected when trying to compare using the branch that is the same as the currently checked out branch. This because git worktree refuses to checkout the same branch twice. Normally this is not a good idea, as one might be committing to the same branch from two different locations, but kibot only does read-only operations, so this is a non-issue, and kibot also removes the created branch afterwards. Because of that, we probably should use the --force parameter to git worktree add.
ERROR:Running ['/usr/bin/git', 'worktree', 'add', '/tmp/tmpfd90sbcp', 'dev'] returned 128 (kibot.gs - gs.py:791)
I have no name!@3c5acab7ecdb:/workspace/lapod/hello$ git worktree list
/workspace/lapod 815ec22 [dev]
I have no name!@3c5acab7ecdb:/workspace/lapod/hello$ git worktree add /tmp/asdf dev
Preparing worktree (checking out 'dev')
fatal: 'dev' is already checked out at '/workspace/lapod'
I have no name!@3c5acab7ecdb:/workspace/lapod/hello$ git worktree add -f /tmp/asdf dev
Preparing worktree (checking out 'dev')
HEAD is now at 815ec22 test
I have no name!@3c5acab7ecdb:/workspace/lapod/hello$ git worktree list
/workspace/lapod 815ec22 [dev]
/tmp/asdf 815ec22 [dev]
P.S. My issue might be due to some caching of the git tree, the worktree that kibot adds, based on the branch name, is some old/weird sha. I am doing GIT_DIFF_REF_NEW: "${CI_COMMIT_REF_NAME}" right now, where CI_COMMIT_REF_NAME should be the current relevant branch name, which is nicer in the filename then HEAD, so if this is the issue, and a --force, then I may need to add a bug report for that :)
Looking at the history, might be related to either 9ea3e39, as it was working fine before, or gitlab cache issue, where the 'dev' branch is not up to date (they clone and checkout 'HEAD', not a specific branch.
The text was updated successfully, but these errors were encountered:
I agree on the 'normally', but the patch is still wise I recon, especially since we are in a contained environment, doing our own cleanup.
Sadly, this didn't fix my bug :( So I'll investigate as to what causes 'Nothing to compare', and see if it is indeed a caching issue with gitlab, and just requires me to forcefully do a 'git fetch'.
While trying to debug by reproducing
ERROR:kicad-diff.py:Nothing to compare!
here https://gitlab.com/olliver/lapod/-/jobs/5926844760, I noticed that things may not work as expected when trying to compare using the branch that is the same as the currently checked out branch. This becausegit worktree
refuses to checkout the same branch twice. Normally this is not a good idea, as one might be committing to the same branch from two different locations, but kibot only does read-only operations, so this is a non-issue, and kibot also removes the created branch afterwards. Because of that, we probably should use the--force
parameter togit worktree add
.P.S. My issue might be due to some caching of the git tree, the worktree that kibot adds, based on the branch name, is some old/weird sha. I am doing
GIT_DIFF_REF_NEW: "${CI_COMMIT_REF_NAME}"
right now, whereCI_COMMIT_REF_NAME
should be the current relevant branch name, which is nicer in the filename thenHEAD
, so if this is the issue, and a--force
, then I may need to add a bug report for that :)Looking at the history, might be related to either 9ea3e39, as it was working fine before, or gitlab cache issue, where the 'dev' branch is not up to date (they clone and checkout 'HEAD', not a specific branch.
The text was updated successfully, but these errors were encountered: