cli icon indicating copy to clipboard operation
cli copied to clipboard

Show routable / readiness state in the `cf app` command

Open maxmoehl opened this issue 11 months ago • 5 comments

What's the user value of this feature request?

Right now readiness checks can be configured via the manifest but the CLI doesn't give any indication whether an application is ready. This causes confusion as the app is unreachable (404: route not found) but in the CLI it is shown as running with no indication of anything being wrong.

Who is the functionality for?

Users pushing apps with readiness checks.

How often will this functionality be used by the user?

Often, every time the readiness of app instances needs to be inspected.

Who else is affected by the change?

Operators who troubleshoot issues reported by users, anyone who might be parsing the output of the cf app command.

Is your feature request related to a problem? Please describe.

Yes, it is tedious to use cf curls to find the processes and list their stats to view the routable state.

Describe the solution you'd like

An additional column in the process table to view the readiness / routable state:

$ cf app my-app
Showing health and status for app my-app in org my-org / space my-space as [email protected]...

name:              my-app
requested state:   started
routes:            my-app.cf.example.com
[...]

     state     since                  ready   cpu    memory          disk            logging             cpu entitlement   details
#0   running   2025-01-07T09:11:53Z   true    2.1%   16.2M of 128M   36.9M of 256M   0B/s of unlimited   106.9%

Describe alternatives you've considered

An additional command but that seems unnecessary for just viewing such information.

Additional context

RFC0020 Readiness Healthchecks CC v3 API: The process stats object

I'm willing to provide a PR for this.

maxmoehl avatar Jan 07 '25 09:01 maxmoehl

I've built a POC in my fork at feat/add-ready-column.

maxmoehl avatar Jan 07 '25 13:01 maxmoehl

I just noticed that the RFC contains an example on how to implement this part:

     state     routable   since                  cpu    memory          disk         logging            details
#0   running   yes        2023-06-27T15:07:14Z   0.6%   46.8M of 192M   179M of 1G   0/s of unlimited
#1   running   no         2023-06-27T15:11:43Z   0.0%   0 of 0          0 of 0       0/s of 0/s
#2   running   yes        2023-06-27T15:11:43Z   0.0%   0 of 192M       0 of 1G      0/s of 0/s

I deviated a little bit because the wording around this feature is all "ready" / "readiness" and suddenly showing "routable" seems odd to me. I've also placed it after the since column as to my understanding the since refers to the value in state and is independent of the readiness.

maxmoehl avatar Jan 07 '25 13:01 maxmoehl

This issue can probably be closed as this PR has been merged: https://github.com/cloudfoundry/cli/pull/3429

ghost avatar Apr 29 '25 15:04 ghost

I just tested with the latest v8 CLI and the feature is not there, seems like it was only merged to main. @joaopapereira @a-b do you plan to bring this to v8 as well or will it only be v9?

maxmoehl avatar Apr 30 '25 05:04 maxmoehl

Any updates about release of this changes in cf app listing?

theghost5800 avatar Jun 26 '25 13:06 theghost5800