-
Notifications
You must be signed in to change notification settings - Fork 3.9k
removed strict dns check for unknown keys #10285
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
base: master
Are you sure you want to change the base?
Conversation
DnsNameResolver.maybeChooseServiceConfig(bad, new Random(), "host"); | ||
} | ||
|
||
|
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.
please add test cases about bad key behaviour if not already exist.
@@ -888,14 +888,13 @@ public HttpConnectProxiedSocketAddress proxyFor(SocketAddress targetAddress) { | |||
} | |||
|
|||
@Test | |||
public void maybeChooseServiceConfig_failsOnMisspelling() { | |||
public void maybeChooseServiceConfig_nullOnMispelling() { |
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 think you should verify these all:
- A
choice
with a bad key + a valid key, the choice is chosen(non-null). - A
choice
with only bad key, the choice is chosen. - A
choice
missing service config + bad key, throw. (this test case) - A
choice
missing service config + valid key, throw.
Also the test case name is not accurate.
The fix seems right to me but the test is incomplete. |
This is put on hold until a cross language decision is made on #6579 (in about two weeks). |
#6579 describes a service config validation issue.
Specifically, the service config error handling proposal details that we should ignore unknown keys in our service config. This is consistent with the C and Go implementations.
However, a different proposal suggests that an unknown field should invalidate a service config.
This is a fix that is consistent with the former proposal (and the C and Go implementations) and ignores unknown keys in our service config.
(no consensus reached, on hold)