potiuk commented on code in PR #32604:
URL: https://github.com/apache/airflow/pull/32604#discussion_r1269322903


##########
airflow/providers/celery/executors/celery_kubernetes_executor.py:
##########
@@ -55,14 +56,21 @@ class CeleryKubernetesExecutor(LoggingMixin):
 
     callback_sink: BaseCallbackSink | None = None
 
-    KUBERNETES_QUEUE = conf.get("celery_kubernetes_executor", 
"kubernetes_queue")
+    @cached_property
+    def kubernetes_queue(self) -> str:
+        # lazily retrieve the value of kubernetes_queue from the configuration
+        # because it might need providers
+        from airflow.providers_manager import ProvidersManager
+
+        ProvidersManager().initialize_providers_configuration()
+        return conf.get("celery_kubernetes_executor", "kubernetes_queue")

Review Comment:
   Not needed because Providers Manager configuration is already initialized 
two lines above and fallback is retrieved from the configuratoin loaded - 
fallbacks are only needed for "Arg parsing" - because during arg parsing we 
should not have providers manager loaded (expensive operation to just parse 
args). That's why we need hard-coded fallbacks there.



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