airflow-declarative icon indicating copy to clipboard operation
airflow-declarative copied to clipboard

Airflow2

Open jean-helsinki opened this issue 1 year ago • 0 comments

Airflow 2.x support:

  • airflow.operators.dummy_operator -> airflow.operators.dummy

  • airflow.operators.bash_operator -> airflow.operators.bash

  • airflow.sensors.http_sensor -> airflow.providers.http.sensors.http

  • tests: fix yaml.load warning

    airflow-declarative/tests/test_good_dags.py:49: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      schema1 = airflow_declarative.schema.ensure_schema(yaml.load(content))
    
  • Test against airflow 2.1

  • compat: update for airflow 2

  • tests: fix datetimes for airflow 2

      assert yml_dag.start_date == datetime.datetime(2017, 7, 27, 0, 0, 0)
    

    E AssertionError: assert DateTime(2017...mezone('UTC')) == datetime.datet..., 7, 27, 0, 0) E -DateTime(2017, 7, 27, 0, 0, 0, tzinfo=Timezone('UTC')) E +datetime.datetime(2017, 7, 27, 0, 0)

  • Fix broken Operator serialization in airflow 2

    E yaml.representer.RepresenterError: ('cannot represent an object', <class 'airflow.operators.dummy.DummyOperator'>)

  • tests coverage: ignore uncovered branches

  • Drop airflow 1 support (there is no airflow.operators.dummy module in it)

  • Fix deprecation warning about apply_defaults

  • Drop compat (py2.7 + airflow 1)

  • Drop python 2.7 + airflow 1 support

  • Add 2.3.1 patch

  • Remove no longer working .travis.yml

  • Adopt code for py39, drop py2 references, use poetry for package managment, fix linter hints

  • Update trafaret lib, rewrite tox.ini

jean-helsinki avatar Sep 18 '23 11:09 jean-helsinki