-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[1.18] stats: return information on container level, not pod #4043
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
[1.18] stats: return information on container level, not pod #4043
Conversation
6974f8d to
0b6c9bd
Compare
Codecov Report
@@ Coverage Diff @@
## release-1.18 #4043 +/- ##
================================================
+ Coverage 40.71% 40.82% +0.10%
================================================
Files 106 106
Lines 8727 8704 -23
================================================
Hits 3553 3553
+ Misses 4860 4837 -23
Partials 314 314 |
|
LGTM |
|
/retest |
1 similar comment
|
/retest |
test/stats.bats
Outdated
| [ "$status" -eq 0 ] | ||
| ctr1_stats_JSON="$output" | ||
|
|
||
| run crictl stats -o json "$crt2_id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug: s/crt2_id/ctr2_id/ (same bug as in the original PR)
It works since
- it is the same as running
crictl statswithout ID, in which case it shows stats for all IDs. - the values obtained are not compared in any way, just printed.
test/stats.bats
Outdated
| ctr2_memory_bytes="$output" | ||
|
|
||
| run echo $ctr1_memory_bytes != $ctr2_memory_bytes | ||
| [ "$status" -eq 0 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the check that echo succeeded?
test/stats.bats
Outdated
| # then | ||
| JSON="$output" | ||
| echo $JSON | jq -e '.stats[0].attributes.id != ""' | ||
| run echo $JSON | jq -e '.stats[0].attributes.id != ""' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I pointed out in 6886573#r463800061, this change is useless.
The more correct change would be to remove [ "$status" -eq 0 ] line.
|
All the issues above are (hopefully) fixed by #4064 which you might want to include in this backport |
this involves some reworking of where we save the scopePrefix (now renamed CrioScopePrefix and marked public in oci) Signed-off-by: Peter Hunt <[email protected]>
container_redis.json seems to intermittantly exit, which makes using it as the basis for comparison for stats tretcherous reduce the number of lines assigning ctr*_memory_bytes and properly compare them Signed-off-by: Peter Hunt <[email protected]>
1. Ensure that stats are shown for the particular ID. 2. Simplify json checks: - use "here file" instead of echo and pipe - remove intermediate variable - remove useless run and status checks (set -e is sufficient Signed-off-by: Kir Kolyshkin <[email protected]>
0b6c9bd to
ac89cc3
Compare
|
/retest |
|
@haircommander: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, mrunalp The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
/retest |
|
@haircommander: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
What type of PR is this?
What this PR does / why we need it:
this involves some reworking of where we save the scopePrefix (now renamed CrioScopePrefix and marked public in oci)
Signed-off-by: Peter Hunt [email protected]
Which issue(s) this PR fixes:
Special notes for your reviewer:
cherry pick of #3933
Does this PR introduce a user-facing change?