-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25854][BUILD] fix build/mvn not to fail during Zinc server shutdown
#22854
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
Conversation
build/mvn
Outdated
| if [ $ZINC_STATUS -eq 0 ]; then | ||
| # zinc is still running! | ||
| "${ZINC_BIN}" -shutdown -port ${ZINC_PORT} | ||
| exit 0 |
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.
I suppose you just want to exit 0 outside the if-else, for clarity, but whatever. This is all fine and can be back-ported back to 2.2
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.
i put the else in there for clarity, and in case we want to ever do something (like report that zinc timed out etc) if the exit code on the status is 1.
¯\(ツ)/¯
i'm also not a fan of putting exit 0 at the end of any bash script, anywhere, ever.
|
Test build #98094 has started for PR 22854 at commit |
build/mvn
Outdated
| "${ZINC_BIN}" -status -port ${ZINC_PORT} &> /dev/null | ||
| ZINC_STATUS=$? | ||
|
|
||
| # Try to shut down zinc explicitly if the server is still running |
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.
I know it's very unlikely, but there is a chance that the zinc is timed out between we check its status and shut it down. Since zinc will be timed out eventually, we don't care too much about if we can shut it down successfully here.
So how about "${ZINC_BIN}" -shutdown -port ${ZINC_PORT} || true?
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.
now that i'm a couple cups of coffee in to my morning, i'm actually back to thinking that this might be the most elegant way of dealing w/this.
i'll update the PR to do just this, and include a comment describing why we're doing it.
|
test this please |
|
Test build #98099 has started for PR 22854 at commit |
|
here's the test build run that's actually testing the changes to mvn: |
|
|
|
Probably unnecessary to change the timeout, but LGTM. |
build/mvn
Outdated
| # Try to shut down zinc explicitly if the server is still running. if it's not running, | ||
| # it's timed out and we'll still need to exit the script w/a 0 to keep the build from | ||
| # failing. | ||
| "${ZINC_BIN}" -shutdown -port ${ZINC_PORT} || true |
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.
do we still need || true? we always return $MVN_RETCODE now.
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.
we probably don't need it, but i am more than comfortable keeping it in there #justincase
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.
alright, i tested the script w/a false call in the mvn helper script and nothing broke. pushed a change removing || true.
dongjoon-hyun
left a comment
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.
+1, LGTM.
Thank you, @shaneknapp . I also wondered the reason of these failures. BTW, could you update the title a little bit? For example,
[SPARK-25854] fix mvn to not always exit 1
[SPARK-25854][BUILD] Fix `build/mvn` not to fail during Zinc server shutdown
build/mvn not to fail during Zinc server shutdown
|
let's not merge until this build passes: (i hacked this build to scp the updated |
that was me killing the 1st PRB build |
|
build is green, and everything looks to be behaving normally! ready to merge and backport (@srowen could you help out w/this one?) |
|
Test build #98104 has finished for PR 22854 at commit
|
srowen
left a comment
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.
I can merge and backport. The last test failure is spurious.
|
yeah... wasn't worried about the PRB failing. thanks for the merge/backport! |
…hutdown ## What changes were proposed in this pull request? the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). ## How was this patch tested? i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes #22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 6aa5063) Signed-off-by: Sean Owen <[email protected]>
…hutdown the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes #22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 6aa5063) Signed-off-by: Sean Owen <[email protected]>
…hutdown the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes #22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 6aa5063) Signed-off-by: Sean Owen <[email protected]>
|
Test build #98103 has finished for PR 22854 at commit
|
…hutdown ## What changes were proposed in this pull request? the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). ## How was this patch tested? i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes apache#22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <[email protected]> Signed-off-by: Sean Owen <[email protected]>
…hutdown ## What changes were proposed in this pull request? the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). ## How was this patch tested? i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes apache#22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 6aa5063) Signed-off-by: Sean Owen <[email protected]>
…hutdown the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes apache#22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 6aa5063) Signed-off-by: Sean Owen <[email protected]>
…hutdown the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out. this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes). i set up a test build: https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/ Closes apache#22854 from shaneknapp/fix-mvn-helper-script. Authored-by: shane knapp <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 6aa5063) Signed-off-by: Sean Owen <[email protected]>
What changes were proposed in this pull request?
the final line in the mvn helper script in build/ attempts to shut down the zinc server. due to the zinc server being set up w/a 30min timeout, by the time the mvn test instantiation finishes, the server times out.
this means that when the mvn script tries to shut down zinc, it returns w/an exit code of 1. this will then automatically fail the entire build (even if the build passes).
How was this patch tested?
i set up a test build:
https://amplab.cs.berkeley.edu/jenkins/job/sknapp-testing-spark-branch-2.4-test-maven-hadoop-2.7/