-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[ci] removed need to explicitly exit from failed commands in CI #2497
Conversation
@jameslamb I guess that this is unacceptable for |
Oh interesting. In my opinion it's a poor design choice by those package managers to make "will not re-install because this is already installed" return a non-0 exit code. But either way:
|
@jameslamb As you might see they even hang forever and reach 60-minutes limit for no activity from the Travis side. Really quite weird behavior. Thanks for removing |
@StrikerRUS I don't think the "hang forever for no activity" is necessarily related to this PR. I believe Travis puts some limits on the total number of jobs that can run for an account at a given time, and remember that I pushed this PR alongside two others all within about a minute. The most recent build had this build time, which doesn't seem notably different from our usual: I just restarted that build to see if I can reproduce the hanging stages. But ultimately...if you are not comfortable with these changes after another review we can close the PR. |
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.
But ultimately...if you are not comfortable with these changes after another review we can close the PR.
I'm absolutely comfortable with the proposed changes! I'm sorry if I confused you by any my previous comment.
However, I think we need +1 reviewer for this PR.
Just some refs to cover the opposite point of view and dispel the impression of silver bullet for set -e
🙂 .
https://stackoverflow.com/a/19622569
http://mywiki.wooledge.org/BashFAQ/105
https://serverfault.com/questions/143445/what-does-set-e-do-and-why-might-it-be-considered-dangerous
WOW this was a good read (from the second link)
ok now I'm scared of I think agree we need another reviewer to help decide. @Laurae2 do you have a strong opinion? |
4e3e938
to
b16c76b
Compare
sorry for the late response. |
you've convinced me too @StrikerRUS . With the complexity of our setup + the links you shared, I think |
Per this comment, in this PR I'd like to propose that we change
.ci/test.sh
in a way that should reduce the maintenance burden.Currently, we explicitly add an exit to many stages to ensure builds fail, e.g.
do_something() || exit -1
. I propose that, instead, we just useset -e
to say "exit immediately with a non-zero exit code when any process called from this script fails". I think this will be less error-prone and easier to maintain.I also propose we use
set -e
in.ci/setup.sh
just so that jobs stop running and fail immediately if anything in setup fails.Opening the PR for discussion.