Skip to content

Commit

Permalink
fix(managerclient): don't print outdated follow-up actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal-Leszczynski authored and karol-kokoszka committed Jul 1, 2024
1 parent 55fd257 commit 8f6f1c0
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions pkg/managerclient/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,18 +492,12 @@ type TaskListItems struct {

// Render renders TaskListItems in a tabular format.
func (li TaskListItems) Render(w io.Writer) error {
var doneRestoreTask bool

columns := []any{"Task", "Schedule", "Window", "Timezone", "Success", "Error", "Last Success", "Last Error", "Status", "Next"}
if li.ShowProps {
columns = append(columns, "Properties")
}
p := table.New(columns...)
for _, t := range li.TaskListItemSlice {
if t.Type == RestoreTask && t.Status == TaskStatusDone {
doneRestoreTask = true
}

var id string
if t.Name != "" && !li.ShowIDs {
id = taskJoin(t.Type, t.Name)
Expand Down Expand Up @@ -573,10 +567,6 @@ func (li TaskListItems) Render(w io.Writer) error {
}
fmt.Fprint(w, p)

if doneRestoreTask {
fmt.Fprint(w, " NOTE: all completed restore tasks require specific follow-up action - see docs for more information\n")
}

return nil
}

Expand Down Expand Up @@ -1042,11 +1032,6 @@ func (rp RestoreProgress) status() string {
if rp.Progress == nil {
return s
}
if s == TaskStatusDone {
if len(rp.Progress.Keyspaces) == 1 && rp.Progress.Keyspaces[0].Keyspace == "system_schema" {
return "DONE - restart required (see restore docs)"
}
}
stage := RestoreStageName(rp.Progress.Stage)
if s != TaskStatusNew && s != TaskStatusDone && stage != "" {
s += " (" + stage + ")"
Expand Down

0 comments on commit 8f6f1c0

Please sign in to comment.