From d88a3e5cb0f781cb2b22482ebcdc6f35c1b7c263 Mon Sep 17 00:00:00 2001 From: Elad Kalif <45845474+eladkal@users.noreply.github.com> Date: Thu, 22 May 2025 13:28:03 +0300 Subject: [PATCH] [v3-0-test] Update Airflow 3 migration guide with step about custom operators (#50871) (cherry picked from commit 82c1c9db78f27a97d12fad87aa4760bc5365a9db) Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com> --- .../docs/installation/upgrading_to_airflow3.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/airflow-core/docs/installation/upgrading_to_airflow3.rst b/airflow-core/docs/installation/upgrading_to_airflow3.rst index 843f91934a5e0..c2e0934eb30a9 100644 --- a/airflow-core/docs/installation/upgrading_to_airflow3.rst +++ b/airflow-core/docs/installation/upgrading_to_airflow3.rst @@ -81,8 +81,14 @@ Step 4: Install the Standard Providers - For convenience, this package can also be installed on Airflow 2.x versions, so that DAGs can be modified to reference these Operators from the standard provider package instead of Airflow Core. +Step 5: Review custom operators for direct db access +---------------------------------------------------- -Step 5: Deployment Managers - Upgrade your Airflow Instance +- In Airflow 3 operators can not access the Airflow metadata database directly using database sessions. + If you have custom operators, review the code to make sure there are no direct db access. + You can follow examples in https://github.com/apache/airflow/issues/49187 to find how to modify your code if needed. + +Step 6: Deployment Managers - Upgrade your Airflow Instance ------------------------------------------------------------ For an easier and safer upgrade process, we have also created a utility to upgrade your Airflow instance configuration. @@ -113,7 +119,7 @@ If you have plugins that use Flask-AppBuilder views ( ``appbuilder_views`` ), Fl them to FastAPI apps or ensure you install the FAB provider which provides a backwards compatibility layer for Airflow 3. Ideally, you should convert your plugins to FastAPI apps ( ``fastapi_apps`` ), as the compatibility layer in the FAB provider is deprecated. -Step 6: Changes to your startup scripts +Step 7: Changes to your startup scripts --------------------------------------- In Airflow 3, the Webserver has become a generic API server. The API server can be started up using the following command: