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

refactor: handle the error in advance to avoid useless requests #2270

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

starnop
Copy link
Contributor

@starnop starnop commented Sep 21, 2018

Signed-off-by: Starnop [email protected]

Ⅰ. Describe what this PR did

At present, we will send request stats to containerd even if the container name will not be parsed, as the result, it will send a lot of useless requests to containerd when there are many containers that are not created through CRI Manager, and tend to cause huge waste of resources.

Ⅱ. Does this pull request fix one issue?

None.

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

no needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Sep 21, 2018

Codecov Report

Merging #2270 into master will decrease coverage by 0.03%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2270      +/-   ##
==========================================
- Coverage    66.8%   66.76%   -0.04%     
==========================================
  Files         208      208              
  Lines       16934    16934              
==========================================
- Hits        11312    11306       -6     
- Misses       4260     4262       +2     
- Partials     1362     1366       +4
Flag Coverage Δ
#criv1alpha1test 32.54% <0%> (+0.02%) ⬆️
#criv1alpha2test 35.95% <0%> (-0.03%) ⬇️
#integrationtest 39.54% <0%> (ø) ⬆️
#nodee2etest 33.38% <40%> (-0.05%) ⬇️
#unittest 23.75% <0%> (ø) ⬆️
Impacted Files Coverage Δ
cri/v1alpha1/cri_utils.go 83.22% <0%> (ø) ⬆️
cri/v1alpha2/cri_utils.go 90.62% <80%> (ø) ⬆️
daemon/containerio/cri_log_file.go 84.31% <0%> (-3.93%) ⬇️
pkg/meta/store.go 62.5% <0%> (-1.57%) ⬇️
daemon/mgr/container_utils.go 83.13% <0%> (-1.21%) ⬇️
cri/v1alpha2/cri.go 66.76% <0%> (-0.3%) ⬇️
daemon/mgr/container.go 57.39% <0%> (ø) ⬆️
cri/v1alpha2/cri_wrapper.go 61.2% <0%> (ø) ⬆️
ctrd/container.go 59.76% <0%> (ø) ⬆️
daemon/logger/jsonfile/utils.go 73.17% <0%> (+1.62%) ⬆️

@pouchrobot pouchrobot added kind/bug This is bug report for project kind/refactor size/S labels Sep 21, 2018
@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Sep 27, 2018
@allencloud allencloud merged commit 52a63c9 into AliyunContainerService:master Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project kind/refactor LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants