Page MenuHomePhabricator

Airflow upgrade (refactor deb creation + version bump + switch to PostgreSQL)
Closed, ResolvedPublic5 Estimated Story Points

Description

Airflow target version:

  • Original target version: 2.3.4
  • Since then, a new version has been released: 2.5.0

We could try to upgrade to the very last one. From the upgrade to 2.3.4, I think we mainly risk deprecation warnings.

Target environments:

  • dev instance
  • test cluster
  • prod cluster

Target instances

  • Analytics_test
  • Search_next
  • Analytics
  • Research
  • Platform_eng

Event Timeline

Antoine_Quhen renamed this task from Airflow upgrade (version bump + switch to PostgreSQL) to Airflow upgrade (refactor deb creation + version bump + switch to PostgreSQL).Jan 4 2023, 8:57 AM
Antoine_Quhen updated the task description. (Show Details)
EChetty set the point value for this task to 5.Jan 16 2023, 4:29 PM

Change 889572 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Add a postgresql database and user for airflow_search_platform

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

Change 889572 merged by Btullis:

[operations/puppet@production] Add a postgresql database and user for airflow_search_platform

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

Note: we should create a new branch, main_airflow_2_5_1, in airflow-dags to deploy the code only one the instances which are migrated. Hopefully, it shouldn't take long. Then when the migration process is finished we could merge to main and deploy from main.

Change 891804 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Ensure that the airflow database names match existing conventions

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

Change 891804 merged by Btullis:

[operations/puppet@production] Ensure that the airflow database names match existing conventions

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

We have:

btullis@apt1001:~$ sudo -i reprepro ls airflow
airflow | 2.1.4-py3.7-5 | buster-wikimedia | amd64
  • Added the new one to apt.wikimedia.org with:
btullis@apt1001:~$ sudo -i reprepro includedeb buster-wikimedia `pwd`/airflow-2.5.1-py3.10-20230221_amd64.deb
Exporting indices...
Deleting files no longer referenced...
  • Verified that it is is available on the apt server.
btullis@apt1001:~$ sudo -i reprepro ls airflow
airflow | 2.5.1-py3.10-20230221 | buster-wikimedia | amd64
  • Verified that it is available on the client
btullis@an-test-client1001:~$ apt-cache policy airflow
airflow:
  Installed: 2.1.4-py3.7-5
  Candidate: 2.1.4-py3.7-5
  Version table:
 *** 2.1.4-py3.7-5 1001
       1001 http://apt.wikimedia.org/wikimedia buster-wikimedia/main amd64 Packages
        100 /var/lib/dpkg/status
btullis@an-test-client1001:~$ sudo apt update --quiet
Get:1 http://apt.wikimedia.org/wikimedia buster-wikimedia InRelease [173 kB]
Hit:2 http://mirrors.wikimedia.org/debian buster InRelease
Hit:3 http://mirrors.wikimedia.org/debian buster-updates InRelease
Hit:4 http://mirrors.wikimedia.org/debian buster-backports InRelease
Hit:5 http://security.debian.org/debian-security buster/updates InRelease
Hit:6 http://deb.debian.org/debian-debug buster-debug InRelease
Get:7 http://apt.wikimedia.org/wikimedia buster-wikimedia/main amd64 Packages [110 kB]
Fetched 282 kB in 1s (249 kB/s)
su: warning: cannot change directory to /nonexistent: No such file or directory

You do not have a valid Kerberos ticket in the credential cache, remember to kinit.
INFO:debmonitor:Found 1108 installed binary packages
INFO:debmonitor:Found 40 upgradable binary packages (including new dependencies)
INFO:debmonitor:Successfully sent the upgradable update to the DebMonitor server
Reading package lists...
Building dependency tree...
Reading state information...
38 packages can be upgraded. Run 'apt list --upgradable' to see them.
btullis@an-test-client1001:~$ apt-cache policy airflow
airflow:
  Installed: 2.1.4-py3.7-5
  Candidate: 2.5.1-py3.10-20230221
  Version table:
     2.5.1-py3.10-20230221 1001
       1001 http://apt.wikimedia.org/wikimedia buster-wikimedia/main amd64 Packages
 *** 2.1.4-py3.7-5 100
        100 /var/lib/dpkg/status

Change 896098 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Upgrade Airflon on an-launcher1002 to version 2.5.1

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

Change 896098 merged by Btullis:

[operations/puppet@production] Upgrade Airflow on an-launcher1002 to version 2.5.1

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

Change 897845 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Upgrade the airflow package in stat hosts

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

Change 897845 abandoned by Btullis:

[operations/puppet@production] Upgrade the airflow package in stat hosts

Reason:

Unnecessary

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

For the Research team we will wait until Fabian is back to participate in the upgrade, requested by Miriam

Change 900366 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Upgrade Airflow on the platform_eng instance and switch to PostgreSQL

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

Change 900366 merged by Btullis:

[operations/puppet@production] Upgrade Airflow on the platform_eng instance and switch to PostgreSQL

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

Change 900403 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Remove the overridden configuration for airflow-platform_eng

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

Change 900403 merged by Btullis:

[operations/puppet@production] Remove the overridden configuration for airflow-platform_eng

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

Change 903242 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Upgrade the research airflow instance

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

Change 903242 merged by Btullis:

[operations/puppet@production] Upgrade the research airflow instance

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

Change 903254 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Remove stray referece to ariflow db from research instance

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

Change 903254 merged by Btullis:

[operations/puppet@production] Remove stray referece to ariflow db from research instance

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

BTullis triaged this task as Medium priority.EditedMar 31 2023, 12:10 PM
BTullis updated the task description. (Show Details)

Can we say that this epic is closed now @Antoine_Quhen or is there more work to do on it?

Oh, I suppose that there are still some puppet bit to clean up, now that we no longer have any Airflow 2.1 instances deployed.

BTullis closed subtask Restricted Task as Resolved.Mar 31 2023, 12:21 PM