Skip to content

Allow the CI dev build to fail - #3088

Merged
jcrist merged 15 commits into
dask:masterfrom
jakirkham:ci_allow_dev_fail
Jan 23, 2018
Merged

jcrist merged 15 commits into
dask:masterfrom
jakirkham:ci_allow_dev_fail

Conversation

@jakirkham

@jakirkham jakirkham commented Jan 21, 2018 •

Copy link
Copy Markdown
Member

Closes #3043
Partially addresses #2744

As dev libraries tend to breaking things rather frequently, simply mark this build as an allowed failure. This doesn't mean that we don't care about fixing issues with dev libraries. Simply that we don't expect every change to take that into account. Leaving it in the matrix for those interested in fixing it to have an easier time doing so.

As dev libraries tend to breaking things rather frequently, simply mark
this build as an allowed failure. This doesn't mean that we don't care
about fixing issues with dev libraries. Simply that we don't expect
every change to take that into account. Leaving it in the matrix for
those interested in fixing it to have an easier time doing so.
@jakirkham

Copy link
Copy Markdown
Member Author

cc @mrocklin @TomAugspurger

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

This seems fine to me, but I wonder if it'd be better to move this to a build only on merge (or a cron job).

My fear is that if we start allowing this job to fail, failures will accumulate until each release providing us no benefit from having it run every build. Say there's a persistent failure (e.g. the current fastparquet issue) that causes the build to dev versions build to fail. If I wanted to check that a new PR didn't have any issues with the dev build, I'd have to open up the failing build, read the test results and manually diff the failures to spot new ones. At that point I'd probably skip checking that build, and just wait until the persistent failures were fixed. Having these tests build every PR no longer has any value.

If we had a build-only-on-merge/cron job (still with allow_failure) we'd be able to mildly keep track of our compatibility with dev dependencies, without the overhead of building the failing tests for each PR.

Tries to disable the dev builds on PRs only so that the failure can
still be seen on `master`. However does not waste time building on PRs
as the success of the build will not be evaluated on arbitrary PRs.
@jakirkham

Copy link
Copy Markdown
Member Author

Seems reasonable. No strong feelings from me. Pushed a commit switching it to master only.

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

I think we'd also want to keep the allow_failures bit (otherwise our master build will continue to fail). Union of both commits should work.

@jakirkham

Copy link
Copy Markdown
Member Author

Should we have a non-dev 3.6 build in the matrix? Dropping the dev test takes 3.6 with it, which seems undesirable IMHO.

Not only run the CI dev build on non-PRs (i.e. `master`), but make sure
it is an allowed failure too. That way it doesn't fail CI on `master`
unnecessarily. However we can still check on its status to see what
issues crop up.
@jakirkham

Copy link
Copy Markdown
Member Author

I think we'd also want to keep the allow_failures bit...

Sure. Added that back. Seems to work correctly on my CI.

@jcrist

jcrist commented Jan 22, 2018 •

Copy link
Copy Markdown
Member

Hmmm, not sure. I don't think there should be any differences between 3.5 and 3.6, so the only reason to add another branch IMO would be if there's another combination of pandas/numpy that we'd want to test. No strong feelings.

@jakirkham

Copy link
Copy Markdown
Member Author

The main reason I bring up Python 3.6 was the changes to dict. Given how reliant we are on dicts for many things in this code, it seems worthwhile to check against for that reason alone. Though there may be other things in 3.6 that are equally valuable to check.

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

That's fair. I'd be surprised to find a bug that switching to 3.6 unmasks - I'd expect most bugs to show up when moving the other way (e.g. reliance on dict ordering in 3.6 only shows when running in 3.5).

Since 2.7 & 3.6 should cover most cases of 2/3, ordered/unordered dicts, etc... perhaps make the dev tests 3.5? I think the osx tests should remain 3.6 since that's the most likely version. No strong feelings.

Include a non-dev test of Python 3.6 on `master` to replace the dev
build that now only runs on `master` and is an allowed failure.
Make sure to use the newest stable releases of NumPy and Pandas in the
Python 3.6 build. That way we get the most benefit out of it.
@jakirkham

Copy link
Copy Markdown
Member Author

Considering we had 4 builds per PR before, I think it is ok if we return to that. Though would like us to get a bit more out of the 4th build. So included numpy 1.14.0 and pandas 0.22.0 with python 3.6 as we are not testing either of these latest stable releases yet.

@jcrist jcrist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this seems fine to me.

Comment thread .travis.yml Outdated
if: type != pull_request

- env: *py36_env
- env: *py36_dev

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use released versions on the osx tests instead. This used to be true, and then it wasn't when the dev tests were added. Ideally each split would test a different issue - the osx tests are for anything oddly osx specific. Adding in dev dependencies conflates things.

My preference would be the osx env matches the env you just added (with numpy=1.14.0).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Have switched macOS to the latest stable releases as suggested.

It's kind of weird to test macOS and test dev versions of dependencies,
which makes it kind of hard to follow what caused an issue. This uses
the latest stable versions on macOS instead to make it easier to track
the cause of issues that crop up.
@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

LGTM. Feel free to merge on tests passing.

@jakirkham

Copy link
Copy Markdown
Member Author

Thanks for the feedback. :)

Comment thread .travis.yml
- env: &py36_env
- PYTHON=3.6
- NUMPY=1.14.0
- PANDAS=0.22.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failure due to the hdfs tests PR being merged (sorry about that). You need to add - *test_and_lint to this env, the other builds look to be gotten by the merge. To be safe you may try rebasing on master to ensure all builds include that line after merging.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. Thanks for the pointer. Have merged with master and added that line.

Needed to adjust the Python 3.6 case given the addition of HDFS tests.
@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

Looks like the build failure is due to numba not yet having a release out supporting numpy 1.14 (just needed to work with conda's numpy matching machinery). Per the numba team the build is currently in the pipeline. For now I might add a max numpy version check (matching the existing minimal version check): https://github.com/dask/dask/blob/master/continuous_integration/travis/install.sh#L65.

@jakirkham

jakirkham commented Jan 22, 2018 •

Copy link
Copy Markdown
Member Author

If they are currently getting a numba build out and we are wanting this is in sooner than that, I'd be fine just pulling out the Python 3.6 part and saving that for another PR. Alternatively we can wait for the numba build and just retest once it lands. Thoughts?

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

I'd prefer to get the py36 build in and just skip fastparquet on it for now. This keeps the future changes to a minimum. Sounds like the numba team is not building it as immediately as I said (they're holding off for the next release, rather than going back to rebuild the previous one with numpy 1.14).

Currently we don't have `numba` support for NumPy NumPy 1.14.0+, which
is required for `fastparquet` testing. So disable `fastparquet` tests on
the NumPy 1.14 build by simply not installing it.
@jakirkham

Copy link
Copy Markdown
Member Author

Ah ok. Was unclear on the timeline. Sure, skipping fastparquet tests on NumPy 1.14 in latest commit.

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

I would not recommend it. It seems to have covered up some errors. That is assuming we should always be using a dev build of fastparquet

The change you made only installs the dev version of fastparquet for the dev tests. In this case we wanted the dev version in all cases, as there are bugs in the most recent release. The dev tests were added just to test pandas and numpy dev versions.

@jakirkham

jakirkham commented Jan 22, 2018 •

Copy link
Copy Markdown
Member Author

The change you made only installs the dev version of fastparquet for the dev tests.

In the last commit, yes. The previous commit uses the dev version in all cases, which is where all those failures show up.

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

Ah, ok. Hmmm. I'd rather not pull them in until they don't lead to failures. Either this PR or the existing one is fine provided that condition. Pinging @martindurant in case he has time to look into why fastparquet is breaking.

@jakirkham

Copy link
Copy Markdown
Member Author

Just thinking the way we are installing fastparquet is confounding the testing issues as it isn't a true dev install currently. Hence the recommendation to pull all of those changes in. Even if it means testing fastparquet with a stable version temporarily.

@jakirkham

Copy link
Copy Markdown
Member Author

Somehow getting fastparquet missing errors from the tests.

@martindurant

Copy link
Copy Markdown
Member

Try following dask/fastparquet#284 ?

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

Yeah, I'm baffled by that. Running the tests locally everything is fine if fastparquet isn't installed (tests are skipped as they should be).

Try following dask/fastparquet#284 ?

The failure here is when fastparquet is intentionally not installed.

@jakirkham

Copy link
Copy Markdown
Member Author

Looking at it more closely it looks like pandas itself is the culprit. I'm not sure I want to go much further down this rabbit hole. Any objections if we downgrade pandas and retry?

@jcrist

jcrist commented Jan 22, 2018 •

Copy link
Copy Markdown
Member

Fine by me. Thanks for looking into this.

Seems newer versions of pandas require fastparquet for some operations.
So downgrade to the known working version of pandas to hopefully
workaround this issue.
@jakirkham

Copy link
Copy Markdown
Member Author

This is total speculation, but maybe PR ( pandas-dev/pandas#15838 ) is relevant.

@jcrist

jcrist commented Jan 22, 2018

Copy link
Copy Markdown
Member

That shouldn't be relevant at all. Where are you seeing the errors coming from pandas? I only see our tests being run when they should have been skipped.

@jakirkham

Copy link
Copy Markdown
Member Author

Was looking at this test failure in particular. The others I agree should have just been skipped.

@jcrist

jcrist commented Jan 23, 2018

Copy link
Copy Markdown
Member

That error comes from pandas, but it's only called because the test wasn't skipped as it should have been (the write_read_engines decorator adds skip marks as necessary). I'm confused how these tests run, as the logic for skipping works fine locally.

@jakirkham

jakirkham commented Jan 23, 2018 •

Copy link
Copy Markdown
Member Author

Are you using the same version of pytest locally as the one on CIs?

Edit: NVM I tried with the same version locally and it skips fine.

This reverts commit eb4153d.
One possibility for the test failures (instead of test skips) for
fastparquet is that the parallel test runner is causing the problem.
This tries to disable the parallel test runner to see if the issue goes
away.
@jakirkham

Copy link
Copy Markdown
Member Author

Had the thought that maybe this is a pytest-xdist issue considering neither of us can reproduce it locally with pytest. Pushed a commit to disable pytest-xdist in case it helps.

@jakirkham

jakirkham commented Jan 23, 2018 •

Copy link
Copy Markdown
Member Author

So it looks like if we disable the parallel test runner, the fastparquet issues go away.

Unfortunately though it appears we get a totally different set of failures, which are all doctest failures. Some appear to be related to NumPy print formatting changes, others by Python 2/3 differences, and one might be a random sampling issue. Maybe we should just disable doctests for this build?

ref: https://travis-ci.org/dask/dask/jobs/332327167

@jcrist

jcrist commented Jan 23, 2018

Copy link
Copy Markdown
Member

So it looks like if we disable the parallel test runner, the fastparquet issues go away.

That's weird. If I find some time later I want to figure out why that's happening, as it shouldn't.

Unfortunately though it appears we get a totally different set of failures, which are all doctest failures.

The doctests are all currently written to pass only on the py27 first build (the only one previously marked *coverage). I see you marked this build as *coverage as well to turn off parallelism - since there's no need to run the doctests on another build (we weren't before), I'd just split these settings and turn off coverage for this build.

Explicitly disable coverage and parallel testing in the Python 3.6 build
to avoid doctests and avoid issues associated with `fastparquet` that
parallel testing unearthed.
@jakirkham

Copy link
Copy Markdown
Member Author

Agree it would be good to understand. Though I think we should merge if this passes and save it as an issue.

Ah ok. Wasn't aware that would cause doctests to be run as well. Looking at the CI scripts that is now clear. Mainly was interested in testing this hypothesis first.

Have manually added the settings to the Python 3.6 build for now. It's a bit inelegant, but it sounds like we don't want those there permanently. Feel free to push commits to this PR directly if you would like to tweak the settings further. Probably will be busy with other things for the rest of the day.

@jcrist

jcrist commented Jan 23, 2018

Copy link
Copy Markdown
Member

Agreed on all accounts. All green, merging. Thanks for taking care of this @jakirkham.

@jcrist
jcrist merged commit 109c767 into dask:master Jan 23, 2018
@jakirkham
jakirkham deleted the ci_allow_dev_fail branch January 23, 2018 19:54
@jakirkham

Copy link
Copy Markdown
Member Author

Thanks.

It's probably worth noting that the dev build may be "fixed" the same way. Though it does raise the question we are already pondering about why the parallel test runner triggers those failures.

@jcrist

jcrist commented Jan 25, 2018

Copy link
Copy Markdown
Member

So it looks like if we disable the parallel test runner, the fastparquet issues go away.

Looks like this just made it less frequent, but not fixed: https://travis-ci.org/dask/dask/jobs/333464887. I'll investigate, I suspect a bug in pytest skip marks.

@jakirkham

Copy link
Copy Markdown
Member Author

Ouch! Sorry. 😞 Yeah there is something subtle going on there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow failures in development tests

3 participants