-
Notifications
You must be signed in to change notification settings - Fork 3.9k
xds: temporary flag protection of GcpAuthenticationFilter #12075
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: temporary flag protection of GcpAuthenticationFilter #12075
Conversation
@@ -32,12 +33,19 @@ final class FilterRegistry { | |||
|
|||
private FilterRegistry() {} | |||
|
|||
public static boolean isEnabledGcpAuthnFilter() { | |||
return GrpcUtil.getFlag("GRPC_EXPERIMENTAL_XDS_GCP_AUTHENTICATION_FILTER", false); |
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.
We can avoid making this method call and have it static initialized by creating a package-private access static (non-final) variable and set its value in the unit test directly instead of using System.setProperty. Example.
@@ -2417,6 +2417,7 @@ public Object parse(Any value) { | |||
|
|||
@Test | |||
public void processCluster_parsesAudienceMetadata() throws Exception { | |||
FilterRegistry.isEnabledGcpAuthnFilter = true; |
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.
Use try - finally to undo this setting before the test exits. Example
Also in the other test case.
Missing and final piece of gRFC A83-xds-gcp-authn-filter.md