Skip to content

config: add config type to error logs during validation#10348

Merged
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
LisaLudique:validate-terminal-filters-logs
Mar 17, 2020
Merged

config: add config type to error logs during validation#10348
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
LisaLudique:validate-terminal-filters-logs

Conversation

@LisaLudique
Copy link
Contributor

Description: Adds config type to error logs in validateTerminalFilters to make debugging easier, particularly now that the filter name does not determine the actual filter being configured.
Risk Level: Low
Testing: Updated existing unit tests.
Docs Changes: N/A
Release Notes: N/A

Lisa Lu added 3 commits March 11, 2020 16:53
Signed-off-by: Lisa Lu <lisalu@lyft.com>
Signed-off-by: Lisa Lu <lisalu@lyft.com>
Signed-off-by: Lisa Lu <lisalu@lyft.com>
@LisaLudique
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: coverage (failed build)

🐱

Caused by: a #10348 (comment) was created by @LisaLudique.

see: more, trace.

processFilter(filters[i], i, "http", filter_factories_, is_terminal);
Config::Utility::validateTerminalFilters(filters[i].name(), "http", is_terminal,
auto& factory = processFilter(filters[i], i, "http", filter_factories_, is_terminal);
Config::Utility::validateTerminalFilters(filters[i].name(), factory.name(), "http", is_terminal,
Copy link
Member

Choose a reason for hiding this comment

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

I think it might be cleaner to just move the call to validateTerminalFilters inside processFilter. That way we don't have to hand back the factory reference and can get rid of the update of is_terminal by reference (that var can just be internal to processFilter). What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. I'll work on making that change.

Signed-off-by: Lisa Lu <lisalu@lyft.com>
Copy link
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

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

Thanks!

@mattklein123 mattklein123 merged commit 252e692 into envoyproxy:master Mar 17, 2020
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