sunank200 commented on code in PR #44908:
URL: https://github.com/apache/airflow/pull/44908#discussion_r1887512273
##########
airflow/cli/commands/remote_commands/config_command.py:
##########
@@ -64,3 +64,349 @@ def get_value(args):
print(value)
except AirflowConfigException:
pass
+
+
+class ConfigChange:
+ """Class representing the configuration changes in Airflow 3.0."""
+
+ def __init__(
+ self, section: str, option: str, suggestion: str = "", renamed_to:
tuple[str, str] | None = None
+ ) -> None:
+ """
+ Initialize a ConfigChange instance.
+
+ :param section: The section of the configuration.
+ :param option: The option within the section that is removed or
deprecated.
+ :param suggestion: A suggestion for replacing or handling the removed
configuration.
+ :param renamed_to: The new section and option if the configuration is
renamed.
+ """
+ self.section = section
+ self.option = option
+ self.suggestion = suggestion
+ self.renamed_to = renamed_to
+
+ def get_message(self) -> str:
+ """Generate a message for this configuration change."""
+ lint_message = f"Removed deprecated `{self.option}` configuration
parameter from `{self.section}` section. {self.suggestion}"
+
+ if self.renamed_to:
+ new_section, new_option = self.renamed_to
+ rename_message = f" Please use `{new_option}` from section
`{new_section}` instead."
+ lint_message = lint_message + rename_message
+ return lint_message
+
+
+CONFIGS_CHANGES = [
+ ConfigChange(
+ section="admin",
+ option="hide_sensitive_variable_fields",
+ renamed_to=("core", "hide_sensitive_var_conn_fields"),
+ ),
+ ConfigChange(
+ section="admin",
+ option="sensitive_variable_fields",
+ renamed_to=("core", "sensitive_var_conn_names"),
+ ),
+ ConfigChange(
+ section="core",
+ option="check_slas",
+ suggestion="The SLA feature is removed in Airflow 3.0, to be replaced
with Airflow Alerts in "
+ "Airflow 3.1",
Review Comment:
Changed it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]