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

use envoy xDS server for featuretests #6255

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

skriss
Copy link
Member

@skriss skriss commented Mar 7, 2024

Closes #6254.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.55%. Comparing base (85cc0b7) to head (1b87cda).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6255      +/-   ##
==========================================
+ Coverage   81.19%   81.55%   +0.35%     
==========================================
  Files         133      133              
  Lines       15803    15800       -3     
==========================================
+ Hits        12831    12885      +54     
+ Misses       2678     2618      -60     
- Partials      294      297       +3     
Files Coverage Δ
internal/featuretests/v3/featuretests.go 87.65% <100.00%> (ø)
internal/xdscache/v3/snapshot.go 76.56% <100.00%> (+76.56%) ⬆️

... and 3 files with indirect coverage changes

Comment on lines +485 to +486
sort.Slice(want.Resources, func(i, j int) bool { return string(want.Resources[i].Value) < string(want.Resources[j].Value) })
sort.Slice(r.Resources, func(i, j int) bool { return string(r.Resources[i].Value) < string(r.Resources[j].Value) })
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the biggest change required to get most feature tests to pass, and worth some discussion. It seems that with the go-control-plane server, the order that resources are in when creating the snapshot is not preserved, because internally the slice is converted to a map. Historically, I believe there may have been some inefficiencies in Envoy when resources (particularly Listeners?) were provided in a different order across responses, which is why Contour generally sorted resources before responding with them, but it's definitely possible that those are no longer issues.

Copy link
Member

Choose a reason for hiding this comment

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

yeah I think everything besides the route matches in a RouteConfig should be stored in envoy in a constant-time lookup container

but then as you say i see this old issue: #1159

i wonder if that is still the case...

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll do a few more tests here and look at the Envoy debug logs to see if I can discern anything, but I have to think if there were any issues related to this, other users of go-control-plane would've run into them by now

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems like envoy computes a hash of each resource and uses that to detect when there are changes. Everything in the logs look fine as far as I can tell.

@skriss skriss added the release-note/none-required Marks a PR as not requiring a release note. Should only be used for very small changes. label Mar 7, 2024
@skriss skriss marked this pull request as ready for review March 8, 2024 22:13
@skriss skriss requested a review from a team as a code owner March 8, 2024 22:13
@skriss skriss requested review from tsaarni and sunjayBhatia and removed request for a team March 8, 2024 22:13
@sunjayBhatia sunjayBhatia requested review from a team, davinci26 and izturn and removed request for a team March 8, 2024 22:13
@skriss skriss merged commit bc301a1 into projectcontour:main Mar 12, 2024
30 of 31 checks passed
@skriss skriss deleted the pr-featuretests-envoy-xds branch March 12, 2024 18:35
lubronzhan pushed a commit to lubronzhan/contour that referenced this pull request Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/none-required Marks a PR as not requiring a release note. Should only be used for very small changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update featuretests to use envoy xDS server
2 participants