https://pantsbuild.org/ logo
#general
Title
# general
a

adorable-engine-71736

01/31/2023, 10:04 AM
hi - i just removed my
./pants
script from the repo, and added
pantsup.sh
- im getting a flake - seemingly only in CI and not local, although that could just be because im testing more in CI - typical error is:
Copy code
āœ“ mypy succeeded.
FATAL: exception not rethrown
FATAL: exception not rethrown
/home/runner/work/_temp/f3725c23-b66e-48a4-b13a-9692347a0610.sh: line 1:  1684 Aborted                 (core dumped) ./scripts/pants check ::
Error: Process completed with exit code 134.
i can open a ticket but i wanted to rule out that im doing something incorrect first
this is the
./scripts/pants
that is referred to in err msg:
Copy code
$ cat scripts/pants
#!/bin/bash -e

if [[ ! -e ~/.cache/pants/bin/pants ]]; then
    mkdir -p ~/.cache/pants/bin
    ./scripts/pantsup.sh -d ~/.cache/pants/bin
fi

exec ~/.cache/pants/bin/pants "$@"
h

happy-kitchen-89482

01/31/2023, 4:15 PM
Hmm, I don't see anything obviously wrong
a

adorable-engine-71736

01/31/2023, 4:16 PM
seems to work locally - not sure what is different in ci
also its a ~1 in 5 flake - mostly it works
shall i open a ticket - i have reverted for now but happy to test etc ?
h

happy-kitchen-89482

01/31/2023, 4:18 PM
What are you using for CI?
A ticket would be great
šŸ‘ 1
a

adorable-engine-71736

01/31/2023, 4:18 PM
gh actions
h

happy-kitchen-89482

01/31/2023, 4:19 PM
I've often used this https://github.com/marketplace/actions/debugging-with-ssh to ssh into a running GHA container and poke around
E.g., to see what this
/home/runner/work/_temp/f3725c23-b66e-48a4-b13a-9692347a0610.sh
is
a

adorable-engine-71736

01/31/2023, 4:20 PM
ah cool - i will try that at some point
h

happy-kitchen-89482

01/31/2023, 4:21 PM
You just add
Copy code
- name: Setup upterm session
      uses: lhotari/action-upterm@v1
to the job after checkout but before the offending command runs, and then run the ssh command emitted to the job's output, and then you can run that script manually a few times and see what happens
If you want to catch it on failure you'll need to set up that SSH step to run conditionally on that failure, which is a bit more messing around
a

adorable-engine-71736

01/31/2023, 4:22 PM
cool, thanks - neat trick
2 Views