potiuk commented on issue #31442:
URL: https://github.com/apache/airflow/issues/31442#issuecomment-1556112885

   Very interesting bug :) .
   
   The root cause is AIP-51 related change 
https://github.com/apache/airflow/pull/28375 which added executor 
initialization in Sentry's ConfiguredSentry() `__init__` class. This is done 
only in order to see if the executor supports sentry.
   
   ```
               if executor_class.supports_sentry:
                   from sentry_sdk.integrations.celery import CeleryIntegration
   
                   sentry_celery = CeleryIntegration()
                   integrations.append(sentry_celery)
   ````
   
   It's an interesting sequence of events:
   
   * local settings are being imported
   * UIAlertView is created in the local settings
   * while creating it, taskinstace class is imported
   * which in turn initializes Sentry
   * which instantiates the executor class
   * which needs settings (but settings are not fully initialized yet so we 
raise the exception).
   
   @o-nikolas @rkarish you might want to take a look and do some other way of 
checking if the executor we have supports sentry - without necessarily 
initializing it. This might be tricky.
   


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