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

Make incompatible command-line args an error #35570

Merged
merged 4 commits into from
Aug 5, 2024

Conversation

ravenblackx
Copy link
Contributor

@ravenblackx ravenblackx commented Aug 2, 2024

Commit Message: Make incompatible command-line args an error
Additional Description: Per #35073, --enable-fine-grain-logging and --component-log-level don't make sense at the same time, one of them will be overridden by the other in a way that can be surprising for the user. This PR makes it an error to apply both, so the user is not surprised by not getting the logs they expected at runtime.
Risk Level: Small. May make existing command-lines with ineffective options fail.
Testing: Added coverage.
Docs Changes: Updated command-line options docs.
Release Notes: Yes, under minor behavior changes.
Platform Specific Features: n/a

Copy link
Member

@botengyao botengyao left a comment

Choose a reason for hiding this comment

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

Thanks for the improvement!

Could you also add a change-log for this change?

/wait

enable_fine_grain_logging_ = enable_fine_grain_logging.getValue();
if (enable_fine_grain_logging_ && !component_log_level.getValue().empty()) {
throw MalformedArgvException(
std::string{"error: --component-log-level will not work with --enable-fine-grain-logging"});
Copy link
Member

Choose a reason for hiding this comment

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

nit: std::string can be removed?

Signed-off-by: Raven Black <[email protected]>
Copy link
Member

@botengyao botengyao left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

May need a second pass from other folks.

@botengyao
Copy link
Member

/assgin-from @envoyproxy/senior-maintainers

@ravenblackx
Copy link
Contributor Author

/assign-from @envoyproxy/senior-maintainers

Copy link

@envoyproxy/senior-maintainers assignee is @mattklein123

🐱

Caused by: a #35570 (comment) was created by @ravenblackx.

see: more, trace.

@ravenblackx ravenblackx merged commit 3e7cc5a into envoyproxy:main Aug 5, 2024
50 checks passed
@ravenblackx ravenblackx deleted the args branch August 5, 2024 19:58
martinduke pushed a commit to martinduke/envoy that referenced this pull request Aug 8, 2024
Commit Message: Make incompatible command-line args an error
Additional Description: Per envoyproxy#35073, `--enable-fine-grain-logging` and
`--component-log-level` don't make sense at the same time, one of them
will be overridden by the other in a way that can be surprising for the
user. This PR makes it an error to apply both, so the user is not
surprised by not getting the logs they expected at runtime.
Risk Level: Small. May make existing command-lines with ineffective
options fail.
Testing: Added coverage.
Docs Changes: Updated command-line options docs.
Release Notes: Yes, under minor behavior changes.
Platform Specific Features: n/a

---------

Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Martin Duke <[email protected]>
asingh-g pushed a commit to asingh-g/envoy that referenced this pull request Aug 20, 2024
Commit Message: Make incompatible command-line args an error
Additional Description: Per envoyproxy#35073, `--enable-fine-grain-logging` and
`--component-log-level` don't make sense at the same time, one of them
will be overridden by the other in a way that can be surprising for the
user. This PR makes it an error to apply both, so the user is not
surprised by not getting the logs they expected at runtime.
Risk Level: Small. May make existing command-lines with ineffective
options fail.
Testing: Added coverage.
Docs Changes: Updated command-line options docs.
Release Notes: Yes, under minor behavior changes.
Platform Specific Features: n/a

---------

Signed-off-by: Raven Black <[email protected]>
Signed-off-by: asingh-g <[email protected]>
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