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

optimize on construct envoyfilter #889

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

alexzzh
Copy link
Collaborator

@alexzzh alexzzh commented Mar 27, 2024

Ⅰ. Describe what this PR did

  • 构造envoyfilter的函数有点奇怪,所以提一个PR,以下几点的源码位置见comment
    • 1 downsteam是否为空不应该影响upstream的envoyfilter的构建, 以后在 downsteam 的位置之后增加其他配置,都会有该问题
    • 2 upstream的idletimeout是否为空不应该影响bufferLimit的envoyfilter的构建
    • 3 generateDownstreamEnvoyFilter和generateUpstreamEnvoyFilter函数不应该构造patch的value为空的envoyfilter,原来的代码路径看起来会出现该情况

Ⅱ. Does this pull request fix one issue?

fixes #890

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

  • make run-higress-e2e-test 观察全局配置测试用例测试结果是否pass

Ⅴ. Special notes for reviews

  • 因为有默认配置,所以上述3点没有被触发,但原来的代码读起来很奇怪

@CLAassistant
Copy link

CLAassistant commented Mar 27, 2024

CLA assistant check
All committers have signed the CLA.

}

upstreamStruct := g.constructUpstream(global.Upstream)
bufferLimitStruct = g.constructUpstreamBufferLimit(global.Upstream)
if len(upstreamStruct) == 0 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

3 为什么 Upstream 为空会影响到 BufferLimit 的envoyfilter的构建?

@2456868764
Copy link
Collaborator

LGTM

@johnlanni johnlanni changed the title bugfix on construct envoyfilter optimize on construct envoyfilter Mar 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 35 lines in your changes are missing coverage. Please review.

Project coverage is 38.02%. Comparing base (08e5678) to head (64d4624).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #889      +/-   ##
==========================================
- Coverage   38.12%   38.02%   -0.11%     
==========================================
  Files          61       61              
  Lines       10438    10440       +2     
==========================================
- Hits         3980     3970      -10     
- Misses       6158     6169      +11     
- Partials      300      301       +1     
Files Coverage Δ
pkg/ingress/kube/configmap/global.go 29.19% <0.00%> (-0.15%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

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

LGTM

@johnlanni johnlanni merged commit b4f72d3 into alibaba:main Apr 1, 2024
8 checks passed
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.

optimize: on construct envoyfilter
6 participants