-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xds: version sniff envoy and switch regular expressions from 'regex' to 'safe_regex' on newer envoy versions #8222
Conversation
// minSafeRegexVersion reflects the minimum version where we could use safe_regex instead of regex | ||
// | ||
// NOTE: the first version that no longer supported the old style was 1.13.0 | ||
minSafeRegexVersion = version.Must(version.NewVersion("1.11.2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conveniently for 1.8.x all of the officially supported versions are covered by this pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could have elected to avoid doing any sniffing at all here, but upcoming work would require us to add it right back in again anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing we could start doing after this lands is to put in guardrails when an older or newer envoy dials in to a consul agent. Maybe not going so far as to reject the connection, but we could start logging a "this envoy is unsupported" warning message for stuff outside of our support matrix.
The |
The |
6b95ee8
to
3a58925
Compare
…to 'safe_regex' on newer envoy versions - cut down on extra node metadata transmission - split the golden file generation to compare all envoy version
@@ -0,0 +1,34 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a script to assist with running the current cases through a version matrix to deduce envoy versions for plugging into those version checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks good to me. Left some minor questions/comments inline.
// supportedEnvoyVersions lists the versions that we generated golden tests for | ||
// | ||
// see: https://www.consul.io/docs/connect/proxies/envoy#supported-versions | ||
var supportedEnvoyVersions = []string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder to move these to somewhere that an agent API can also pull them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figure the moving can happen in the other PR that surfaces the feature.
test/integration/connect/envoy/case-cfg-router-features/config_entries.hcl
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
token
service-router
to link to a different page for describing the regex syntax (which is now re2)Fixes: #8205