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

Option to auto-replace deprecated configs with new options for 2.0 #12294

Open
kaxil opened this issue Nov 11, 2020 · 0 comments
Open

Option to auto-replace deprecated configs with new options for 2.0 #12294

kaxil opened this issue Nov 11, 2020 · 0 comments

Comments

@kaxil
Copy link
Contributor

@kaxil kaxil commented Nov 11, 2020

This issue is part of #8765

It would be good to have a rule or command in upgrade-check utility tool to replace the deprecated configs with new options.

Following are the deprecated options:

# A mapping of (new option -> old option). where option is a tuple of section name and key.
# When reading new option, the old option will be checked to see if it exists. If it does a
# DeprecationWarning will be issued and the old option will be used instead
deprecated_options = {
('elasticsearch', 'host'): ('elasticsearch', 'elasticsearch_host'),
('elasticsearch', 'log_id_template'): ('elasticsearch', 'elasticsearch_log_id_template'),
('elasticsearch', 'end_of_log_mark'): ('elasticsearch', 'elasticsearch_end_of_log_mark'),
('elasticsearch', 'frontend'): ('elasticsearch', 'elasticsearch_frontend'),
('elasticsearch', 'write_stdout'): ('elasticsearch', 'elasticsearch_write_stdout'),
('elasticsearch', 'json_format'): ('elasticsearch', 'elasticsearch_json_format'),
('elasticsearch', 'json_fields'): ('elasticsearch', 'elasticsearch_json_fields'),
('logging', 'base_log_folder'): ('core', 'base_log_folder'),
('logging', 'remote_logging'): ('core', 'remote_logging'),
('logging', 'remote_log_conn_id'): ('core', 'remote_log_conn_id'),
('logging', 'remote_base_log_folder'): ('core', 'remote_base_log_folder'),
('logging', 'encrypt_s3_logs'): ('core', 'encrypt_s3_logs'),
('logging', 'logging_level'): ('core', 'logging_level'),
('logging', 'fab_logging_level'): ('core', 'fab_logging_level'),
('logging', 'logging_config_class'): ('core', 'logging_config_class'),
('logging', 'colored_console_log'): ('core', 'colored_console_log'),
('logging', 'colored_log_format'): ('core', 'colored_log_format'),
('logging', 'colored_formatter_class'): ('core', 'colored_formatter_class'),
('logging', 'log_format'): ('core', 'log_format'),
('logging', 'simple_log_format'): ('core', 'simple_log_format'),
('logging', 'task_log_prefix_template'): ('core', 'task_log_prefix_template'),
('logging', 'log_filename_template'): ('core', 'log_filename_template'),
('logging', 'log_processor_filename_template'): ('core', 'log_processor_filename_template'),
('logging', 'dag_processor_manager_log_location'): ('core', 'dag_processor_manager_log_location'),
('logging', 'task_log_reader'): ('core', 'task_log_reader'),
('metrics', 'statsd_on'): ('scheduler', 'statsd_on'),
('metrics', 'statsd_host'): ('scheduler', 'statsd_host'),
('metrics', 'statsd_port'): ('scheduler', 'statsd_port'),
('metrics', 'statsd_prefix'): ('scheduler', 'statsd_prefix'),
('metrics', 'statsd_allow_list'): ('scheduler', 'statsd_allow_list'),
('metrics', 'stat_name_handler'): ('scheduler', 'stat_name_handler'),
('metrics', 'statsd_datadog_enabled'): ('scheduler', 'statsd_datadog_enabled'),
('metrics', 'statsd_datadog_tags'): ('scheduler', 'statsd_datadog_tags'),
('metrics', 'statsd_custom_client_path'): ('scheduler', 'statsd_custom_client_path'),
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.