如何升级到Airflow2.0?

现在 Airflow 2.0 已经发布,我们很高兴尝试一些新功能。

  • 从 1.10.11 升级到 Airflow 2.0 的最佳方式是什么?
  • 我现有的代码是否有效,或者我是否需要更改我的 DAG?

我们将在本周晚些时候开始在我们的 DEV 环境中进行升级以进行测试。

Airflow 1.10.11 和本地执行器和 Python3

回答

我们已将其记录在https://airflow.apache.org/docs/apache-airflow/stable/upgrading-to-2.html

第 1 步:升级到 Python 3

第 2 步:升级到 Airflow 1.10.14(又名 Airflow“桥”版本)

第 3 步:安装并运行 Airflow Upgrade 检查脚本 ( https://pypi.org/project/apache-airflow-upgrade-check/ )

第 4 步:从 Backport 提供商导入 Operator

第 5 步:升级 Airflow DAG

第 6 步:升级配置设置

第 7 步:升级到 Airflow 2.0

upgrade-check 包应该可以帮助您升级。

阅读https://airflow.apache.org/docs/apache-airflow/stable/upgrading-to-2.html#step-3-install-and-run-the-upgrade-check-scripts

  • The documentation just says to update to 1.10.14, but Step 2 does not say how to do this. Step 3 assumes you've already installed it. I have airflow 1.10.10 currently running - is there an `airflow upgrade` or something?
  • Upgrade - `pip install -U apache-airflow` and once installed `airflow upgradedb` -- same as you would upgrade to any Airflow version
  • @HerrB92 run `pip install -U apache-airflow==1.10.14`

以上是如何升级到Airflow2.0?的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>