Check for compatibility between Airflow versions
Project description
Apache Airflow Upgrade Check
This package aims to easy the upgrade journey from Apache Airflow 1.10 to 2.0.
While we have put a lot of effort in to making this upgrade as painless as possible, with many changes providing upgrade path (where the old code continues to work and prints out a deprecation warning) there were unfortunately some breaking changes where we couldn't provide a compatibility shim.
The recommended upgrade path to get to Airflow 2.0.0 is to first upgrade to the latest release in the 1.10 series (at the time of writing: 1.10.14) and to then run this script.
pip install apache-airflow-upgrade-check
airflow upgrade_check
This will then print out a number of action items that you should follow before upgrading to 2.0.0 or above.
The exit code of the command will be 0 (success) if no problems are reported, or 1 otherwise.
For example:
============================================= STATUS =============================================
Check for latest versions of apache-airflow and checker.................................SUCCESS
Legacy UI is deprecated by default......................................................SUCCESS
Users must set a kubernetes.pod_template_file value.....................................FAIL
Changes in import paths of hooks, operators, sensors and others.........................FAIL
Remove airflow.AirflowMacroPlugin class.................................................SUCCESS
Check versions of PostgreSQL, MySQL, and SQLite to ease upgrade to Airflow 2.0..........SUCCESS
Fernet is enabled by default............................................................FAIL
Logging configuration has been moved to new section.....................................SUCCESS
Connection.conn_id is not unique........................................................SUCCESS
GCP service account key deprecation.....................................................SUCCESS
Users must delete deprecated configs for KubernetesExecutor.............................FAIL
Changes in import path of remote task handlers..........................................SUCCESS
Chain between DAG and operator not allowed..............................................SUCCESS
SendGrid email uses old airflow.contrib module..........................................SUCCESS
Connection.conn_type is not nullable....................................................SUCCESS
Found 16 problems.
======================================== RECOMMENDATIONS =========================================
Users must set a kubernetes.pod_template_file value
---------------------------------------------------
In Airflow 2.0, KubernetesExecutor Users need to set a pod_template_file as a base
value for all pods launched by the KubernetesExecutor
Problems:
1. Please create a pod_template_file by running `airflow generate_pod_template`.
This will generate a pod using your aiflow.cfg settings
...
Additionally you can use "upgrade config" to:
- specify rules you would like to ignore
- extend the check using custom rules
For example:
airflow upgrade_check --config=/files/upgrade.yaml
the configuration file should be a proper yaml file similar to this one:
ignored_rules:
- LegacyUIDeprecated
- ConnTypeIsNotNullableRule
- PodTemplateFileRule
custom_rules:
- path.to.upgrade_module.VeryCustomCheckClass
- path.to.upgrade_module.VeryCustomCheckClass2
Changelog
1.2.0
- Add upgrade check option to list checks (#13392)
- Add clearer exception for read failures in macro plugin upgrade (#13371)
- Treat default value in
HostnameCallable
rule as good one (#13670) - Created
CustomExecutorsRequireFullPathRule
class (#13678) - Remove
UndefinedJinjaVariableRule
- Created rule for
SparkJDBCOperator
classconn_id
(#13798) - Created
DatabaseVersionCheckRule
class (#13955) - Add Version command for Upgrade Check (#12929)
- Use Tabular Format for the List of Upgrade Check Rules (#14139)
- Fix broken
airflow upgrade_check
command (#14137)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for apache-airflow-upgrade-check-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21c758192ac9c87a45ceca51d74a768235fb223c5e14304e2b3b053ca46dde08 |
|
MD5 | 8c07bab0805dc278c6a8873fa5e9ccd2 |
|
BLAKE2b-256 | c2520eb4917d8bd8fd483b03ea378da6712b41af269cc41ccf60bfc4e8049339 |
Hashes for apache_airflow_upgrade_check-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b09c95be1154a6ea6154c028fbe8565e48f939d8dbd0b2ea70c890000540fc |
|
MD5 | fa48b9abf75b66958a768a9ea8615ad1 |
|
BLAKE2b-256 | 93c1b2b711e995b92e65574b46daaebea004373fbcb9774a5ad156c5770907b0 |