googledatalab / datalab

Interactive tools and developer experiences for Big Data on Google Cloud Platform.
Apache License 2.0
974 stars 249 forks source link

Datalab CLI output cleanup #1207

Open nikhilk opened 7 years ago

nikhilk commented 7 years ago

Current output:

Creating the firewall rule datalab-network-allow-ssh
Creating the disk datalab-nikhilko-pd
Creating the instance datalab-nikhilko
Created [https://www.googleapis.com/compute/v1/projects/cloud-ml-users/zones/us-central1-b/instances/datalab-nikhilko].

NAME              ZONE           MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP     STATUS

datalab-nikhilko  us-central1-b  n1-standard-1               10.128.0.2   104.198.65.186  RUNNING

Connecting to datalab-nikhilko
Ensuring that datalab-nikhilko can be connected to via SSH
Generating public/private rsa key pair.
[SSH stuff]

(Ignoring the SSH bit) A few things for cleanup:

Keeping SSH stuff, we should have a message that says something like "The connection to Datalab uses SSH to connect to the VM" to setup some context.

ojarjur commented 7 years ago

The long lines written to stderr by gcloud (e.g. "Created [https://www.googleapis.com/compute/v1/projects/..."), don't seem to be something we can feasibly silence. Those get printed regardless of verbosity, and if we just redirect all of stderr, then there is a risk that we will silence a message from gcloud that actually needs to be printed.

However, I have been able to silence most everything else.

I'm going to combine this with the fix for #1201

nikhilk commented 7 years ago

I wasn't referring to the lines produced by gcloud, which ideally should go away. I was referring to lines we write. For example, this one is slightly over:

The connection to Datalab is now open and will remain until this command is killed.

Lets put this in the post-release cleanup category... its clearly a nice-to-have right now.