Create an `airflow upgrade-check` command in 1.10 to ease upgrade path to 2.0.
See original GitHub issueTo make it easier for users to upgrade from 1.10 to 2.0 (when it eventually comes out) we should create a single upgrade-check
command in 1.10 that checks the following things. We could also have a mode that makes some of these changes in place (with confirmation from user) to automate it.
Rules
Major breaking changes:
-
ConnTypeIsNotNullableRule
- Not-nullable conn_type column in connection table (done) -
UniqueConnIdRule
- Unique conn_id in connection table https://github.com/apache/airflow/pull/11222 -
CutomOperatorUsesMetaclassRule
- BaseOperator uses metaclass https://github.com/apache/airflow/issues/11038 -
UsingSQLFromBaseHookRule
- Remove SQL support in base_hook https://github.com/apache/airflow/issues/11039 -
ChainBetwenDAGAndOperatorNotAllowedRule
- Assigning task to a DAG using bitwise shift (bit-shift) operators are no longer supported -
AirflowMacroPluginRemovedRule
- Removal of airflow.AirflowMacroPlugin class -
NoAdditionalArgsInOperatorsRule
- Additional arguments passed to BaseOperator cause an exception https://github.com/apache/airflow/issues/11042 -
MesosExecutorRemovedRule
- Removal of Mesos Executor
Config related changes:
-
HostnameCallableRule
- Unifyhostname_callable
option incore
section https://github.com/apache/airflow/issues/11044 -
StatNameHandlerNotSupportedRule
- Drop plugin support for stat_name_handler -
LoggingConfigurationRule
- Logging configuration has been moved to new section -
NoGCPServiceAccountKeyInConfigRule
- Remove gcp_service_account_keys option in airflow.cfg file -
FernetEnabledRule
- Fernet is enabled by default -
KubernetesWorkerAnnotationsRule
- Changes to propagating Kubernetes worker annotations -
LegacyUIDeprecatedRule
- Deprecate legacy UI in favor of FAB RBAC UI -
TaskHandlersMovedRule
- GCSTaskHandler has been moved, WasbTaskHandler has been moved, StackdriverTaskHandler has been moved , S3TaskHandler has been moved, ElasticsearchTaskHandler has been moved, CloudwatchTaskHandler has been moved -
SendGridMovedRule
- SendGrid emailer has been moved -
CustomExecutorsRequireFullPathRule
- Custom executors is loaded using full import path
Import changes:
-
ImportChangesRule
- uses a mapold_operator_name -> list of possible problems
so we can create a single DagBag and scan all used operators and raise information about changes. It should also suggest what providers packages users should use.
How to guide
To implement a new rule we had to create a class that inherits from airflow.upgrade.rules.base_rule.BaseRule
. It will be auto-registered and used by airflow upgrade-check
command. The custom rule class has to have title
, description
properties and should implement check
method which returns a list of error messages in case of incompatibility.
Remeber to open the PR against v1-10-test
branch.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Upgrading from 1.10 to 2 - Apache Airflow
To minimize friction for users upgrading from Airflow 1.10 to Airflow 2.0 and beyond ... Airflow 1.10.15, you can create a user with...
Read more >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...
Read more >Upgrade environments | Cloud Composer
This page describes how to upgrade your environment to a new Cloud Composer or Airflow version. About upgrade operations. When you change the...
Read more >Upgrading to Apache Airflow 2 - YouTube
Presented by Kaxil Naik at Airflow Summit 2021. Airflow 2.0 was a big milestone for the Airflow community. However, companies and enterprises ...
Read more >Apache Airflow versions on Amazon Managed Workflows for ...
Upgrading from Apache Airflow v1 to Apache Airflow v2 · Example Apache Airflow v1. # brew install jq aws mwaa create-cli-token --name YOUR_ENVIRONMENT_NAME...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds great to start with. I am sure we will have more rules added by the users, but those seem like great to create issues for. And yeah. One rule to rule them all (“naming changes”) sound great. But I’d name it “ImportChangesRule”. We renamed Hooks, and Secret Backends and Sensors - not only operators 😃.
Elder Jarek.
Yup I am happy with the suggested list