Commit Graph

80 Commits

Author SHA1 Message Date
Felix Frank
6e6614808b README: also list stringer as a dependency 2016-02-03 15:11:18 +01:00
Felix Frank
c47418b02d README: specify minimum golang version 2016-02-03 11:02:30 +01:00
Felix Frank
97fda59999 README: make code actually display as multi line 2016-02-03 11:02:30 +01:00
James Shubin
b3e5f77d5d Make it easier to use converged-timeout 2016-02-02 11:45:23 -05:00
James Shubin
85f9db12f5 Cleanup the README file 2016-02-02 10:48:01 -05:00
James Shubin
655d527d5f Add a fan in, fan out example and test 2016-02-02 08:52:32 -05:00
James Shubin
925811984e Allow unbound variables like "$1" 2016-02-02 05:00:41 -05:00
James Shubin
4cb76d3347 Add the ability to run individual shell tests manually 2016-02-02 04:37:55 -05:00
James Shubin
ff838700d0 Add a fan in example and test 2016-02-02 04:36:12 -05:00
James Shubin
3cf8c4a6e8 Add gobin to path in an attempt to make it easy to find go binaries 2016-01-29 12:01:01 -05:00
James Shubin
9e08de0bcf Try and pass through with export 2016-01-29 11:10:23 -05:00
James Shubin
8f0d3e3abe I give up, let's see some debug output 2016-01-29 10:53:51 -05:00
James Shubin
3870a2c781 Pass jenkins url through to child machine 2016-01-29 10:44:48 -05:00
James Shubin
cc9bc6ac75 Add missing ^ character 2016-01-29 10:15:01 -05:00
James Shubin
cd663d2384 Work around missing JENKINS_URL regression 2016-01-29 10:08:41 -05:00
James Shubin
dee8cd97c5 Be more specific in error messages for easier debugging
Yes, I'm looking at you, JENKINS!
2016-01-29 08:58:19 -05:00
James Shubin
a64b9f8e1a Skip yamlfmt on jenkins too 2016-01-29 06:49:50 -05:00
James Shubin
b3b78b9405 Fix typo 2016-01-29 06:42:31 -05:00
James Shubin
f4a86b2364 Add centos-ci script to mgmt for independence and for make gopath 2016-01-29 06:37:29 -05:00
James Shubin
8b0a078dac Add gopath Makefile target 2016-01-29 06:20:34 -05:00
James Shubin
fb8513094b Add CentOS jenkins ci hooks 2016-01-29 06:00:11 -05:00
James Shubin
08d5a3baae Work around old go versions not supporting equals sign 2016-01-28 09:56:43 -05:00
James Shubin
358604def2 Enable shell tests
We need to use sudo: required, and dist: trusty to avoid old versions of
bash in travis which don't support the -n argument to the `wait` shell
built-in.

We had to disable the -e checks in etcd.sh since the killall || killall
parts were causing those to trigger in travis.
2016-01-28 09:37:43 -05:00
James Shubin
0795cadad1 Travis: don't sully the homepage with broken test branches 2016-01-28 08:04:26 -05:00
James Shubin
0d8b4aa2bd Fix string issues in the build
Welcome back travis
2016-01-28 06:16:08 -05:00
James Shubin
2930985238 Avoid any possible errors with git describe 2016-01-21 00:40:04 -05:00
James Shubin
d5367b7a1c Add shell based test harness
This allows you to simulate one or more simultaneously running mgmt
processes. It should be easy to use by following the test cases provided.
2016-01-21 00:23:25 -05:00
James Shubin
820294cd9a Add golang stringer to deps 2016-01-21 00:23:11 -05:00
James Shubin
9ab746fbf3 I guess we'll have to stick with the name for now 2016-01-20 23:44:25 -05:00
James Shubin
d7903d8736 Update faq to add etcd vs. consul answer 2016-01-20 17:28:52 -05:00
James Shubin
0ca9351665 Don't generate file watch events if disabled
This previously ignored the events, but they were still generated!
2016-01-20 02:05:26 -05:00
James Shubin
491e9fd9bc Golint fixes
I used: `golint | grep -v comment | grep -v stringer` to avoid crap.
2016-01-19 23:35:33 -05:00
James Shubin
4599b393e9 Fix failure of go 1.4.3 due to missing go vet 2016-01-19 22:37:45 -05:00
James Shubin
30385c85f3 Bump golang versions in travis 2016-01-19 22:29:29 -05:00
James Shubin
8308680a50 Make sure to unpause all elements when resuming
The indegree code added a regression because elements with an indegree
would not be unpaused! This is now corrected. Time to add more tests :)
2016-01-19 22:01:51 -05:00
James Shubin
9c18972af4 Add information on providing good logs 2016-01-18 12:14:17 -05:00
James Shubin
79a5e0972f Improve wording in README.md for clarification 2016-01-18 12:13:47 -05:00
James Shubin
304b48265f Many examples now exist 2016-01-18 12:08:03 -05:00
James Shubin
c0d3678b79 Remove useless noop types
These aren't relevant to the example
2016-01-18 04:50:47 -05:00
James Shubin
74baa032b5 Add link to first blog post 2016-01-18 00:59:10 -05:00
James Shubin
61c668edd3 Limit the number of initial start poke's required
Every graph needs each vertex to have a change to run initially (after
it has started up) so that initial state detection can be applied to
fix anything that happened while the program was not running. We used to
poke every vertex which was unnecessary, when in fact we only need to
poke the set of vertices that are the minimum set of ultimate
pre-requisites for every other vertex in the graph. That way, you're
either poked directly, or poked by someone who was, etc...

It turns out we don't need Dilworth's theorem, and that looking at
vertices with an indegree of 0 is enough (I think it is a special case
when we have a DAG).

This also fixes a goroutine start scheduling race by ensuring the
initial pokes are received!
2016-01-15 17:01:27 -05:00
James Shubin
8db5d630d5 Exit if program was not compiled correctly
Catch the missing injection of program name.
2016-01-15 16:49:50 -05:00
James Shubin
6e9439f4e3 Avoid panic's when referencing non-existing objects
No idea why wrapping the cmd in a function avoids a panic. Probably
something about the gc...
2016-01-15 00:03:22 -05:00
James Shubin
f7858b8e9b Add state caching and invalidation to service type
This required a change in the event system to add an "activity" field.
This is meant to be generic in the case that there is more than one need
for it, but at the moment, allows a poke to tell that it is a poke in
response to an apply that just finished, instead of a regular poke or
backpoke in which all that matters is timestamp updates, because there
wasn't any actual work done (since that state was okay).
2016-01-15 00:02:45 -05:00
James Shubin
935805aeda Add state caching for most types
This adds state caching to avoid repeated execution when not necessary.
2016-01-14 23:17:26 -05:00
James Shubin
4c6647d807 Fixup state related items
* Fixup graph state readability
* Rename original SetState() to SetConvergedState() and friends...
* Add type state management for proper BackPoke() commands...
* Add better DEBUG logging

This is an important optimization that prevents running a BackPoke on a
parent which is in the process of running and will most certainly poke
the caller back in a moment. This avoids unnecessary roundtrips.
Unfortunately, there are still other algorithms required so that races
can't cause the graph to run for longer than necessary.
2016-01-12 04:57:05 -05:00
James Shubin
c57946e29b Fix dependency issue
* Fix Process() object calling
* Add PokeParent() to poke upwards
* Break linear exec chains :(

This was the issue where in a graph f1 -> f2, if you were to rm f2 &&
cat f2, then f2 would not come back because we didn't poke upwards to
refresh the timestamp. Unfortunately this adds another bug which we
solve in a later patch.
2016-01-12 04:20:47 -05:00
James Shubin
48eddc3721 Catch a different form of etcd disconnect 2016-01-10 04:09:28 -05:00
James Shubin
8ea8ef8d0e Simplify converge checker
Not sure why I didn't write it this way before...
2016-01-10 02:40:31 -05:00
James Shubin
1c49bbc487 Clean up the distributed example for clarity 2016-01-10 02:30:05 -05:00