Fix an issue where ivy-bootstrap is ignoring http proxy setttings

Review Request #3522 - Created March 2, 2016 and submitted

Information
Chris Chen
pants
Reviewers
pants-reviews
stuhood, zundel

Ran a pants build in AWS and it failed on ivy-boostrap even with all the right https/http proxy settings, essentially the same issue mentioned by someone here

https://groups.google.com/forum/#!searchin/pants-devel/ivy$20failed/pants-devel/5XTt_sWRSbM/SxIKArR-BgAJ

It turns out boostrap ivy is not pulling in extra_jvm_options.

Here is an example of the failure, and you can clearly see the additional java properties were not in the command.

00:00:05.480 22:17:46 00:01 [ivy-bootstrap]DEBUG] Executing: /opt/java/jdk1.8.0_60/bin/java -Divy.cache.dir=/home/centos/.ivy2/pants -cp ../../.cache/pants/tools/jvm/ivy/bootstrap.jar org.apache.ivy.Main -confs default -cachepath /home/centos/.cache/pants/tools/jvm/ivy/0c6799f2e85eccc7061443f76e45b7b268892b58.classpath -dependency org.apache.ivy ivy 2.4.0 args={'stderr': <pants.util.rwbuf.FileBackedRWBuf object at 0x3375390>, 'stdout': <pants.util.rwbuf.FileBackedRWBuf object at 0x3375490>} at cwd=/home/centos/workspace/
00:04:20.661
00:04:20.661 ==== stderr ====
00:04:20.661
00:04:20.661 ==== stdout ====
00:04:20.661 :: loading settings :: url = jar:file:/home/centos/.cache/pants/tools/jvm/ivy/bootstrap.jar!/org/apache/ivy/core/settings/ivysettings.xml
00:04:20.661 :: resolving dependencies :: org.apache.ivy#ivy-caller;working
00:04:20.661 confs: [default]
00:04:20.661 :: resolution report :: resolve 254775ms :: artifacts dl 0ms
00:04:20.661 ---------------------------------------------------------------------
00:04:20.661 | | modules || artifacts |
00:04:20.661 | conf | number| search|dwnlded|evicted|| number|dwnlded|
00:04:20.661 ---------------------------------------------------------------------
00:04:20.661 | default | 1 | 0 | 0 | 0 || 0 | 0 |
00:04:20.661 ---------------------------------------------------------------------
00:04:20.661
00:04:20.661 :: problems summary ::
00:04:20.661 :::: WARNINGS
00:04:20.661 module not found: org.apache.ivy#ivy;2.4.0
00:04:20.661
00:04:20.661 ==== local: tried
00:04:20.661
00:04:20.661 /home/centos/.ivy2/local/org.apache.ivy/ivy/2.4.0/ivys/ivy.xml
00:04:20.661
00:04:20.661 -- artifact org.apache.ivy#ivy;2.4.0!ivy.jar:
00:04:20.661
00:04:20.661 /home/centos/.ivy2/local/org.apache.ivy/ivy/2.4.0/jars/ivy.jar
00:04:20.661
00:04:20.661 ==== shared: tried
00:04:20.661
00:04:20.661 /home/centos/.ivy2/shared/org.apache.ivy/ivy/2.4.0/ivys/ivy.xml
00:04:20.661
00:04:20.661 -- artifact org.apache.ivy#ivy;2.4.0!ivy.jar:
00:04:20.661
00:04:20.661 /home/centos/.ivy2/shared/org.apache.ivy/ivy/2.4.0/jars/ivy.jar
00:04:20.661
00:04:20.661 ==== public: tried
00:04:20.661
00:04:20.661 https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.pom
00:04:20.661
00:04:20.661 -- artifact org.apache.ivy#ivy;2.4.0!ivy.jar:
00:04:20.661
00:04:20.661 https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar
00:04:20.661
00:04:20.661 ::::::::::::::::::::::::::::::::::::::::::::::
00:04:20.661
00:04:20.661 :: UNRESOLVED DEPENDENCIES ::
00:04:20.661
00:04:20.661 ::::::::::::::::::::::::::::::::::::::::::::::
00:04:20.661
00:04:20.661 :: org.apache.ivy#ivy;2.4.0: not found
00:04:20.661
00:04:20.661 ::::::::::::::::::::::::::::::::::::::::::::::
00:04:20.661
00:04:20.661
00:04:20.661 :::: ERRORS
00:04:20.661 Server access error at url https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.pom (java.net.ConnectException: Connection timed out)
00:04:20.661
00:04:20.661 Server access error at url https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar (java.net.ConnectException: Connection timed out)
00:04:20.661
00:04:20.661
00:04:20.661 :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
00:04:20.661
00:04:20.680 22:22:01 04:16 [complete]
00:04:20.682 FAILUREException caught: (<class 'pants.ivy.bootstrapper.Error'>)

https://github.com/pantsbuild/pants/pull/2990
seems like CI flakness?

Chris Chen
Stu Hood
Eric Ayers
Chris Chen
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 163891632500d180751c38cda1a78039f1c21af9

Loading...