You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: improve warnings for Direct Path xDS set via env (#3019)
Fixes#2427
### Context
If `GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS` is set in the environment
aiming to enable Direct Path xDS in another client, we want to just warn
the user that _if this is intended_, it can be a misconfiguration and
that the gRPCLB Direct Path setting should be enabled as well.
### Approach
As said in the context, we will _warn_ the user that it _could_ be a
misconfiguration _if_ the env var setting was meant for the client in
question. Other warn cases remain the same.
### Coverage
Due to the fact that part of the method in question is tested via a
special env var test (not detected by SonarCloud), it will show as
uncovered. See this screenshot for coverage of all tests combined

---------
Co-authored-by: Lawrence Qiu <[email protected]>
"DirectPath is misconfigured. The DirectPath XDS option was set, but the attemptDirectPath option was not. Please set both the attemptDirectPath and attemptDirectPathXds options.");
325
+
}
302
326
} else {
303
-
// Case 2: credential is not correctly set
327
+
// Case 3: credential is not correctly set
304
328
if (!isCredentialDirectPathCompatible()) {
305
329
LOG.log(
306
330
Level.WARNING,
307
331
"DirectPath is misconfigured. Please make sure the credential is an instance of "
"DirectPath is misconfigured. The DirectPath XDS option was set, but the attemptDirectPath option was not. Please set both the attemptDirectPath and attemptDirectPathXds options.");
0 commit comments