<#9417 nailgun-server dependency not found when PA...
# github-notifications
c
#9417 nailgun-server dependency not found when PANTS_WORKDIR not under cwd Issue created by bjorn-spire I have been updating our repository to use a newer version of pants (we have been on 1.16) and I saw the warnings about Ivy going away, and while we don't use JVM at this point, I figured I should silence the warning and did the upgrade step. But then we couldn't run pants on our CI servers anymore. One of the things we have done on CI to keep things a bit faster on each node is to set
export PANTS_WORKDIR=/var/go/ais-pipeline.pants.d
(go is our CI system, nothing to do with the language) and I noticed that when running on CI if I didn't have this environment variable set it resolves correctly. For now I have resolved this by removing the setting for Coursier, but I would love to have this keep working going forward. I would be happy to have a go at trying to fix this with some guidance. I am guessing that the hint with cwd in the log below may make it tougher than I think? :x The errors we got when trying to run
./pants -ldebug test
was:
Copy code
[…snip…]
06:33:44 [DEBUG] pants.binaries.binary_util:pid=19352: binary_request: BinaryRequest(supportdir='bin/coursier', version='1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417', name='coursier', platform_dependent=False, external_url_generator=<pants.backend.jvm.tasks.coursier.coursier_subsystem.CoursierUrlGenerator object at 0x7e068df512b0>, archiver=None)
06:33:44 [DEBUG] pants.binaries.binary_util:pid=19352: self._allow_external_binary_tool_downloads: True
06:33:44 [DEBUG] pants.binaries.binary_util:pid=19352: external_url_generator: <pants.backend.jvm.tasks.coursier.coursier_subsystem.CoursierUrlGenerator object at 0x7e068df512b0>
06:33:44 [DEBUG] pants.binaries.binary_util:pid=19352: fetch_request: BinaryFetchRequest(download_path='bin/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier', urls=('<https://github.com/coursier/coursier/releases/download/pants_release_1.5.x/coursier-cli-1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417.jar>',))
06:33:44 [DEBUG] pants.binaries.binary_util:pid=19352: bootstrapped_binary_path: /var/go/.cache/pants/bin/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier
06:33:44 [DEBUG] pants.binaries.binary_util:pid=19352: Selected coursier binary bootstrapped to: /var/go/.cache/pants/bin/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier

06:33:44 00:11       [coursier]06:33:44 [DEBUG] pants.java.executor:pid=19352: Executing: /usr/bin/java -Xmx256m -cp /var/go/.cache/pants/bin/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier coursier.cli.Coursier fetch -t --cache /var/go/.cache/pants/coursier -r <https://repo1.maven.org/maven2> -A jar,bundle,test-jar,maven-plugin,src,doc -q --no-default -n 8 --json-output-file /var/go/ais-pipeline.pants.d/bootstrap/bootstrap-jvm-tools/a0ebe8e0b001/tmp/tmpxgduw_td com.martiansoftware:nailgun-server:0.9.1 args={} at cwd=/var/lib/go-agent1/pipelines/ais-pipeline--pr
06:33:49 [DEBUG] pants.process.lock:pid=19352: releasing lock: <pants.process.lock.OwnerPrintingInterProcessFileLock object at 0x7e06941f2828>

               Waiting for background workers to finish.
06:33:49 00:16   [complete]
               FAILURE

ERROR: /var/lib/go-agent1/pipelines/ais-pipeline--pr is not a directory containing /var/go/ais-pipeline.pants.d/bootstrap/bootstrap-jvm-tools/a0ebe8e0b001/cache/relative/https/repo1.maven.org/maven2/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.jar
The file in question exists:
Copy code
$ ls -l /var/go/ais-pipeline.pants.d/bootstrap/bootstrap-jvm-tools/a0ebe8e0b001/cache/relative/https/repo1.maven.org/maven2/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.jar
-rw-r--r--. 2 go go 32927 Dec  3  2012 /var/go/ais-pipeline.pants.d/bootstrap/bootstrap-jvm-tools/a0ebe8e0b001/cache/relative/https/repo1.maven.org/maven2/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.jar
pantsbuild/pants