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

fix: pass remote_addrs to APISIX #347

Merged
merged 2 commits into from Apr 10, 2021
Merged

Conversation

tokers
Copy link
Contributor

@tokers tokers commented Apr 9, 2021

Please answer these questions before submitting a pull request

  • Why submit this pull request?

  • Bugfix

  • New feature provided

  • Improve performance

  • Backport patches

  • Related issues


Bugfix

  • Description

  • How to fix?


New feature or improvement

  • Describe the details and related test reports.

Backport patches

  • Why need to backport?

  • Source branch

  • Related commits and pull requests

  • Target branch

@tokers tokers added this to the 0.5.0 milestone Apr 9, 2021
@codecov-io
Copy link

Codecov Report

Merging #347 (94c46ed) into master (456efa6) will decrease coverage by 0.43%.
The diff coverage is 84.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
- Coverage   43.84%   43.40%   -0.44%     
==========================================
  Files          40       39       -1     
  Lines        3435     3449      +14     
==========================================
- Hits         1506     1497       -9     
- Misses       1761     1781      +20     
- Partials      168      171       +3     
Impacted Files Coverage Δ
pkg/kube/translation/apisix_route.go 46.08% <12.50%> (-1.29%) ⬇️
pkg/apisix/resource.go 78.64% <100.00%> (+0.20%) ⬆️
pkg/apisix/route.go 44.17% <100.00%> (-1.17%) ⬇️
pkg/kube/translation/util.go 100.00% <100.00%> (ø)
pkg/apisix/cluster.go 28.44% <0.00%> (-5.97%) ⬇️
test/e2e/e2e.go

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 456efa6...94c46ed. Read the comment docs.

@tokers
Copy link
Contributor Author

tokers commented Apr 9, 2021

@gxthrj Please take a look when you have time.

Methods []string `json:"methods"`
Priority int `json:"priority"`
Plugins map[string]interface{} `json:"plugins"`
UpstreamId string `json:"upstream_id"`
Copy link
Member

Choose a reason for hiding this comment

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

Generally I like some kind of order in lists, arrays or structures but not sure how this affects the whole system.

So with ordering some people chose an alphabetically ordered list, and others use a custom sort order for maybe the first few items in the list and then alphabetically for the rest of the items in the list. There are many ways to sort and design data structures.

Ordering also makes it easier to find existing items in the lists and speeds up adding new items.
So in this file there seems to be two lists and some other files in this PR have lists.
A general code style comment that I always push.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The order of fields affects the memory alignment but is not so important here, if that's really vital, we can optimize it in the future.

@tokers tokers merged commit c6e7180 into apache:master Apr 10, 2021
@tokers tokers deleted the fix/remote-addrs branch April 10, 2021 03:21
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.

None yet

4 participants