jason810496 commented on code in PR #64209:
URL: https://github.com/apache/airflow/pull/64209#discussion_r3000694925


##########
shared/configuration/src/airflow_shared/configuration/parser.py:
##########
@@ -1185,56 +1266,6 @@ def _resolve_deprecated_lookup(
 
         return section, key, deprecated_section, deprecated_key, 
warning_emitted
 
-    def load_providers_configuration(self) -> None:
-        """
-        Load configuration for providers.
-
-        This should be done after initial configuration have been performed. 
Initializing and discovering
-        providers is an expensive operation and cannot be performed when we 
load configuration for the first
-        time when airflow starts, because we initialize configuration very 
early, during importing of the
-        `airflow` package and the module is not yet ready to be used when it 
happens and until configuration
-        and settings are loaded. Therefore, in order to reload provider 
configuration we need to additionally
-        load provider - specific configuration.
-        """
-        log.debug("Loading providers configuration")
-
-        self.restore_core_default_configuration()
-        for provider, config in 
self._provider_manager_type().already_initialized_provider_configs:
-            for provider_section, provider_section_content in config.items():
-                provider_options = provider_section_content["options"]
-                section_in_current_config = 
self.configuration_description.get(provider_section)
-                if not section_in_current_config:
-                    self.configuration_description[provider_section] = 
deepcopy(provider_section_content)
-                    section_in_current_config = 
self.configuration_description.get(provider_section)
-                    section_in_current_config["source"] = f"default-{provider}"
-                    for option in provider_options:
-                        section_in_current_config["options"][option]["source"] 
= f"default-{provider}"
-                else:
-                    section_source = section_in_current_config.get("source", 
"Airflow's core package").split(
-                        "default-"
-                    )[-1]
-                    raise AirflowConfigException(
-                        f"The provider {provider} is attempting to contribute "
-                        f"configuration section {provider_section} that "
-                        f"has already been added before. The source of it: 
{section_source}. "
-                        "This is forbidden. A provider can only add new 
sections. It "
-                        "cannot contribute options to existing sections or 
override other "
-                        "provider's configuration.",
-                        UserWarning,
-                    )
-        self._default_values = 
self._create_default_config_parser_callable(self.configuration_description)
-        # Cached properties derived from configuration_description (e.g. 
sensitive_config_values) need
-        # to be recomputed now that provider config has been merged in.
-        self.invalidate_cache()
-        self._providers_configuration_loaded = True
-
-    def restore_core_default_configuration(self) -> None:
-        """Restore the parser state before provider-contributed sections were 
loaded."""
-        self.configuration_description = 
deepcopy(self._base_configuration_description)
-        self._default_values = 
self._create_default_config_parser_callable(self.configuration_description)
-        self.invalidate_cache()
-        self._providers_configuration_loaded = False

Review Comment:
   Addressed in ecfd294, use formal compatible deprecation for the public API 
instead of directly removing the methods.



-- 
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]

Reply via email to