Skip to content

[WIP] Validate deprecated fields via validation visitor#10307

Closed
nezdolik wants to merge 3 commits intoenvoyproxy:masterfrom
nezdolik:proto-validator
Closed

[WIP] Validate deprecated fields via validation visitor#10307
nezdolik wants to merge 3 commits intoenvoyproxy:masterfrom
nezdolik:proto-validator

Conversation

@nezdolik
Copy link
Copy Markdown
Member

@nezdolik nezdolik commented Mar 9, 2020

Signed-off-by: Kateryna Nezdolii nezdolik@spotify.com

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Description: TBD
Risk Level: TBD
Testing: TBD
Docs Changes: TBD
Release Notes: TBD
Fixes #8092

Signed-off-by: Kateryna Nezdolii <nezdolik@spotify.com>
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

@nezdolik The bits that you have here so far look good, thanks for taking this on, but I think at the call site in source/common/protobuf/utility.ccwe're going to expect similar behavior no matter what validation visitor was plumbed through for unknown fields, i.e. exception behavior.

So, I think it's fine to factor the body of this basic block: https://github.com/envoyproxy/envoy/blob/master/source/common/protobuf/utility.cc#L200
into a utility and call from onDeprecated in both warn/strict validation visitors (that site is also where you would call into onDeprecatedField).

Happy to chat more on Slack, this comes down to the qualitative difference between deprecated and unknown fields in how we do breaking changes.

Signed-off-by: Kateryna Nezdolii <nezdolik@spotify.com>
@stale
Copy link
Copy Markdown

stale bot commented Mar 24, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Mar 24, 2020
wip
Signed-off-by: Kateryna Nezdolii <nezdolik@spotify.com>
@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Mar 24, 2020
@stale
Copy link
Copy Markdown

stale bot commented Mar 31, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Mar 31, 2020
@nezdolik
Copy link
Copy Markdown
Member Author

nezdolik commented Apr 5, 2020

still wip

@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Apr 5, 2020
@stale
Copy link
Copy Markdown

stale bot commented Apr 12, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Apr 12, 2020
@stale
Copy link
Copy Markdown

stale bot commented Apr 19, 2020

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify field deprecation and unknown field handling behind the validation visitor

2 participants