Repository navigation
Add Travis CI - #1619
Add Travis CI#1619mattsta wants to merge 3 commits into
Conversation
|
Maybe you have to search first. see antirez comment: https://github.com/antirez/redis/pull/1412#issuecomment-29526071 |
|
Thanks for the references! I didn't think to look back in the past for the same thing. Those are good points, but http://ci.redis.io/ seems to miss the "continuous" aspect (maybe it's just turned off?). Travis CI certainly isn't an acceptance test or a complete "ready to deploy test" — it's just a quick sanity check so we don't have to run everything by hand after every push. (For example: right now on unstable HEAD there's an error by one compiler, but not another, and there's nothing in place to catch it.) If a CI config doesn't belong in the official repository, we can always maintain it privately. |
This script will run over 200 cluster creations on different replica and instance counts. It currently works on my OS X system and in a Linux VM. It's designed to work on a CI server so it can just run in the background and the system will report if the script fails.
|
Added cluster bring-up testing. You can see our brilliant current fails at https://travis-ci.org/mattsta/redis/builds/21429040 |
|
Hello Matt, sorry ci.redis.io was down since the server lost power without I noticed. Now it is back again. I think our current CI environment is better since it builds for 32 and 64 bits, it tests the code over valgrind to find memory leaks, and many stuff like that that in the past were every useful. Also almost all the bugs find in Redis via the CI happened because it runs the tests again and again. Since many tests are randomized, it ends triggering edge cases. To run the test when there is a change does not scale. So... closing ;-) |
|
p.s. of course we need Cluster tests. I'll start to work at those in the next days since beta-3 can't go live without tests. |
|
Can we set up ci.redis.io to build with clang and gcc? There has been a gcc warning for a few weeks and gcc builds fail with -Werror. Little note: CI isn't really for "bug finding," it's just for a quick "did I break the build" after a push without having to run six tests manually each time. :) |
|
@mattsta yes I can setup a build with clang as well, this looks like a good idea actually. About what CI is about, ci.redis.io has a side effect does what you need as it continuously builds again and again, but after running this script for several years at this point, to me the most valuable result was that repeating the randomized tests actually produced bug reports that allowed me to fix bugs otherwise hard to find. Moreover, often things that are real breakage after a commit, a found by the valgrind test that reports some memory leak or access to uninitialized data or some other error, and this test unfortunately can't be executed too often. Currently I execute it every six hours, it is a very timing sensitive thing, so I moved the CI to a fast Intel SSD disk and finally the valgrind test does not provide too much false positives. |
|
Good points. I'd recommend testing with -Werror too :) |
|
A potential issue is that a lot of third party libraries seems to throw warnings. |
|
Yup! There's a special REDIS_CFLAGS variable so extra options don't get used in deps. |
|
What I generally dislike about travis is that it usually gives a 'false' sense of quality for lower level languages. It offers one OS with one specific build type and two compilers. Lets say someone makes a pull request and gets a 'everything tests fine', it wouldn't necessarily mean that freebsd, win32 or smartos would. It would be another source of testing though. |
## Changelog ### RedisJSON [v8.9.81...v8.9.90](RedisJSON/RedisJSON@v8.9.81...v8.9.90) - MOD-16300 perf(json_path): materialize filter literals once per query ([#1615](RedisJSON/RedisJSON#1615)) - MOD-16608 Bump ijson (reduce object memory) ([#1617](RedisJSON/RedisJSON#1617)) - MOD-16274 | MOD-16275 add size/sizeof and empty operators on object ([#1618](RedisJSON/RedisJSON#1618)) - MOD-16685 Add RedisJSON API to open from RedisModuleKey ([#1619](https://github.com/RedisJSON/RedisJSON/pull/1619)/[#1620](https://github.com/RedisJSON/RedisJSON/pull/1620)) ### RedisBloom [v8.9.81...v8.9.90](RedisBloom/RedisBloom@v8.9.81...v8.9.90) - No functional changes — version bump only ([#1033](RedisBloom/RedisBloom#1033))
As much as I enjoy being a human continuous integration system, perhaps we can automate it for better and quicker coverage?
By adding this one tiny YAML file (yes, it's sad to pollute the repository with an ugly external configuration file, but that's just how it works), we can have six VMs launched and running Redis unit tests after every push. Why six VMs? {gcc,clang}{make test,make test-sentinel} + {gcc,clang}{make REDIS_CFLAGS=-Werror} = 6 VMs.
For example output, see https://travis-ci.org/mattsta/redis/builds/21050931 — you can see we currently have one failing test because of the
gcc -Werrorfixed in antirez/redis#1617Travis CI will run on each push to any branch. Just sign up at https://travis-ci.org/, login with github credentials, then enable it for your Redis repository. By default, it will also build and report on pull requests too.