You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a quick look into your examples - there are short so they could also make good example (since our PR is bloated with all changes required). You don't have any system tests - which in old design were usually pytest classes that were invoking example dags. In a new design it's somehow similar (in a sense that we have a file, that works both as a system test and example).
From my POV action points include:
Moving example dags under tests/system/providers/alibaba
Create tests/system/providers/README.md explaining how to run your examples (if there is need for preconfigured environment, created account etc).
If your DAG creates any object, that shall be deleted - add trigger rule ALL_DONE to operators doing the removal (that's to ensure it actually happens).
Append watcher at the end of DAG:
from tests.system.utils.watcher import watcher
# This test needs watcher in order to properly mark success/failure
# when "tearDown" task with trigger rule is part of the DAG
list(dag.tasks) >> watcher()
Append test method at the end of file:
from tests.system.utils import get_test_run # noqa: E402
# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
test_run = get_test_run(dag)
System tests should be runnable using following command (use Breeze to ensure you have all dependencies):
pytest --system alibaba tests/system
I don't know your package and what's it's doing so I don't know if there are extra steps required for preparing environment. It would be best to describe in a way that would allow other users easily run it and of course enable community to include your system tests in CI checks.
I took a quick look into your examples - there are short so they could also make good example (since our PR is bloated with all changes required). You don't have any system tests - which in old design were usually pytest classes that were invoking example dags. In a new design it's somehow similar (in a sense that we have a file, that works both as a system test and example). From my POV action points include:
Moving example dags under tests/system/providers/alibaba
Create tests/system/providers/README.md explaining how to run your examples (if there is need for preconfigured environment, created account etc).
If your DAG creates any object, that shall be deleted - add trigger rule ALL_DONE to operators doing the removal (that's to ensure it actually happens).
Append watcher at the end of DAG:
from tests.system.utils import get_test_run # noqa: E402
# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
test_run = get_test_run(dag)
Append test method at the end of file:
from tests.system.utils import get_test_run # noqa: E402
# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
test_run = get_test_run(dag)
System tests should be runnable using following command (use Breeze to ensure you have all dependencies):
pytest --system alibaba tests/system
I don't know your package and what's it's doing so I don't know if there are extra steps required for preparing environment. It would be best to describe in a way that would allow other users easily run it and of course enable community to include your system tests in CI checks.
Thanks for the detailed explanation! It's very coooool!
Activity
EricGao888 commentedon Mar 24, 2022
I took a quick at AIP-47. May I ask is there any example pr for provider example DAGs migration?
potiuk commentedon Mar 25, 2022
We are just about to merge #22311
bhirsz commentedon Mar 25, 2022
I took a quick look into your examples - there are short so they could also make good example (since our PR is bloated with all changes required). You don't have any system tests - which in old design were usually pytest classes that were invoking example dags. In a new design it's somehow similar (in a sense that we have a file, that works both as a system test and example).
From my POV action points include:
System tests should be runnable using following command (use Breeze to ensure you have all dependencies):
I don't know your package and what's it's doing so I don't know if there are extra steps required for preparing environment. It would be best to describe in a way that would allow other users easily run it and of course enable community to include your system tests in CI checks.
EricGao888 commentedon Mar 25, 2022
Thanks for the detailed explanation! It's very coooool!
Migrate Alibaba example DAGs to new design apache#22437
Migrate Alibaba example DAGs to new design #22437 (#24130)