0e1b554299
The signature of the `raftApply` function requires that the caller unwrap the first returned value (the response from `FSM.Apply`) to see if it's an error. This puts the burden on the caller to remember to check two different places for errors, and we've done so inconsistently. Update `raftApply` to do the unwrapping for us and return any `FSM.Apply` error as the error value. Similar work was done in Consul in https://github.com/hashicorp/consul/pull/9991. This eliminates some boilerplate and surfaces a few minor bugs in the process: * job deregistrations of already-GC'd jobs were still emitting evals * reconcile job summaries does not return scheduler errors * node updates did not report errors associated with inconsistent service discovery or CSI plugin states Note that although _most_ of the `FSM.Apply` functions return only errors (which makes it tempting to remove the first return value entirely), there are few that return `bool` for some reason and Variables relies on the response value for proper CAS checking.
12 lines
427 B
Plaintext
12 lines
427 B
Plaintext
```release-note:bug
|
|
server: Fixed a bug where deregistering a job that was already garbage collected would create a new evaluation
|
|
```
|
|
|
|
```release-note:bug
|
|
server: Fixed a bug where the `system reconcile summaries` command and API would not return any scheduler-related errors
|
|
```
|
|
|
|
```release-note:bug
|
|
server: Fixed a bug where node updates that produced errors from service discovery or CSI plugin updates were not logged
|
|
```
|