aw-was-here commented on issue #91: YETUS-943 Test patch fails to extract 
version information from a JDK11 jvm
URL: https://github.com/apache/yetus/pull/91#issuecomment-589762475
 
 
   > > I've become "uncomfortable" with these reports when running in --docker 
mode; they report what's available on the host machine, not what's used within 
the environment.
   
   VERSION_DATA, which stores most of this info, like most of the 
Yetus-specific globals are wiped clean and recalculated upon re-exec.  There is 
one version number that I can think of that is passed through as a special 
case, however:  the docker version.  There is no way to know that info reliably 
once precommit is on the other side of the container wall AFAIK. (Specifically 
here: 
https://github.com/apache/yetus/blob/46cb58913f05b0fa257d923681268c03ff504f84/precommit/src/main/shell/core.d/docker.sh#L819
 )
   
   > That sounds like a bug. It's supposed to be what's in the container. 
unless maybe we mount host JAVA_HOME when given?
   
   The JAVA_HOME env var is, however, passed in ( 
https://github.com/apache/yetus/blob/46cb58913f05b0fa257d923681268c03ff504f84/precommit/src/main/shell/core.d/docker.sh#L37
 ) . On re-exec, the java.sh logic kicks in to establish if the JAVA_HOME value 
is valid 
(https://github.com/apache/yetus/blob/46cb58913f05b0fa257d923681268c03ff504f84/precommit/src/main/shell/test-patch.d/java.sh#L51)
 .  In turn, this means if JAVA_HOME points to a valid path both inside and 
outside the container, it will get used. It is effectively used as a 
replacement for using --java-home.
   
   Also, keep in mind this hack: 
https://github.com/apache/yetus/blob/46cb58913f05b0fa257d923681268c03ff504f84/precommit/src/main/shell/test-patch-docker/launch-test-patch.sh#L44
 to make sure we have SOMETHING in JAVA_HOME if the user never set it at all 
and the project uses ant/gradle/maven/whatever.
   
   Volume mounting binaries should absolutely not be happening, otherwise, OS X 
and Windows hosts running precommit would blow up spectacularly.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to