Skip to content

Commit

Permalink
cli: remove deprecated eval status -json list behavior
Browse files Browse the repository at this point in the history
In Nomad 1.2.6 we shipped `eval list`, which accepts a `-json` flag, and
deprecated the usage of `eval status` without an evaluation ID with an upgrade
note that it would be removed in Nomad 1.4.0. This changeset completes that
work.
  • Loading branch information
tgross committed Sep 22, 2022
1 parent 349501f commit 044d676
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .changelog/14651.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:deprecation
cli: `eval status -json` no longer supports listing all evals in JSON. Use `eval list -json`.
```
18 changes: 0 additions & 18 deletions command/eval_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,6 @@ func (c *EvalStatusCommand) Run(args []string) int {
return 1
}

// If args not specified but output format is specified, format and output the evaluations data list
if len(args) == 0 && (json || len(tmpl) > 0) {
evals, _, err := client.Evaluations().List(nil)
if err != nil {
c.Ui.Error(fmt.Sprintf("Error querying evaluations: %v", err))
return 1
}

out, err := Format(json, tmpl, evals)
if err != nil {
c.Ui.Error(err.Error())
return 1
}

c.Ui.Output(out)
return 0
}

if len(args) != 1 {
c.Ui.Error("This command takes one argument")
c.Ui.Error(commandErrorText(c))
Expand Down
9 changes: 9 additions & 0 deletions website/content/docs/upgrade/upgrade-specific.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ behavior to reserve for a major Nomad release and *not* be backported. Please
report any negative side effects encountered as [new
issues.][gh_issue]

#### `nomad eval status -json` Without Evaluation ID Removed

Using `nomad eval status -json` without providing an evaluation ID was
deprecated in Nomad 1.2.4 with the intent to remove in Nomad 1.4.0. This option
has been removed. You can use `nomad eval list` to get a list of evaluations and
can use `nomad eval list -json` to get that list in JSON format. The `nomad eval
status <eval ID>` command will format a specific evaluation in JSON format if
the `-json` flag is provided.

## Nomad 1.3.3

Environments that don't support the use of [`uid`][template_uid] and
Expand Down

0 comments on commit 044d676

Please sign in to comment.