Skip to content

Commit

Permalink
backport of commit cfeedd0 (#23380)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
  • Loading branch information
hc-github-team-nomad-core and gulducat authored Jun 18, 2024
1 parent 3a15fc3 commit 66f5612
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/23377.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
api: (Enterprise) fixed Allocations.GetPauseState method discarding the task argument
```
2 changes: 1 addition & 1 deletion api/allocations.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (a *Allocations) SetPauseState(alloc *Allocation, q *QueryOptions, task, st
// The ?task=<task> query parameter must be set.
func (a *Allocations) GetPauseState(alloc *Allocation, q *QueryOptions, task string) (string, *QueryMeta, error) {
var resp AllocGetPauseResponse
qm, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/pause", &resp, q)
qm, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/pause?task="+task, &resp, q)
state := resp.ScheduleState
return state, qm, err
}
Expand Down

0 comments on commit 66f5612

Please sign in to comment.