api7 / apisix-mesh-agent

Apache License 2.0
78 stars 10 forks source link

fix: send rds with route config names from LDS #45

Closed tokers closed 3 years ago

tokers commented 3 years ago

The RDS (route discovery request) requests should be configured the route config names (in ResourceNames field), these names can be collected in LDS (listener discovery request), so in this PR, we sent LDS request firstly, fetching route config names there and then triggering another RDS request.

Also, the default route match is "case sensitive", so when the CaseSensitive field is missing, we should treat it as true.

tokers commented 3 years ago

@membphis PTAL, thanks!

codecov[bot] commented 3 years ago

Codecov Report

Merging #45 (66823fc) into main (83987f3) will decrease coverage by 0.26%. The diff coverage is 56.79%.

:exclamation: Current head 66823fc differs from pull request most recent head 74240e9. Consider uploading reports for the commit 74240e9 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
- Coverage   73.40%   73.13%   -0.27%     
==========================================
  Files          30       31       +1     
  Lines        2113     2189      +76     
==========================================
+ Hits         1551     1601      +50     
- Misses        433      456      +23     
- Partials      129      132       +3     
Impacted Files Coverage Δ
pkg/adaptor/xds/v3/types.go 0.00% <ø> (ø)
pkg/provisioner/xds/v3/grpc/delivery.go 47.56% <0.00%> (-7.37%) :arrow_down:
pkg/provisioner/xds/v3/grpc/types.go 72.80% <58.33%> (+0.57%) :arrow_up:
pkg/adaptor/xds/v3/listener.go 72.72% <72.72%> (ø)
pkg/adaptor/xds/v3/route.go 79.16% <75.00%> (+0.64%) :arrow_up:

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 83987f3...74240e9. Read the comment docs.