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

nutritious-monkey-78516

10/17/2018, 4:42 PM
So I am looking at the CI section of the pantsbuild docs. I tried to run the example “CI Job” but it is pulling up
Build graph construction failed: Exception No source of required dependency: Dep graph contained a cycle.
e

enough-analyst-54434

10/17/2018, 4:52 PM
The bottom of this page?: https://www.pantsbuild.org/orgs.html If so, can you run each step individually and report at which step it fails. Also - for what repo? Is this for the Pants repo or your own? This script seems to work for the Pants repo itself. Helpful in doing all this would be to turn on stack traces. One way to do this is to
export PANTS_PRINT_EXCEPTION_STACKTRACE=True
.
n

nutritious-monkey-78516

10/17/2018, 7:45 PM
It doesn’t work on our personal repo. I’ll test it out with the pants repo to see if it’ll work.
It starts to act up at this point:
dependees=$(./pants dependees --dependees-transitive --dependees-closed $changed)
changed=$(./pants --changed-parent=origin/master list)
Gives an error like this: `WARNING: No targets were matched in goal
list
.`
e

enough-analyst-54434

10/17/2018, 9:03 PM
OK. It seems like with some judicious 2>/dev/null and empty string tests you could repair all this and perhaps send up a PR for a doc change to indicate a more robust script.
w

witty-crayon-22786

10/17/2018, 11:49 PM
@nutritious-monkey-78516:
--print-exception-stacktrace
will show you where the cycle in the graph exists
(or the env variable John mentioned: a good idea to use in CI anyway)
n

nutritious-monkey-78516

10/18/2018, 6:56 AM
Okay thanks for the help. I’ll try to figure out what’s going on.