[WIP] Overhaul Spack's CI Infrastructure#1576
Conversation
|
A lot of good ideas here. Some comments:
I suspect that implementing these tests could uncover many issues that
I would like to see additional Package tests, trying to build each Failure of the build test on a machine should not a priori be a reason to Documentation tests
|
|
Good ideas. I agree that we should test things before merging, at lest on a few major Unixes + GCC. Of course MacOS + clang + gfortran would also be great. My understanding that the only issue could be with
which may take some time (e.g. |
|
@davydden Yes, building the entire DAG could be time consuming. But how many of these PR's do you want merged more quickly than it could possibly take to build? OpenMPI should only take ~20 minutes? OpenBLAS is more like ~45 minutes? It depends on the compiler. Either way, if it takes less than half a day, I don't think it will adversely affect PRs. If we want to install multiple variants with multiple compilers on multiple OSes, then maybe it will become overkill. |
i would prefer to test everything before merging, thereby reduce chance of braking things.
I think building default variant is indeed a good compromise here. We can start with one OS only, say, Ubuntu 14.04+GCC. |
I agree, and I hope people will still test things locally. But I would feel safer if Travis tried installing everything on a bare-bones Ubuntu to catch missing dependencies and OS differences. Just because something builds on osx doesn't mean it builds on Ubuntu. Also, sometimes people will add a new version to Spack without actually making sure that it installs. This will catch that too. Btw, I agree with your Ubuntu/GCC/default-variants compromise, unless someone else really wants to test everything. I would love to see osx testing, but Travis doesn't seem to support it... |
|
For some reason, Git thinks I deleted |
|
maybe a github issue? Does it also say the file is deleted in |
|
@adamjstewart: |
|
I think git determines whether a file moved based on the file's content. Did you make substantial changes to the file in the same commit? If so, does git change its opinion if there is one rename commit, and then one content-changing commit? |
|
I agree with most of the things said here, except
I don't see the benefit in this. Core should always be working and testing it doesn't take a long time. To state it differently, if you don't modify spack core and you have red light on it then it's very likely you spotted an heisenbug and those kind of things are better spotted early. For What do you think about that ? |
|
@eschnett I did make substantial changes to the file. I tried separating the file changes and the file rename (with |
|
@davydden It says the file was renamed in |
I'm not sure how I feel about running In my mind, the point of Travis is not to test Spack, but to test a PR. If the PR only affects documentation and the documentation builds without any errors, Travis should send us the green light and let us know that the PR is safe to merge. |
If most people like bad practices then I would try to make their life harder, not easier 😄
Fine, but if it involves a package it should still try to run |
|
After tracking down most of the bugs in the documentation, I'm starting to realize that we should always be running documentation tests. The documentation doesn't just come from |
|
@adamjstewart: I agree with most everything. Thanks! This is awesome. I have a few suggestions:
Thoughts? |
|
I always figured we'd pick and choose which variant combos we test. Start -- Elizabeth On Sun, Aug 28, 2016 at 10:55 PM, Todd Gamblin [email protected]
|
|
btw, if you rebase on develop, you will have this commit i think. So maybe there is no need to cherry-pick? |
|
BTW... I would recommend trying the SmartGit GUI. It's a really nice way On Tue, Aug 30, 2016 at 3:33 PM, Massimiliano Culpo <
|
|
@davydden I did rebase off of develop but it wasn't there. I'll try again. Worst comes to worst, I'll just copy and paste into Vim 😄 |
|
@davydden Turns out I had to run this first: $ git fetch upstream features/travis |
Everything in the __all__ list in the spack module is from some other module, so only do their documentation in their original location. This also avoids issues like the fact that some directive names shadow spack core module names.
surprising.
|
|
You're probably right. But I was being obstinate and was convinced that it should've been in upstream develop. |
|
All documentation bugs are now resolved!!! 🎉 Last remaining thing preventing this PR from being merged. In |
|
@adamjstewart you were right, the commit was in |
|
@adamjstewart: all Travis bugs fixed and merged. Thanks! |
|
I'm working on the merge. It doesn't look too bad, I'll post a PR soon, On Tue, Aug 30, 2016 at 11:44 PM, Todd Gamblin [email protected]
|
|
@citibeth: Thanks! To answer your earlier question, we're planning to not worry about the online docs for tomorrow, so don't put yourself out. Thanks for all the contributions! |
|
@citibeth @davydden @adamjstewart: I just pushed a couple more fixes (mostly in |
|
🎉 |
|
OK... well, I think the structure of what I'm doing to the docs should be
Some material more appropriate to this new expanded getting_started was
The material in spack_workflows is absolutely something we should consider -- Elizbaeth On Wed, Aug 31, 2016 at 12:11 AM, Todd Gamblin [email protected]
|
I would like to overhaul Spack's CI infrastructure. Here is what I have in mind.
Only test what has changed
As it is now, if I submit a PR that fixes a typo in the documentation, Travis runs
spack test. Obviously, a documentation change can't possibly break Spack, so this test is unnecessary. If I submit a PR that adds a new package, we also runspack test. This test won't catch anything more than whether or not the file can be parsed by Spack. We can do better.I propose that we divide our tests into 4 test suites: packages, core, docs, and flake8. If you have any more testing groups you would like to see, let me know.
Package tests
If the only files that have changed are in
var/spack/repos/builtin/packages, runningspack testdoesn't do us any good. We need package-specific testing. What I'm thinking is for every package.py file that is modified, or at least the leaf nodes, run a set of Spack commands:Note that many of these tests will need to be skipped for packages that cannot be fetched from a URL. Also keep in mind that many of these tests would fail if we ran them on current packages. Sometimes this is fine, but sometimes it could be easy to fix. By actually testing installations through Travis, we can see if there are any missing dependencies that aren't found on a bare-bones Linux system.
Core tests
Only run
spack testif core Spack libraries have been modified. This is defined as files within:spack testcurrently cover this stuff?setup-env.shandsetup-env.cshObviously
spack testisn't perfect, and there are many unit tests that could be added. This PR will not cover these. It will only cover whenspack testis run.Documentation tests
If you try building Spack's documentation, you'll notice that there are several warning and error messages. These messages should cause the test to fail. This prevents problems like #1140 (oops, my fault). We want developers to add documentation as frequently as possible, even if they don't know how to test their changes or aren't very familiar with reStructuredText.
I'm not very familiar with all of the
makeoptions we use, but is there any target I should try building aside from the default?As a part of this PR, I will attempt to resolve all current warning and error messages, so as not to repeat past mistakes with flake8 integration.
There isn't any way to automatically deploy new documentation to http://software.llnl.gov/spack/index.html when a documentation changing PR is accepted, is there??? This would fix an old issue, #892.
Also, is there a way to make all Sphinx build warnings fatal? I wouldn't make it fatal permanently, just during testing.You can usemake SPHINXOPTS=-Wto treat all warnings as fatal errors.Flake8 tests
I think these tests are pretty solid at this point. I may integrate #1510 into this PR.
macOS testing
Should we start testing on osx? There is only one major hurdle that I see. Travis does not currently support Python on osx. I think it might be a virtual environment problem? Not sure. Anyway, there are workarounds that could allow us to run on osx anyway. We can also allow failures for osx.
Progress
@tgamblin @alalazo @citibeth @becker33 @eschnett @davydden