Page MenuHomePhabricator

Upgrade airflow-analytics-product to 3.3.x
Open, In Progress, MediumPublic

Description

We are 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 analytics-product instance, as defined in Gitlab in airflow-dags/analytics_product and Gerrit in deployment-charts/.../airflow-analytics-product.

Most of the changes are tracked as subtasks of T423248.

Stages

  • Ensure that all DAGs are serialisable in Airflow 3
  • Testing the Dags in airflow-devenv to figure out the scope (see Accessing Airflow 3).
  • Code upgrades to make sure most of the airflow-dags codebase is working
  • Validation of the analytics-product instance in airflow-devenv
  • Planning the switchover

PoCs for the analytics-product instance are:

  • ???

Event Timeline

atsuko triaged this task as Medium priority.

I have asked other DAG owners (namely @KCVelaga_WMF, @nshahquinn-wmf, and @Hghani to weigh in with their DAGs.

I know KC has some DAGs that do fancy stuff which might require attention and thorough testing.

For mine, they're mostly your standard fare dataset.get_sensor_for + SparkSqlOperator so presumably no issues there, and they'll be migrated to the experiment instance anyway (T435616: Migrate TK-related DAGs to airflow-experiment-platform).

I have a couple that use a Python job repo, but those will be turned off and removed soon.

Thanks for flagging this @mpopov.


I think this is a good time to review some of the old DAGs, check if the product teams are still using them, and clean-up. I will check with the respective folks.

Three three sets of DAGs that I maintain, that are non-standard (PySpark job repos in most cases)

  • moderation metrics (these are all already paused, most likely be removed).
    • patrolled_recentchanges_daily
    • unpatrolled_recentchanges_daily
    • flagged_revisions_pending_hourly
  • Automoderator metrics (analytics_product/dags/automoderator)
    • automoderator_config_weekly_dag (uses a job repo artifact)
    • automoderator_daily_snapshot_dag (uses a job repo artifact)
  • Content translation metrics (analytics_product/dags/content_translation); the ones that use non-standard code are:
    • cx_translators_daily_dag - already paused, can probably removed.
    • cx_corpora_monthly_dag
    • cx_translations_daily_dag

There are a few others: automoderator_activity_snapshot_monthly_dag, automoderator_potential_vandalism_reverted_monthly_dag, cx_daily_monitoring_metrics_dag, cx_mt_default_service_comparison_monthly_dag, cx_mt_service_availability_monthly_dag, cx_mt_service_usage_monthly_dag, and cx_suggestions_menu_interactions_daily_dag - all of which use a combination of SparkSqlOperator and HDFSArchiveOperator from wmf_airflow_common and no additional custom code, which should probably be fine.


@atsuko - can you please share more about the planned timeline for the migration, couldn't clearly figure out from the parent task?

I only have one Airflow job: new_editor. It's quite simple (dataset.get_sensor_for + SparkSqlOperator as Mikhail said).

It's also ready to be retired (T438632); that's not a priority right now, but if it ends up needing any significant changes for Airflow 3.3, I'd just take on the retirement instead.

atsuko changed the task status from Open to In Progress.Wed, Oct 28, 12:22 PM
atsuko claimed this task.