Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airflow 2 support #47

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

KostyaEsmukov
Copy link
Member

This PR adds support for airflow 2, and:

  • Drops support for airflow 1 (to avoid complicating the tests, because airflow.operators.dummy is not importable in v1, and airflow.operators.dummy_operator is not importable in v2),
  • Drops support for python 2.7 (airflow 2 doesn't support it),
  • Drops .travis.yml (I guess it doesn't work anymore).

I have tested this in a "hello world"-like environment and it seems to work fine.

@kxepal feel free to make any alterations on top if you want to.

  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))
>       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)
E       yaml.representer.RepresenterError: ('cannot represent an object', <class 'airflow.operators.dummy.DummyOperator'>)
@KostyaEsmukov KostyaEsmukov requested a review from kxepal September 5, 2021 20:00
@KostyaEsmukov
Copy link
Member Author

I've been running this for a week on 2.1.3 -- haven't found any issues so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant