Page MenuHomePhabricator

[Analytics] [Tech Debt] Upgrade airflow-wmde to 3.3.x
Open, In Progress, MediumPublic

Description

WMDE Analytics Tech Debt

This task was generated using the WMDE Analytics tech debt form. Please use the task templates linked on our project page to create tasks for the team. Thank you!

Why (Context & Benefit)

What problem are you trying to solve, and how will the team benefit? What would happen if we didn’t do this task?

NOTE: This is required tech debt that would ideally be completed by the end of October 2026.

WMF is upgrading Airflow to version 3.3.x, mostly for security reasons, as Airflow 2.x is not supported anymore. Unfortunately, there are lots of APIs changes.

This task is tracking the upgrade of wmde instance, as defined in Gitlab in airflow-dags/wmde and Gerrit in deployment-charts/.../airflow-wmde.

Most of the changes are tracked as subtasks of T423248.

Sub Tasks

A breakdown of the steps to complete this task.

Resolving the Tech Debt
  • Define PoC DAGs for the wmde instance (WMDE)
    • WMDE DAGs tend to use the following
      • Datasets sensors
      • URLSensor
      • SparkSqlOperator
      • EmailOperator
      • RestExternalTaskSensor
      • HDFSArchiveOperator (write to a directory that a non-production user has access to)
  • Testing the Dags in airflow-devenv to figure out the scope (see Accessing Airflow 3) (WMDE)
  • Code upgrades to make sure most of the airflow-dags codebase is working (WMDE)
  • Validation of the wmde instance in airflow-devenv (WMDE)
  • Planning the switchover (WMF)
Finishing Up
  • Required documentation is written
  • The task is moved to Delivered (no reassignment necessary)

Event Timeline

atsuko triaged this task as Medium priority.

Thanks so much for the task, @atsuko! Please let us know what we can do to support. It'd also be great if we knew the general deadline you're thinking for this so that we can plan any work on our end 😊

@AndrewTavis_WMDE Hi! Realistically, we plan to finish the upgrade in next 2-3 month.

As for help and support, I'd be glad if you can tell me how to safely test-run Dags in your instance, so we can test it in airflow-devenv, or if anyone would try to test the Dags in airflow-devenv in Airflow 3, see https://wikitech.wikimedia.org/wiki/Data_Platform/Systems/Airflow/Accessing_Airflow_3.

I think that we can try to set aside some time to test this :) Let me check with the team and we can hopefully prioritize some time for this in the next two weeks, if that would work?

My one question on testing is that we're passing --branch main_airflow_3.3. Say that we do run into some issue with the DAGs and then we want to update them. How do we set it up such that we can test the new changes to the DAGs on Airflow 3.3? Would we do the changes you've done on your main_airflow_3.3 branch and any other changes we need to get things working, and then we'd test on this new branch that combines your Airflow 3.3 changes and the changes we need to make?

atsuko changed the task status from Open to In Progress.Aug 21 2026, 1:27 PM

How do we set it up such that we can test the new changes to the DAGs on Airflow 3.3?

You will need to checkout main_airflow_3.3 and make a branch off it, and then run airflow-devenv with your dev branch as usual. When you'll be creating the pull-request, you'll need to specify that it is the pull-request to the main_airflow_3.3 branch. Put me in the reviewer or ping me so I can check it too.

To run the test

atsuko@deploy1003:~$ airflow-devenv create --branch main_airflow_3.3 -d wmde --extra-values values-airflow3.yaml

To fix in the 3.3 branch

atsuko@akko-thinkpad:airflow-dags$ git checkout main_airflow_3.3 && git pull
atsuko@akko-thinkpad:airflow-dags$ git checkout -b wmde-fixes-to-3.3
## fix-fix-fix
## git push as normal

To run the test from the new branch

atsuko@deploy1003:~$ airflow-devenv create --branch wmde-fixes-to-3.3 -d wmde --extra-values values-airflow3.yaml

Thanks for the above, @atsuko! We'll communicate next week on when we'll have the time to do the tests :)

AndrewTavis_WMDE renamed this task from Upgrade airflow-wmde to 3.3.x to [Analytics] [Tech Debt] Upgrade airflow-wmde to 3.3.x.Aug 24 2026, 1:16 PM
AndrewTavis_WMDE updated the task description. (Show Details)
AndrewTavis_WMDE moved this task from In Preparation to Backlog on the WMDE Analytics board.

Hey @atsuko 👋 We discussed this task in our review and planning meeting just now and I've switched over the style to match our tech debt tasks given we'll be taking a good part of this on. Hope the format update's ok!

See the subtasks to resolve the tech debt above, where as I understand it WMDE would be taking on all of it except for the last one where the switchover is planned :) Please let us know if this is a sensible plan from your end. I would expect given the backlog that this will be picked up middle to end of next month.

Hey @atsuko 👋 Quick question on this coming from a discussion that @catherine.kelsey.wmde and I were having with @JAllemandou: Is the assumption that testing will just be on an airflow-devenv instance that's running on a non-production user as is the default, or will we also need to test things using our analytics-wmde user to make sure that it will work in production? I've added an overview of the various operators that we use in the wmde instance to the task description, which I think are all fairly standard. Please let us know if you think we'll need to test with a production user so we can factor this into the work here 😊

@AndrewTavis_WMDE @catherine.kelsey.wmde @JAllemandou testing in airflow-devenv at this stage is more than enough. We'd are not ready to run Airflow 3.3 with production configs of sorts.

We would like to learn if there are DAGs that fail to import, or have API mismatch, etc errors of this sort. After we collect this knowledge and address it in the airflow-dags codebase, we will be more comfortable to get back to ask for more extensive acceptance validation.