Skip to content
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

Clarify backup and restore creation messages #270

Merged
merged 1 commit into from
Jan 11, 2018
Merged

Conversation

nrb
Copy link
Contributor

@nrb nrb commented Jan 4, 2018

When running ark <resource> create, a request is sent to the server,
but the status is not immediately known. Inform the user that a request
was sent and provide a way to get more information on it.

I'm open to changing the message text if others think of something better.

Fixes #232

@nrb nrb requested review from ncdc and skriss January 4, 2018 16:56
@ncdc ncdc requested a review from Bradamant3 January 4, 2018 16:58
@ncdc
Copy link
Contributor

ncdc commented Jan 4, 2018

cc @Bradamant3

@ncdc
Copy link
Contributor

ncdc commented Jan 4, 2018

Jennifer plans to review this tomorrow

@@ -143,6 +143,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
return err
}

fmt.Printf("Backup %q created successfully.\n", backup.Name)
fmt.Printf("Backup request %q submitted successfully.\n", backup.Name)
fmt.Printf("Use `ark backup describe %s` for more details.\n", backup.Name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: s/Use/Run
(same for restore)
reason: "use" is vague, "run" is more precise.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, maybe this is my ignorance showing, but does ark backup describe ... provide additional information about the status of the backup request? If so, maybe let's ponder further ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we have now is ark backup get and ark backup describe. get shows you the basic details in tabular format (the essential info being the phase - new/in progress/failed/completed). describe shows you slightly more information, but it's mostly the spec - what namespaces/resources/etc are included in the backup. Until we have #20 implemented, there's not really any info you can get other than seeing phase transitions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, good as is then.

@nrb
Copy link
Contributor Author

nrb commented Jan 5, 2018

@Bradamant3 Here's what backup describe's output looks like currently. Based on master, not this PR.

x1c in /home/nrb/go/src/github.com/heptio/ark (git) fix-246 U
% _output/bin/linux/amd64/ark backup create backup-1
Backup "backup-1" created successfully.

x1c in /home/nrb/go/src/github.com/heptio/ark (git) fix-246 U
% _output/bin/linux/amd64/ark backup describe backup-1
Name:         backup-1
Namespace:    heptio-ark
Labels:       <none>
Annotations:  <none>

Namespaces:
  Included:  *
  Excluded:  <none>

Resources:
  Included:        *
  Excluded:        <none>
  Cluster-scoped:  auto

Label selector:  <none>

Snapshot PVs:  auto

TTL:  720h0m0s

Hooks:  <none>

Phase:  Completed

Backup Format Version:  1

Expiration:  2018-02-04 12:39:13 -0500 EST

Validation errors:  <none>

Persistent Volumes: <none included>

@nrb
Copy link
Contributor Author

nrb commented Jan 5, 2018

@Bradamant3 Updated the messages

@@ -144,6 +144,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
return err
}

fmt.Printf("Restore %q created successfully.\n", restore.Name)
fmt.Printf("Restore request for %q submitted successfully.\n", restore.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should either say "Restore request <restore.Name>", or "Restore request for <o.BackupName>" - WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if/until we change to ark restore create <name> --backup <backup name>, the output here must include at least the restore's generated name. Since that includes the backup's name, I think the former (just removing "for") is probably better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, can do that. I used “for” as I was viewing it was the request for the restore object to be created. However, the request isn’t really an object in Ark so I suppose it makes sense to drop the “for”.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message updated.

When running `ark <resource> create`, a request is sent to the server,
but the status is not immediately known. Inform the user that a request
was sent and provide a way to get more information on it.

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
@ncdc
Copy link
Contributor

ncdc commented Jan 9, 2018

@Bradamant3 please take a final look - thanks!

Copy link
Contributor

@Bradamant3 Bradamant3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with apologies for the delay.

@ncdc ncdc added this to the v0.7.0 milestone Jan 11, 2018
@ncdc ncdc merged commit 6712e2a into vmware-tanzu:master Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants