AliyunContainerService / kube-eventer

kube-eventer emit kubernetes events to sinks
Apache License 2.0
1.01k stars 278 forks source link

fix: 🐛 try to fix goroutines exportEventsTimeout #108

Closed wind2008hxy closed 4 years ago

wind2008hxy commented 4 years ago

What type of PR is this? PR类型是什么?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

bug

What this PR does / why we need it: 这个PR解决了什么问题: try to fix goroutines exportEventsTimeout 尝试修复travis ci 测试过程报错

image

Which issue(s) this PR fixes: PR相关联issue:

Fixes #

Does this PR introduce a breaking change?: PR带来的破坏性变更:

None

Test/Final result: 测试/最终运行结果:

codecov-commenter commented 4 years ago

Codecov Report

Merging #108 into master will decrease coverage by 0.09%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #108      +/-   ##
==========================================
- Coverage   50.97%   50.88%   -0.10%     
==========================================
  Files          27       27              
  Lines        1634     1637       +3     
==========================================
  Hits          833      833              
- Misses        729      732       +3     
  Partials       72       72              
Impacted Files Coverage Δ
sinks/webhook/webhook.go 26.80% <0.00%> (-0.86%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 548ea0a...6091073. Read the comment docs.

wind2008hxy commented 4 years ago

image

wind2008hxy commented 4 years ago

https://github.com/AliyunContainerService/kube-eventer/blob/548ea0a3a748499e424da1af514f1fe49ddc1fa6/sinks/manager_test.go#L35 &batch实际是同一个内存地址,多个goroutines尝试读取的时候,实际会是多个goroutines顺序读取,猜测是这里导致超时。

wind2008hxy commented 4 years ago

rebase to one commit?

ringtail commented 4 years ago

rebase to one commit?

Yes

wind2008hxy commented 4 years ago

need rebase

rebase