GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
15.04k stars 1.62k forks source link

Periodically provide deployment state-change feedback #4670

Closed tstromberg closed 3 years ago

tstromberg commented 4 years ago

Related to #4668 #4669

If we are going to increase the default timeout for Skaffold deployments, we need to keep the user apprised of state changes. To balance spam/verbosity, my recommendation is to update the user for related object state changes, but only if it's been 10 seconds since the previous state change for that object.

At the moment, this is all the user sees:

Resource deployment/nodejs-guestbook-mongodb status updated to In Progress

This is what I would like to see:

* deployment/nodejs-guestbook-mongodb is In Progress (0/1 available)
* pod/nodejs-guestbook-mongodb is In Progress (ImagePullBackOff): Unable to authenticate ...

The state update should include so that the user can know whether to hit Ctrl-C to solve a problem, or simply wait it out. One of the nice side effects of this approach is that fast deployments will only ever show 1 line of feedback.

tejal29 commented 4 years ago

To balance spam/verbosity, my recommendation is to update the user for related object state changes, but only if it's been 10 seconds since the previous state change for that object.

This is currently set to 0.5 second or 500 milliseconds.

tejal29 commented 4 years ago

I would recommend switching it to 5 seconds instead of 10. What do you think?

MarlonGamez commented 4 years ago

It looks like this issue actually lies within the vscode cloud code plugin. Skaffold is providing messages to the plugin through it's event API such as:

{
  "result": {
    "timestamp": "2020-08-18T19:11:06.725751Z",
    "event": {
      "resourceStatusCheckEvent": {
        "resource": "deployment/go-guestbook-backend",
        "status": "In Progress",
        "message": "waiting for rollout to finish: 0 of 1 updated replicas are available...\n",
        "statusCode": "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING",
        "actionableErr": {
          "errCode": "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING",
          "message": "waiting for rollout to finish: 0 of 1 updated replicas are available...\n"
        }
      }
    },
    "entry": "Resource deployment/go-guestbook-backend status updated to In Progress"
  }
}

And the plugin is only displaying the "entry" field and not the other messages within

tejal29 commented 3 years ago

Closing this since with newer VSC output, this is not a problem