-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Ensure working JVM before enabling Jib actions to avoid hangs #5725
Ensure working JVM before enabling Jib actions to avoid hangs #5725
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5725 +/- ##
==========================================
- Coverage 70.70% 70.67% -0.04%
==========================================
Files 428 429 +1
Lines 16199 16213 +14
==========================================
+ Hits 11454 11459 +5
- Misses 3900 3907 +7
- Partials 845 847 +2
Continue to review full report at Codecov.
|
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.
Seems good! Just have one question
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.
Looking good, just noticed a tiny inconsistency
Co-authored-by: Marlon Gamez <marlongamez@google.com>
Add TestMain around jib unit tests to force JVMFound to true.
I hit hanging-tests again this morning when testing a different change on my M1! PTAL @MarlonGamez: I tweaked the implementation again and this is now working on all platforms. |
Fixes: #5493
Fixes: #5380
Description
macOS provides facades for the common Java executables (e.g.,
java
,javac
) that attempt to find and invoke the corresponding commands from a suitable Java VM (normally found in/Library/Java/JavaVirtualMachines
). When no Java VM is available, these facades error:But using a Maven Wrapper script (
mvnw
) instead results in a hang! Tracing through the script shows:This PR adds a check that a working JVM exists before using Jib.