backport of commit e7136f80c5c1277ea2dea4eeeda84005224d7835 (#18648)
Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
This commit is contained in:
parent
5147682d40
commit
ce6c86a057
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
scaling: Unblock blocking queries to /v1/job/{job-id}/scale if the job goes away
|
||||
```
|
|
@ -2209,8 +2209,13 @@ func (j *Job) ScaleStatus(args *structs.JobScaleStatusRequest,
|
|||
return err
|
||||
}
|
||||
if job == nil {
|
||||
// HTTPServer.jobScaleStatus() will 404 if this is nil
|
||||
reply.JobScaleStatus = nil
|
||||
return nil
|
||||
|
||||
// reply with latest index, since if the job does get created,
|
||||
// it must necessarily be later than current latest.
|
||||
reply.Index, err = state.LatestIndex()
|
||||
return err
|
||||
}
|
||||
|
||||
events, eventsIndex, err := state.ScalingEventsByJob(ws, args.RequestNamespace(), args.JobID)
|
||||
|
|
Loading…
Reference in New Issue