so, my `./pants --changed-since=origin/master list...
# general
a
so, my
./pants --changed-since=origin/master list
no longer works... on CI. locally works fine:
Copy code
╰─➤  git --version
git version 2.30.2

╰─➤  ./pants --changed-since=origin/master list      
14:33:17.78 [INFO] Initializing scheduler...
but on ci... fails:
Copy code
$ git --version
git version 2.20.1

$ ./pants -ldebug --changed-since=$CHANGED_SINCE list
01:32:16.80 [DEBUG] Detected git repository at /builds/infloai/repo on branch None
01:32:16.80 [DEBUG] Executing: git --git-dir=/builds/infloai/repo/.git --work-tree=/builds/infloai/repo diff --name-only HEAD -- /builds/infloai/repo
01:32:16.83 [DEBUG] Executing: git --git-dir=/builds/infloai/repo/.git --work-tree=/builds/infloai/repo diff --name-only origin/master...HEAD -- /builds/infloai/repo
01:32:16.84 [ERROR] git --git-dir=/builds/infloai/repo/.git --work-tree=/builds/infloai/repo diff --name-only origin/master...HEAD -- /builds/infloai/repo failed with exit code 128
(Use --print-stacktrace for more error details and/or --no-process-execution-local-cleanup to inspect chroots. See <https://www.pantsbuild.org/v2.7/docs/troubleshooting> for common issues. Consider reaching out for help: <https://www.pantsbuild.org/v2.7/docs/getting-help.>)
h
What happens if you run this command directly in CI?
Copy code
git --git-dir=/builds/infloai/repo/.git --work-tree=/builds/infloai/repo diff --name-only origin/master...HEAD -- /builds/infloai/repo
a
Copy code
$ git --git-dir=/builds/infloai/repo/.git --work-tree=/builds/infloai/repo diff --name-only origin/master...HEAD -- /builds/infloai/repo
fatal: bad revision 'origin/master...HEAD'
h
Hm, getting that working will be the root of it. Pants is simply shelling out to Git, so if the underlying Git process isn't working, Pants won't
a
hmm
b
Is it possible that
master
is now
main
these days, like many other repos?
a
f***ing gitlab-ci. literal pain in the ass.
nope, the
origin/master
is from
$CI_DEFAULT_BRANCH
so it exists.
b
what does
git branch -a
get you?
a
Copy code
$ git branch --all
* (HEAD detached at cc39b80)
b
Is that in CI?
a
yeah
ah, solved it. have to change the git-clone-depth to 0
👍 1
h
What changed from before? It sounded like it had been working previously iiuc
a
I have no idea tbh. I suspect it's something weird like the depth wasn't deep enough to pick up
master