Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust regex for container metrics #1105

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

philippthun
Copy link
Member

@philippthun philippthun commented Apr 4, 2024

Adjust regex that "extracts" container metrics from cf-cli output. Memory/disk might be shown as 0B initially.

Output from a failed CATS run:

Regex did not find a match in contents 'Showing health and status for app [...]
[...]
     state     since                  cpu    memory       disk       logging        details
#0   running   2024-04-04T10:35:13Z   0.0%   0B of 256M   0B of 1G   0B/s of 0B/s   
'

Memory/disk might be shown as 0B initially.
@philippthun philippthun marked this pull request as draft April 4, 2024 15:46
@philippthun
Copy link
Member Author

We are still unsure if there is a "real" problem with container metrics. state = running + memory = 0B seems to be inconsistent...

@a-b
Copy link
Member

a-b commented Apr 4, 2024

We think this is caused by a recent bump of https://pkg.go.dev/code.cloudfoundry.org/bytefmt .

Copy link
Member

@a-b a-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ctlong
Copy link
Member

ctlong commented Apr 4, 2024

We are fairly confident that the issue is arising from a bytefmt bump in cf CLI 8.7.10 that picked up this change. Accordingly, I'm going to look to merge this PR.

Thanks @philippthun !

@ctlong ctlong marked this pull request as ready for review April 4, 2024 23:18
ctlong
ctlong previously approved these changes Apr 4, 2024
@ctlong ctlong merged commit a169a8b into develop Apr 4, 2024
3 checks passed
@ctlong ctlong deleted the adjust-regex-for-container-metrics branch April 4, 2024 23:41
ctlong pushed a commit to loggregator/cf-acceptance-tests that referenced this pull request May 13, 2024
…y#1105)

Adjusts container metrics regex to allow for `cf app` output to display `memory` and `disk` output in bytes.

Fixes `windows` and `apps` suite failures.

Previously, the cf CLI defaulted to `K`, `M`, or `G` as the units for those columns. However, cf CLI v7.7.10/v8.7.10 bumped `code.cloudfoundry.org/bytefmt` to include [this change](cloudfoundry/bytefmt@854d396), which now outputs `B` as the unit in certain circumstances.

---------

Co-authored-by: Carson Long <12767276+ctlong@users.noreply.github.com>
(cherry picked from commit a169a8b)
arjun024 pushed a commit to arjun024/cf-acceptance-tests that referenced this pull request Jun 7, 2024
…y#1105)

Adjusts container metrics regex to allow for `cf app` output to display `memory` and `disk` output in bytes.

Fixes `windows` and `apps` suite failures.

Previously, the cf CLI defaulted to `K`, `M`, or `G` as the units for those columns. However, cf CLI v7.7.10/v8.7.10 bumped `code.cloudfoundry.org/bytefmt` to include [this change](cloudfoundry/bytefmt@854d396), which now outputs `B` as the unit in certain circumstances.

---------

Co-authored-by: Carson Long <12767276+ctlong@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants