juditnovak commented on issue #59074:
URL: https://github.com/apache/airflow/issues/59074#issuecomment-3636466592
I'm personally in favor of starting it by myself.
1. While it may be a small additional overhead, it also leaves more
flexibility on the developer's side
- custom config, etc.
2. Reduces extra complexity on `dag.test()`
- potential future bugs, etc.
3. Reduces further divergence on the `dag.test()` logic depending when an
executor is used or not
4. Currently `dag.test()` maps very well to the main scheduler execution
loop
(`airflow.jobs.scheduler_job_runner.SchedulerJobRunner._run_scheduler_loop()`).
This has multiple advantages, and I personally believe that it's very good
to keep it as an objective:
- ensures that the testing workflow is "as similar" to the real
execution, as possible
- reducing/avoiding false positives, inconsistency, etc.
- makes it easy to debug (real execution vs. test pipelines)
I'm efficiently using the current arrangement for automated tests. I find
the Airflow System Tests to be a great tool, handy and powerful. Airflow is
highly modular and extendible, and the test framework supports that really
well,
allowing for "real life" executions targeting multiple extendible core
Airflow concepts.
1. Testing a **custom executor** (in my case: executing Airflow workloads
over Hasicorp's Nomad workload manager):
- Corresponnding [pipeline
script](https://github.com/juditnovak/airflow-provider-nomad/blob/0_0_5/.github/workflows/test.yaml#L186-L197)
- where the `tox` call corresponds to this `pytest`
[call](https://github.com/juditnovak/airflow-provider-nomad/blob/0_0_5/tox.ini#L106),
using the Airflow System Tests plugin
The tests above involve both Airflow standard operators/decorators, and
custom ones.
2. Testing **custom operator/decorators** (in my case, Airflow tasks on
Hasicorp's Nomad workload manager) against `LocalExecutor`.
([pipeline](https://github.com/juditnovak/airflow-provider-nomad/blob/0_0_5/.github/workflows/test.yaml#L260-L172),
[tox
reference](https://github.com/juditnovak/airflow-provider-nomad/blob/0_0_5/tox.ini#L131))
NOTE: Bug detected on this pipeline, fix is on the way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]