-
Notifications
You must be signed in to change notification settings - Fork 28.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-8558][BUILD] Script /dev/run-tests fails when _JAVA_OPTIONS env var set #6956
Conversation
Jenkins, this is ok to test. |
@@ -477,7 +477,15 @@ def determine_java_version(java_exe): | |||
|
|||
raw_output = subprocess.check_output([java_exe, "-version"], | |||
stderr=subprocess.STDOUT) | |||
raw_version_str = raw_output.split('\n')[0] # eg 'java version "1.8.0_25"' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it maybe better still to look for the first line starting with "java version" instead? is that not maybe more explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Will change.
Test build #35560 has finished for PR 6956 at commit
|
…g to have on a certain line number
…ng, but all have 'version' word. Surrounding with spaces for the case if version word appears in _JAVA_OPTIONS
Test build #35576 has finished for PR 6956 at commit
|
Test build #35580 has finished for PR 6956 at commit
|
LGTM |
raw_output_lines = raw_output.split('\n') | ||
|
||
# find raw version string, eg 'java version "1.8.0_25"' | ||
raw_version_str = next(str for str in raw_output_lines if " version " in str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: str
is a built-in function, so using it as a variable name will lead to spurious warnings in some Python linters. I'd just use x
or s
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
…to spurious warnings in some Python linters
Test build #35718 has finished for PR 6956 at commit
|
Thanks for updating. LGTM, so I'm merging this into master. |
No description provided.