* master: (91 commits)
increase log level
CHANGELOG: added 0.9 ui changes
test: port TestTaskRunner_CheckWatcher_Restart
test: port RestartTask from 0.8
test: port SignalFailure test from 0.8
Rename TaskKillRequest/Response to TaskPreKillRequest/Response
Fix log comments
Rename TaskKillHook to TaskPreKillHook to more closely match usage
Fix comment
Rename TaskKillHook to TaskPreKillHook to more closely match usage
Update CHANGELOG.md
tests: deflake TestClientAllocations_GarbageCollect_Remote
tests: deflake client TestFS_Logs_TaskPending test
Update CHANGELOG.md
test: fix flaky garbage collect test
drivers: regen proto
api: avoid codegen for syncing
code review comments
revert unintended change
ar: return error from hooks if occured
...
Added ability to adjust the number of events the TaskRunner keeps as
there's no way to observe all events otherwise.
Task events differ slightly from 0.8 because 0.9 emits Terminated every
time a task exits instead of only when it exits on its own (not due to
restart or kill).
0.9 does not emit Killing/Killed for restarts like 0.8 which seems fine
as `Restart Signaled/Terminated/Restarting` is more descriptive.
Original v0.8 events emitted:
```
expected := []string{
"Received",
"Task Setup",
"Started",
"Restart Signaled",
"Killing",
"Killed",
"Restarting",
"Started",
"Restart Signaled",
"Killing",
"Killed",
"Restarting",
"Started",
"Restart Signaled",
"Killing",
"Killed",
"Not Restarting",
}
```
This seems to fix TestClientAllocations_GarbageCollectAll_Remote being
flaky.
This test confuses me. It joins 2 servers, but then goes out of its way
to make sure the test client only interacts with one. There are not
enough comments for me to figure out the precise assertions this test is
trying to make.
A good old fashioned wait-for-the-client-to-register seems to fix the
flakiness though. The error was that the node could not be found, so
this makes some sense. However, lots of other tests seem to use the same
"wait for node" logic and don't appear to be flaky, so who knows why
waiting fixes this one.
Passes with -race.
Given that the values will rarely change, specially considering that any
changes would be backward incompatible change. As such, it's simpler to
keep syncing manually in the rare occasion and avoid the syncing code
overhead.
Embed pointer conversion functions in the API package to avoid
unnecessary package dependency. `helper` package imports more
dependencies relevant for internal use (e.g. `hcl`).