home-assistant/cli

Feature Request: hassio (ho | su | ha ) update status

Opened this issue · 9 comments

@jeubanks commented on Feb 26, 2018, 2:53 PM UTC:

Can a progress/status be added to the CLI when performing updates?

This issue was moved by frenck from home-assistant/hassio#382.

@ryanm101 commented on Mar 1, 2018, 3:09 PM UTC:

Not directly. I would need pvizeli to add "progress" endpoint to be returned by "update" in the header.
I could then poll that and it could hold the "%" complete or something. but in its current form I can do nothing as the api only returns when it is finished

@ryanm101 commented on Mar 1, 2018, 3:12 PM UTC:

pvizeli
Could you change the update endpoint to return a 201 and a "location" header with an endpoint that can be polled? This would actually be a REST best practice.

@pvizeli commented on Mar 2, 2018, 11:22 AM UTC:

I don't see a real benefit with this. We block on request, so the application can show a progressing until the request is done. We can not have more other details. Maybe we can add a log streaming endpoint.

@ryanm101 commented on Mar 2, 2018, 11:24 AM UTC:

I think the main complaint here it there is no difference to an end user between a "block" and a "hang" they just have to trust that the cli / app is working away.

@balloob commented on Mar 2, 2018, 11:06 PM UTC:

The problem is that for progress to be reported, each layer will have to start reporting progress. And for progress to be reported, each layer will have to get a lot more complicated because it would have to switch from a synchronous call (you call, you get a response), to an asynchronous call: you call, get an identifier and then poll that identifier via a different API.

@ryanm101 commented on Mar 3, 2018, 9:52 AM UTC:

In the case of hassio though when we update hass the supervisor stays "up" so in theory we could poll docker on the host to get the state by redirecting docker pull to a file and then tailing that.
It may not be possible for the supervisor update but for hass and the host (not sure how the host updates in resinos) could out put apt to a log file for tailing. ?

@pvizeli commented on Mar 3, 2018, 10:04 PM UTC:

we can make the supervisor log streamable i.e. with /supervisor/tail

@balloob commented on Mar 4, 2018, 1:42 AM UTC:

I think that would be a great start Pascal.

Here is some CoffeeScript code by Resin-OS that converts docker pull logs to progress: https://github.com/resin-io/docker-progress/blob/master/index.coffee#L99-L153

@frenck commented on Apr 13, 2019, 10:33 AM UTC:

This should be in the hassio-cli repo.

/move home-assistant/hassio-cli