-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Airflow 3 is available. We are on version 2.10.5 as of this ticket. As this is a major release, there may be multiple steps required by us in order to handle the upgrade. This ticket will be used to catch sub-tickets for what is needed.
- Analyze existing DAGs to ensure they won't be affected by breaking changes. Airflow has a tool to check for compatibility.
- Upgrade infrastructure to Airflow 3 - Documentation. There is also a new version of the helm chart, which we should upgrade to prior to the Airflow upgrade (the chart supports both versions of Airflow.).
- Review existing DAGs for potential enhancements using upgraded features of Airflow 3
-
Pre-update tasks
-
Update
dag-trigger/airflow-dag-trigger.sh
to use API-V2. -
Update
helm/cas-airflow/webserver_config.py
to handle Auth/FAB changes. -
Check backups
- On the pgbackrest pod
pgbackrest info
to ensure there is a recentfull
backup.
- On the pgbackrest pod
-
Run DB clean commands on the Airflow pod
-
airflow db clean --clean-before-timestamp '$TIMESTAMP'
where$TIMESTAMP
is2025-06-01
fordev/test
and2023-09-01
forprod
-
-
Check dag processing errors on the Airflow pod
-
airflow dags reserialize
-
-
Run
ruff
to do an upgrade check on alldags
and correct any identified issues. See the upgrade docs-
ruff check dag/ --select AIR301 --fix --preview
to execute automated fixes -
ruff check dag/ --select AIR301 --show-fixes --preview
to show recommended fixes afterward-
cas-airflow/dags/
-
cas-bciers/dags/
-
cas-cif/dags/
-
cas-ciip-portal/dags/
-
cas-data-warehouse/dags/
-
cas-ggircs/dags/
-
cas-metabase/dags/
-
-
-
Install
apache-airflow-providers-standard
package, see step 4- Update dags using
PythonOperator
,BatchPythonOperator
,TriggerDagRunOperator
to import from the new package (backwards compatible with Airflow 2)
- Update dags using
-
The auth_backend option in [api] has been renamed to auth_backends - the old setting has been used, but please update your config.
-
The
auth_backends
setting in [api] has hadairflow.api.auth.backend.session
added in the running config, which is needed by the UI. Please update your config before Apache Airflow 3.0. -
Update
airflow
helm chart to1.18.0
- No breaking changes. Ensure that
values.airflow.airflowVersion
is set, as it now defaults to3.0.2
in the chart values.
- No breaking changes. Ensure that
-
-
Update tasks
- Spin down
airflow-scheduler
andairflow-webserver
deployments. - On the pgbackrest pod, run
pgbackrest backup
to create a cold backup. - Push changes to helm values with
values.airflow.airflowVersion
set to latest3.0.6
- Deploy to OpenShift
- On an airflow pod, run
airflow config update
to check configuration. Automated fixes will be applied withairflow config update --fix
. - Ensure database migrations are correct with
airflow db migrate
.
- Spin down