Issue 1:
This issue is part of #8765

Rule

Create TaskHandlersMovedRule which corresponds to

GCSTaskHandler has been moved, WasbTaskHandler has been moved, StackdriverTaskHandler has been moved , S3TaskHandler has been moved, ElasticsearchTaskHandler has been moved, CloudwatchTaskHandler has been moved

entry in UPDATING.md. This rule should allow users to check if their current configuration needs any adjusting

before migration to Airflow 2.0.

How to guide

To implement a new rule, 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:

airflow/airflow/upgrade/rules/conn_type_is_not_nullable.py

Lines 25 to 42
in
ea36166

class ConnTypeIsNotNullableRule(BaseRule):

title = "Connection.conn_type is not nullable"

description = """\

The `conn_type` column in the `connection` table must contain content. Previously, this rule was \

enforced by application logic, but was not enforced by the database schema.

If you made any modifications to the table directly, make sure you don't have null in the conn_type column.\

"""

@provide_session

def check(self, session=None):

invalid_connections = session.query(Connection).filter(Connection.conn_type.is_(None))

return (

'Connection<id={}", conn_id={}> have empty conn_type field.'.format(conn.id, conn.conn_id)

for conn in invalid_connections

)

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

Issue 2:
Apache Airflow Provider(s)

celery

Versions of Apache Airflow Providers

apache-airflow==2.1.3

apache-airflow-providers-celery==2.1.0

celery==5.1.2

flower==1.0.0

Apache Airflow version

2.1.3 (latest released)

Operating System

Ubuntu 20.04.1 LTS (Focal Fossa)

Deployment

Virtualenv installation

Deployment details

executor = CeleryExecutor

What happened

When issuing apache celery worker or apache celery flower I receive the following error:

Traceback (most recent call last):

File "/home/airflow/sandbox/bin/airflow", line 8, in

sys.exit(main())

File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/main.py", line 40, in main

args.func(args)

File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 47, in command

func = import_string(import_path)

File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/utils/module_loading.py", line 32, in import_string

module = import_module(module_path)

File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 1014, in _gcd_import

File "", line 991, in _find_and_load

File "", line 975, in _find_and_load_unlocked

File "", line 671, in _load_unlocked

File "", line 848, in exec_module

File "", line 219, in _call_with_frames_removed

File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/cli/commands/celery_command.py", line 29, in

from flower.command import FlowerCommand

ImportError: cannot import name 'FlowerCommand' from 'flower.command' (/home/airflow/sandbox/lib/python3.8/site-packages/flower/command.py)

What you expected to happen

I would expect the Flower UI to be loaded or a celery worker to be started.

How to reproduce

Configure apache-airflow with the CeleryExecutor

Issue the following commands: apache celery worker or apache celery flower

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct