Repository navigation
Get flake8 errors to fail the build on Travis - #110
Conversation
|
The commits are a bit convoluted on purpose to double-check that this PR is doing what it says on the tin. Please select squash+merge if you are merging this PR! If I got this right this is what should happen:
|
To be perfectly honest, I would be in favour of only enabling squash+merge in the web UI! |
guillaumeeb
left a comment
There was a problem hiding this comment.
My understanding is that using set -e in bash scripts is always a good idea: if one of the command fails you want to stop the script and exit with a non-zero exit code.
In a perfect scripting world it would probably be true, but I'm a little afraid of what could happen here: failing docker images or so one.
Maybe we should only stick to adding set -e in shell script from the ci to folder? And avoid doing that in pbs or sge folders?
By the way there seems to be a problem in the travis build, or may be this is just due to all the commits that triggered travis.
|
At the moment, I can't get the Travis build to fail for some reason (second commit). Need to debug this a bit more ... |
53ecc91 to
cd81b9b
Compare
cd81b9b to
ec6ba1d
Compare
|
OK I think this seems to be failing as expected now. See this Travis build. The problem was me trying to outsmart Travis by pushing multiple commits and stopping/restarting the Travis builds manually (related to the auto-cancel functionality being probably turned on for dask-jobqueue) ... |
|
Looks like there are side effects on sge builds 🙁. I'm relieved that it did nothing to pbs and slurm ones though. |
Do you have an example where using
Hmmm good point I'll have a look. |
Not right here, I can just tell that if I had used it in all the scripts I've written, a good part of them would probably fail 🙂, and this is probably not a good thing! |
|
Hm, it seems to trigger random failing in PBS too. From what I can see, there is not always files in /var/spool/pbs/spool/. Which is normal because PBS must remove or move those if everything is OK I think. It is probably a matter of how fast previous command are ran and if PBS had the time to do its internal things. Those commands were mainly to have some more informations if tests are failing though. If we want to be OK with the |
|
Although Travis is green, I don't think this one should be merged quite yet. Basically using |
|
I went for a less intrusive change, basically using About the impact of a "global" travis-ci/docs-travis-ci-com#1672 (comment)
travis-ci/docs-travis-ci-com#1672 (comment)
|
This reverts commit e381f2c.
guillaumeeb
left a comment
There was a problem hiding this comment.
LGTM. Are we good with this one @lesteve ?
|
I think we are good. Adding |
|
Merging this then, the soonner we have flake, the better! |
This adds
set -eto all bash scripts. My understanding is that usingset -ein bash scripts is always a good idea: if one of the command fails you want to stop the script and exit with a non-zero exit code.As mentioned in #106, flake8 is run in the JOBQUEUE=none build but does not fail the build.
Look at this Travis build for an example where the flake8 has some errors but the Travis build stays green.