Skip to content
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

config: explicitly indicate when tcp_proxy deprecated_v1 value field is empty #5794

Conversation

zuercher
Copy link
Member

Given a filter config {"deprecated_v1":true}, Envoy errors out with a cryptic message
about invalid JSON at lines 0-0. This also happens if the required value field
contains an empty object or if value is misspelled (including when it contains
non-printing characters). This change produces a better error message (and adds
tests for the config parsing).

Risk Level: low
Testing: added unit test
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Stephan Zuercher zuercher@gmail.com

…is empty

Given a filter config {"deprecated_v1":true}, Envoy errors out with a cryptic message
about an invalid schema at lines 0-0. This also happens if the required value field
contains an empty object of if value is misspelled (including when it contains
non-printing characters). This change produces a better error message (and adds
tests for the config parsing).

*Risk Level*: low
*Testing*: added unit test
*Docs Changes*: n/a
*Release Notes*: n/a

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
@zuercher
Copy link
Member Author

(I just spent several days going back and forth off-list with a user who ended up having non-printing characters embedded in their config YAML's "value:" key. Something email+copy/paste helpfully stripped the offending character on my end. Hilarity ensued.)

Copy link
Member

@venilnoronha venilnoronha left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the usability upgrade!

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.

Nice

@mattklein123 mattklein123 merged commit f4ac92b into envoyproxy:master Feb 1, 2019
fredlas pushed a commit to fredlas/envoy that referenced this pull request Mar 5, 2019
…is empty (envoyproxy#5794)

Given a filter config {"deprecated_v1":true}, Envoy errors out with a cryptic message
about an invalid schema at lines 0-0. This also happens if the required value field
contains an empty object of if value is misspelled (including when it contains
non-printing characters). This change produces a better error message (and adds
tests for the config parsing).

*Risk Level*: low
*Testing*: added unit test
*Docs Changes*: n/a
*Release Notes*: n/a

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
Signed-off-by: Fred Douglas <fredlas@google.com>
@zuercher zuercher deleted the zuercher/better-tcp-proxy-deprecated-v1-error branch November 7, 2019 18:46
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