-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
runtime: add static layer case to loader impl #7932
Conversation
Signed-off-by: Asra Ali <asraa@google.com>
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.
Thanks is it possible to have some test that covers this? You can use EXPECT_LOG_CONTAINS to test the presence/absence of the warning.
/wait
Signed-off-by: Asra Ali <asraa@google.com>
@@ -496,6 +497,11 @@ TEST_F(StaticLoaderImplTest, All) { | |||
testNewOverrides(*loader_, store_); | |||
} | |||
|
|||
// Validate that Static Layer does not log as unsupported. | |||
TEST_F(StaticLoaderImplTest, NoUnsupportedStaticLog) { | |||
EXPECT_LOG_NOT_CONTAINS("warning", "Skipping unsupported runtime layer", setup()); |
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.
While you are in here can you add a test for the warning also? Thank you!
/wait
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.
Hm, we actually shouldn't be able to get to this condition ever since there's a proto constraint that validates that we specify one of static/disk/admin/rtds. It'd run in to a proto validation error first. I suppose the warning would only come up if a new layered_runtime was added without support in LoaderImpl.
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.
Yeah if there is a constraint, just remove the warning instead and use NOT_REACHED
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 think this test is useful anymore. Can you revert these changes? Thank you!
/wait
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.
Sorry about that, should just be the NOT_REACHED case now (with proto validator).
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
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.
Thank you!
When using a static layer, Envoy should catch the case instead of falling through to an unsupported layer specifier.
Risk Level: Low
Fixes Issues #7919
istio/istio#16083
Signed-off-by: Asra Ali asraa@google.com