3f1ea9da4b
Some of the methods in `Allocations()` incorrectly use the `putQuery` in API calls where `put` is more appropriate since they are not reading information back. These methods are also not returning request metadata such as `LastIndex` back to callers, which can be useful to have in some scenarios. They also provide poor developer experience as they take an `*api.Allocation` struct when only the allocation ID is necessary. This can lead consumers to make unnecessary API calls to fetch the full allocation. Fixing these problems require updating the methods' signatures so they take `*WriteOptions` instead of `*QueryOptions` and return `*WriteMeta`, but this is a breaking change that requires advanced notice to consumers. This commit adds a future breaking change notice and also fixes the `Stop` method so it properly returns request metadata in a backwards compatible way.
12 lines
432 B
Plaintext
12 lines
432 B
Plaintext
```release-note:bug
|
|
api: Fix `Allocations().Stop()` method to properly set the request `LastIndex` and `RequestTime` in the response
|
|
```
|
|
|
|
```release-note:deprecation
|
|
api: The `Restart()`, `Stop()`, and `Signal()` methods in the `Allocations` struct will have their signatures modified in Nomad 1.6.0
|
|
```
|
|
|
|
```release-note:deprecation
|
|
api: The `RestartAllTasks()` method in the `Allocations` struct will be removed in Nomad 1.6.0
|
|
```
|