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_param options to specify deprecated/obsoleted parameters #1186

Merged
merged 7 commits into from
Aug 29, 2016

Conversation

tagomoris
Copy link
Member

This change adds 2 options for config_param.
And I marked host, port of out_forward without <server> sections as obsoleted.

deprecated

Unrecommended parameter, and will be removed in future.
If users specify this parameter, Fluentd warns it in logs.

obsoleted

Configuration parameter which is already removed.
If users specify this parameter, Fluentd stops with an error (a kind of configuration errors).

@tagomoris
Copy link
Member Author

@repeatedly could you review this change?

@tagomoris tagomoris mentioned this pull request Aug 26, 2016
5 tasks
@tagomoris tagomoris added enhancement Feature request or improve operations v0.14 feature request *Deprecated Label* Use enhancement label in general and removed enhancement Feature request or improve operations labels Aug 26, 2016
@repeatedly repeatedly self-assigned this Aug 29, 2016
# because they are expected to be removed entirely sometime in the future.
# Obsoleted: These obsolete features have been entirely removed from JavaScript and can no longer be used.
if opts[:deprecated]
logger.warn "'#{name}' paramenter isn't recommended to use now."
Copy link
Member

Choose a reason for hiding this comment

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

typo: parameter

@repeatedly
Copy link
Member

One idea. How about adding "message" like parameter to show better logs?.

 config_param :host, :string, default: nil, obsoleted: true, message: "Use <server> section instead"

result:

 'host' parameter is already removed. Don't use it. Use <server> section instead"

@tagomoris
Copy link
Member Author

@repeatedly When is that parameter used? only for deprecated and obsoleted?
If so, it may be better to change value type of these options from true/false to string of message to show. Isn't it?

@repeatedly
Copy link
Member

it may be better to change value type of these options from true/false to string of message to show. Isn't it?

LGTM 👍

@repeatedly
Copy link
Member

Good. After test passed, please merge.

@tagomoris tagomoris merged commit babfa10 into master Aug 29, 2016
@tagomoris
Copy link
Member Author

Merged.

@tagomoris tagomoris deleted the deprecated-parameter branch August 29, 2016 11:03
repeatedly pushed a commit that referenced this pull request Sep 5, 2016
config_param options to specify deprecated/obsoleted parameters
repeatedly added a commit that referenced this pull request Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request *Deprecated Label* Use enhancement label in general v0.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants