-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update to v1.30 #333
Update to v1.30 #333
Conversation
This was removed from upstream - see envoyproxy/envoy#32872
These flags are copied from upstream's .bazelrc. The most important one here is the `-fsized-deallocation` which was required to get CEL to compile. The rest may not be necessary, but since they changed in upstream from 1.29 to 1.30, I think it might be a good idea to include them.
There were some details in regex that were changed upstream that we had to incorporate
A few upstream Envoy functions that were being called in this library needed to be passed contexts, which required plumbing that object through the call hierarchy. Along the way, it seemed to appear that there were a few type signatures that were possibly not completely correct, and those have been adjusted to get things compiling successfully.
It seems that passing string arguments constructed with the `+` operator is not allowed in ENVOY_STREAM_LOG, and possibly other macros as well. This was my first encounter with this error, but there might be other instances lurking elsewhere in the repository.
The signature of this abstract class method was changed upstream - this change reflects the fix
Issues linked to changelog: |
Interesting lesson here - when calling `fmt::format`, we must use a constexpr, since the formatting function provides compile-time type checking. Neat!
Current status: known segmentation fault in one of the inja transformer tests: (EDIT: this is fixed by 0058721)
have not yet had a chance to debug it |
Upstream ci calls this, so we put in a dummy target here
/kick
|
public: | ||
Regex::CompiledMatcherPtr matcher(const std::string ®ex) const override { | ||
return std::make_unique<CompiledStdMatcher>( | ||
Solo::Regex::Utility::parseStdRegex(regex)); |
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.
Do we still need to do this if engine is now included by default in 1.30?
It sounds like we are cruising for a bruising in upcoming releases if we rely on this
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 don't believe std::regex
is present in upstream envoy. i see a few references to that class, but no functions that are publicly exported that we can use for using std:regex
. i could be wrong here though, let me know of a way that we can use it
@@ -61,14 +67,6 @@ class ResponseMatcherImpl : public ResponseMatcher { | |||
absl::optional<Matchers::StringMatcherImpl<envoy::type::matcher::v3::StringMatcher>> response_code_details_match_; | |||
}; | |||
|
|||
ResponseMatcherImpl::ResponseMatcherImpl( |
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.
why does this move?
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.
if we're defining the constructor in the header file, i figured we might as well define it in the class declaration, but happy to revert. sorry about the fact that it messed up the diff though
test/extensions/filters/http/transformation/inja_transformer_test.cc
Outdated
Show resolved
Hide resolved
Co-authored-by: Nathan Fudenberg <nathan.fudenberg@solo.io>
…nsions/extensions_build_config.bzl Co-authored-by: Nathan Fudenberg <nathan.fudenberg@solo.io>
Co-authored-by: Nathan Fudenberg <nathan.fudenberg@solo.io>
Co-authored-by: Nathan Fudenberg <nathan.fudenberg@solo.io>
test/extensions/filters/http/transformation/inja_transformer_test.cc
Outdated
Show resolved
Hide resolved
Previous iterations were still using the `vformat` call so they may not have been using the `constexpr` versino of formatting correctly
Update envoy-gloo to use version 1.30.x of upstream envoy
The biggest change here is probably the update to C++20, which follows from this upstream commit.
A large amount of the changes come from navigating Envoy's labyrinth of context hierarchy. I figure that the easiest thing to do is just pass the full context object instead of passing portions of it into our objects. This allows us to keep our function signatures from having to change too much, and in my opinion, is a general best practice going forward as it seems that in the past, we had a habit of just passing more specific objects like
context.scope()
instead.See here for an example, where we modify
TransformationFilterConfig::TransformationFilterConfig
to accept aServer::Configuration::FactoryContext& context
argument instead of ascope
argument. This allows us to retrieve other fields from the context, likecontext.serverFactoryContext()
which is a new parameter that needs to be passed toMatcherCopy::Matcher::create
(this eventually gets plumbed down intobuildHeaderDataVector
).Another example of that is here, where we need to pass
context.serverFactoryContext()
as a new parameter into the StringMatcher constructor. In the process,dispatcher
,runtime
, andrandom
were removed fromAdvancedHttpHealthChecker::AdvancedHttpHealthChecker
. And if any other functions from upstream Envoy also change in the future to require additional parameters from the context, those will be much easier to handle if we just always pass the full context object instead of extracting fields from it.Statusor: removes more exceptions which decreases the size
Serverfactorycontext: Removing singletons