The GitHub Actions job "Tests" on airflow.git has succeeded.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
fb119b0e9399031efdcf8c0c09ffc131274ca4e9 / Jarek Potiuk <[email protected]>
Make sure pach_all for gevent worker happens before everything else

This change makes sure that gevent performs monkey_patching before
everything else. Gevent should make sure to patch all the classes
that are non-cooperative via gevent into cooperative ones and it
should be done as the first thing in the forked gunicorn process.

Usually GeventWorker does it automatically, however this happens
after the configuration of gunicorn gets imported. In our case it
means that it happens after airflow setting are loaded - and for
example it means that if S3 remote logging is configured, then boto
is initialzed before patch_all() and it breaks ssl that is patched
by boto itself. Reversing the sequence and making gevent patches
the ssl connection first, fixes the problem.

We could convert airflow settings to local imports, but this
does not guarantee a success because some of the initilization
methods might be executed before GeventWorker starts and it is
also prone to mistakes (adding top-level import to settings
broke it at some point in time and it went unnoticed).

This change does it slightly differently - in case of gevent
worker, we use a different configuration for gunicorn and make
sure that patch_all() is always executed first before any other
import and initialization. This should fix the problem and be
future-proof.

Fixes: #8212

Report URL: https://github.com/apache/airflow/actions/runs/3414374349

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to