So I'm running in this issue. ``` ## Exception whe...
# general
b
So I'm running in this issue.
Copy code
## Exception when compiling 44 sources to /data/var/lib/jenkins/workspace/pr-mediarithmics-platform-pants/.pants.d/compile/zinc/a53b6931478d/mediarithmics-api.core-api.src.test.scala.scala/current/classes
                       [error] java.io.IOException: Analysis at (d6aa1af9a111c49918f3f1e79451c82b: /data/var/lib/jenkins/workspace/pr-mediarithmics-platform-pants/.pants.d/compile/zinc/a53b6931478d/mediarithmics-api.common-play-api.src.main.scala.scala/9520fc387886/z.analysis) has changed since startup!
I'm using pants
1.14.0
but I have no idea where to look to solve this error. for a bit of context, we run our tests using the following script
h
Do you know at which line the script fails within the Bash script? Try running with set -x to see what has executed
b
This happens line 25 (in the first for loop)
It breaks after 30 minutes
a
is there a reason you're running pants in a loop here instead of providing all the targets on the command line? it seems reasonable you might be running into a race condition bug but not immediately sure where, and it might be avoided by doing it all at once
b
not really, this script was inspired from the at the bottom o this page : https://www.pantsbuild.org/orgs.html Re-running it without loops …
This seems to fix the problem. It revealed another bug that I fixed and I'm now waiting the end of the build. But I don't understand the race condition, isn't bash supposed to run the command sequentially ? or does pants return while it is still doing something in the background ?
so the build succeeded, thank you very much for the pointer !
🎉 1
a
hello, just wanted to say i've just made a diff which updates the script you were basing yours off of to avoid running in a loop -- thanks for your patience! https://github.com/pantsbuild/pants/pull/7478
❤️ 1
the race condition is definitely on pants's side, bash isn't to blame. i cannot say for sure what it is but pants will do some cache operations in the background and it's possible that those background operations hadn't yet ended before the next pants run started, causing pants to raise that error
oops, i was a little wrong (see https://github.com/pantsbuild/pants/pull/7478#pullrequestreview-221474463). if your CI script works, then great -- but pants unfortunately right now will pull all the classpaths of all targets together at once if you provide all the targets on the command line at once, and this might lead to different behavior than if each is run once at a time. the recommended approach is probably then to run in a loop, but as you've described, that leads to an additional error. so for now if it works i would leave it to run all at once, but we will look into the issue with running in a loop
created https://github.com/pantsbuild/pants/issues/7480 as well for the underlying issue
b
don't thank me for my patience, thank you for your answers ! for the big classpath issue this is fixed in test with the
--no-fast
options. And we are trying to avoid classes with the same name as intellij with pants can't find which you are talking about it there is more than one (this is a seldom case, but very annoying when it happens XD )