-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter deployments by create index #5702
Conversation
71a1c70
to
fa79336
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Make sure to call it out as a backwards incompatibility in the changelog though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -270,8 +270,10 @@ func (s *HTTPServer) jobDeployments(resp http.ResponseWriter, req *http.Request, | |||
if req.Method != "GET" { | |||
return nil, CodedError(405, ErrInvalidMethod) | |||
} | |||
all, _ := strconv.ParseBool(req.URL.Query().Get("all")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the behavior of ParseBool for an empty string the only thing that makes all default to false? If so, maybe that needs a comment? It's builtin to go, maybe it doesn't
Co-Authored-By: Danielle <[email protected]>
… into f-filter-by-create-index
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR adds the ability to only view deployments for the most recent version of the job, similar to how job status --all-allocs work. By default, only deployments associated with the most recently created version of the job are returned.
Prior to this change, if a job was purged and recreated with the same id,
nomad job deployments <jobid>
would show all deployments. With this PR, adding--all
will show all deployments, otherwise only deployments associated with the recreated job are shown.TODO