Page MenuHomePhabricator

Adapt airflow chart for 3.3.x
Closed, ResolvedPublic

Description

Continues work from T432993

  • Use the airflow config update and airflow config update --fix commands to vlidate the configuration. P95569
  • The Dag processor must now be started independently, even for local or development setups: airflow dag-processor
    • airflow-devenv should wait for dag-processor to start before _Forcing DAG serialization_
    • import_helper.py is compatible with Airflow 3.3
  • Deploy to the airflow-devenv environment and execute airflow db migrate
  • Re-work chart patch
  • DAGs
    • setup python3 P95842
    • Setup core.execution_api_server_url to $baseurl/execution P95856
    • Setup jwt token (client P95864, server P95924, pod description P95856)

Acceptance criteria

  • all components are present
  • minimal test_k8s Dag is running

Event Timeline

atsuko updated the task description. (Show Details)

Change #1319858 had a related patch set uploaded (by Atsuko; author: Atsuko):

[operations/deployment-charts@master] airflow: undo dev instance version pinning

https://gerrit.wikimedia.org/r/1319858

Tried running DAGs, k8s pods are failing with python not being found P95842

Providers list doesn't match a little

-apache-airflow-providers-ftp
-apache-airflow-providers-imap
+apache-airflow-providers-openlineage
+apache-airflow-providers-standard

Change #1318719 had a related patch set uploaded (by Atsuko; author: Atsuko):

[operations/deployment-charts@master] airflow: support for v3.3.0

https://gerrit.wikimedia.org/r/1318719

Change #1319858 merged by jenkins-bot:

[operations/deployment-charts@master] airflow: undo dev instance version pinning

https://gerrit.wikimedia.org/r/1319858

Change #1318719 merged by jenkins-bot:

[operations/deployment-charts@master] airflow: support for v3.3.0

https://gerrit.wikimedia.org/r/1318719

After merging leftover diffs, the command to try airflow 3.3.0 is

airflow-devenv create \
    --branch main_airflow_3.3 --extra-values values-airflow3.yaml \
    -d test-k8s -f dags/kubernetes_pod_operator_dag.py

Directory -d and list of dags -f can be different.

Gr-r-r, airflow hardcodes python in every invocation, so P95842 happens, rebuilding the image.

Upd: new image has helped, now it needs to actually be able to reach API server P95856.

To make the executor work P95856, we need to address the difference between Airflow 2 and 3 (see F75945493 and F75945523 for in-process API server and links for API server), where all the requests need to go thru the API server.

For this, we need to run envoy to the API server (or the API server instance maybe) in a sidecar.

  • Airflow 2 architecture

image.png (1,940×1,162 px, 288 KB)

  • Airflow 3 architecture

image.png (2,098×1,172 px, 372 KB)

Change #1320131 had a related patch set uploaded (by Atsuko; author: Atsuko):

[operations/deployment-charts@master] update airflow3 image

https://gerrit.wikimedia.org/r/1320131

After applying temporary patch that will ID the containers, P95860, I can say that airflow.sdk.execution_time.execute_workload is using taskpod template. Now thats easy.

Progress in https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1320131

ToDo

  • Setup core.execution_api_server_url to $baseurl/execution

[]x Setup proxies if needed in kubernetes-executor.pod-template

  • Figure out auth problem with the token (client P95864, server P95924, pod description P95856)

Added airflow__api_auth__jwt_secret to airflow-test-k8s private config, will need to add to the rest of the deployments.

commit 68797c03e6617b049077224de9cb1637f04d4eba (HEAD -> master)
Date:   Thu Aug 6 11:35:01 2026 +0000

    (atsuko) airflow-test-k8s: adding JWT secret for Airflow 3

Change #1320131 merged by jenkins-bot:

[operations/deployment-charts@master] airflow3 support

https://gerrit.wikimedia.org/r/1320131

Change #1322840 had a related patch set uploaded (by Atsuko; author: Atsuko):

[operations/deployment-charts@master] airflow3 support

https://gerrit.wikimedia.org/r/1322840

Change #1322840 merged by jenkins-bot:

[operations/deployment-charts@master] airflow3 support

https://gerrit.wikimedia.org/r/1322840

Added secrets for the rest of the deployments

commit f70ab2c72d3016f21d904ccf0dff5d70dcc7d44c (HEAD -> master)
Date:   Tue Aug 11 11:09:44 2026 +0000

    (atsuko) airflow: adding JWT secret for Airflow 3

The only leftover is dag-processor CR, gonna merge it today and we are done here.

Change #1324711 had a related patch set uploaded (by Atsuko; author: Atsuko):

[operations/deployment-charts@master] dag-processor

https://gerrit.wikimedia.org/r/1324711

Change #1324711 abandoned by Atsuko:

[operations/deployment-charts@master] dag-processor

Reason:

duplicate of Ie7c17175d84c1e3f5fc5a8d7bb64f5836f7459b2

https://gerrit.wikimedia.org/r/1324711

Change #1324678 had a related patch set uploaded (by Atsuko; author: Atsuko):

[operations/deployment-charts@master] dag-processor

https://gerrit.wikimedia.org/r/1324678

Change #1324678 merged by jenkins-bot:

[operations/deployment-charts@master] airflow: dag-processor for Airflow 3

https://gerrit.wikimedia.org/r/1324678