Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@haircommander
Copy link
Member

What type of PR is this?

/kind api-change
/kind bug

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?

fixed a bug where crictl only showed pod level stats, not container level stats.

@openshift-ci-robot openshift-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. labels Aug 3, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2020
@haircommander
Copy link
Member Author

PTAL @mrunalp @umohnani8 @saschagrunert @kolyshkin @giuseppe @wgahnagl

@codecov
Copy link

codecov bot commented Aug 3, 2020

Codecov Report

Merging #4043 into release-1.18 will increase coverage by 0.10%.
The diff coverage is 10.00%.

@@               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              

@umohnani8
Copy link
Member

LGTM
/retest

@haircommander
Copy link
Member Author

/retest

1 similar comment
@haircommander
Copy link
Member Author

/retest

test/stats.bats Outdated
[ "$status" -eq 0 ]
ctr1_stats_JSON="$output"

run crictl stats -o json "$crt2_id"
Copy link
Collaborator

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

  1. it is the same as running crictl stats without ID, in which case it shows stats for all IDs.
  2. 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 ]
Copy link
Collaborator

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 != ""'
Copy link
Collaborator

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.

@kolyshkin
Copy link
Collaborator

All the issues above are (hopefully) fixed by #4064 which you might want to include in this backport

haircommander and others added 3 commits August 10, 2020 16:21
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]>
@haircommander
Copy link
Member Author

/retest

@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 9, 2020

@haircommander: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/openshift-jenkins/integration_rhel ac89cc3 link /test integration_rhel
Details

Instructions 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.

@openshift-ci-robot
Copy link

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [haircommander,mrunalp]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mrunalp
Copy link
Member

mrunalp commented Sep 9, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2020
@umohnani8
Copy link
Member

/retest

@openshift-merge-robot
Copy link
Contributor

@haircommander: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/openshift-jenkins/integration_rhel ac89cc3 link /test integration_rhel

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@haircommander
Copy link
Member Author

/retest

2 similar comments
@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit be796d1 into cri-o:release-1.18 Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants