检查Airflow版本之间的兼容性
项目描述
Apache Airflow升级检查
此包旨在简化从Apache Airflow 1.10到2.0的升级过程。
虽然我们已经投入了大量努力,使升级尽可能无痛,其中许多更改提供了升级路径(旧代码继续工作并打印出弃用警告),但不幸的是,有些破坏性更改我们无法提供兼容性适配器。
推荐的升级路径是首先升级到1.10系列的最新版本(撰写时为1.10.15),然后运行此脚本。
pip install apache-airflow-upgrade-check
airflow upgrade_check
这将打印出在升级到2.0.0或更高版本之前应遵循的多个操作项。
如果未报告问题,则命令的退出代码将为 0(成功),否则为 1。
例如:
============================================= 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
...
此外,您还可以使用“升级配置”来
- 指定您想忽略的规则
- 使用自定义规则扩展检查
例如:
airflow upgrade_check --config=/files/upgrade.yaml
配置文件应该是一个类似于这个的合适的 yaml 文件
ignored_rules:
- LegacyUIDeprecated
- ConnTypeIsNotNullableRule
- PodTemplateFileRule
custom_rules:
- path.to.upgrade_module.VeryCustomCheckClass
- path.to.upgrade_module.VeryCustomCheckClass2
变更日志
1.4.0
- 添加
conf
,不能从 airflow 规则导入 (#14400) - 将规则升级到建议重命名
[scheduler] max_threads
为[scheduler] parsing_processes
(#14913) - 修复在 PTY 中运行 "upgrade_check" 命令的问题。 (#14977)
- 如果检测到无效版本,则跳过
DatabaseVersionCheckRule
检查 (#15122) - 修复
LegacyUIDeprecated
中对False
的过度特定解析 (#14967) - 修复继承
DbApiHook
的类的假阳性 (#16543)
1.3.0
- 修复关于未在 dag 文件中使用过的类的错误警告 (#14700)
- 对于升级规则,从
dag_folder
设置填充 DagBag (#14588) - 错误修正:通过插件检查自定义执行器的假阳性 (#14680)
- 错误修正:修复导入更改规则中的假警报 (#14493)
- 使用
CustomSQLAInterface
而不是SQLAInterface
(#14475) - 修复比较 airflow 版本以与旧版本打包库一起工作的问题 (#14435)
- 修复升级检查中的错误警告和在读取文件中的错误 (#14344)
- 处理 MySQL 版本的可能的后缀 + 避免硬编码 (#14274)
1.2.0
- 将升级检查选项添加到检查列表 (#13392)
- 在宏插件升级中添加更清晰的读取失败异常 (#13371)
- 将
HostnameCallable
规则中的默认值视为良好的值 (#13670) - 创建
CustomExecutorsRequireFullPathRule
类 (#13678) - 删除
UndefinedJinjaVariableRule
- 为
SparkJDBCOperator
类创建规则conn_id
(#13798) - 创建
DatabaseVersionCheckRule
类 (#13955) - 为升级检查添加版本命令 (#12929)
- 使用表格格式列出升级检查规则 (#14139)
- 修复损坏的
airflow upgrade_check
命令 (#14137)
项目详情
关闭
哈希值 for apache_airflow_upgrade_check-1.4.0-py2.py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 26ce6d55fc792a116729a008d2dcceac5afceaa9f11ba0a5b77d9bc22e130f77 |
|
MD5 | ee6237ae4c53ca26553c7df263910136 |
|
BLAKE2b-256 | 5975f1920610f176c227887f34a7e0bbb01b49e1ecc04a82452af8d52a3216b9 |