Skip to content

util: ignore unknown fields in parsing jsons#3778

Merged
htuch merged 2 commits intoenvoyproxy:masterfrom
kyessenov:filter_config_compatibility
Jul 3, 2018
Merged

util: ignore unknown fields in parsing jsons#3778
htuch merged 2 commits intoenvoyproxy:masterfrom
kyessenov:filter_config_compatibility

Conversation

@kyessenov
Copy link
Contributor

@kyessenov kyessenov commented Jul 2, 2018

Signed-off-by: Kuat Yessenov kuat@google.com

Description: Add ignore_unknown_fields option to parsing JSONs. This is needed since JSON is used to round-trip filter configuration structs, which means new filter config fields will cause older envoys to fail to accept the config.

Risk Level: Small. This change makes config parsing more lenient. The risk is in accepting incorrect config, but that is better handled by validation.

Testing: All unit tests pass, added a new regression test.

Docs Changes: None

Release Notes: Allow unknown fields in filter configuration.

Signed-off-by: Kuat Yessenov <kuat@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about a new utility test that would have failed before this change?

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Contributor Author

Thanks, added a regression test.

@htuch htuch merged commit 090676d into envoyproxy:master Jul 3, 2018
@kyessenov kyessenov deleted the filter_config_compatibility branch July 3, 2018 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants