question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create an `airflow upgrade-check` command in 1.10 to ease upgrade path to 2.0.

See original GitHub issue

To 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:

Config related changes:

  • HostnameCallableRule - Unify hostname_callable option in core 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 map old_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.

For example: https://github.com/apache/airflow/blob/ea36166961ca35fc51ddc262ec245590c3e236fb/airflow/upgrade/rules/conn_type_is_not_nullable.py#L25-L42

Remeber to open the PR against v1-10-test branch.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

4reactions
potiukcommented, Sep 14, 2020

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.

1reaction
kaxilcommented, Sep 19, 2020

Yup I am happy with the suggested list

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found