cli
cli copied to clipboard
Feat: Add cpu entitlement to app process table
Where this PR should be backported?
Description of the Change
Extend the v8 cf CLI to support showing the new CPU Entitlement metric as a non-breaking change, with the cpu entitlement
column appearing before the details column:
state since cpu memory disk logging cpu entitlement details
#0 running 2024-02-10T00:30:38Z 0.2% 47.7M of 1G 129.6M of 1G 0/s of 16K/s 5.0%
#1 running 2024-02-12T18:17:49Z 0.1% 47.3M of 1G 129.6M of 1G 0/s of 16K/s 2.5%
If the cpu entitlement stats are not available (e.g. deployment does not support it, app is stopped, etc.) then the cf CLI should show an empty value for the process column.
Why Is This PR Valuable?
Extend the v8 cf CLI to support showing the new CPU Entitlement metric, where applicable.
Applicable Issues
- #2812
- https://www.pivotaltracker.com/story/show/187310450
How Urgent Is The Change?
Slightly less than urgent.
Other Relevant Parties
@rroberts2222
We're not sure why this change is failing unit tests in macOS... it seems unrelated to our changes. When we run unit tests on the main
branch on my local mac, we see these tests flake one out of every 7 runs or so.
Using the following command, I was able to run unit tests for this branch on my local mac 23 times in a row without failure:
CF_HOME=$PWD/fixtures CF_USERNAME="" CF_PASSWORD="" ginkgo -r -randomize-all -require-suite -randomize-suites -skip-package integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword -until-it-fails
I like clicking rerun so I've unstuck the pr checks (for now)
Please also open a pr against the main branch as any changes in the v8 branch we'll want in main as well edit - as main is theoretically a new major version, feel free to do great breaking changes there (well at least I say do it, not sure how other cli approvers feel)
We've another change in progress for main
right now.
Where this change represents the "alternative option" described in https://github.com/cloudfoundry/cli/issues/2812, for cf CLI v9 we're aiming for the proposed solution in that issue, which we prefer 😄