Fix airflow tasks run --local when dags_folder differs from that of processor
Currently, if your dags_folder differs from that used by the dag processor, then task_run --local will fail to find the dag, because it uses the fileloc value stored in the serialized dag.
To resolve this issue, I add the dags_folder as configured in the dag processor (or whatever process does the serializing) and this allows us to correctly determine the relative path even when the current dags folder is different.
~depends on https://github.com/apache/airflow/pull/26536 getting merged first~
Needs reabase :). But looks good. @mhenc?
OK so... i made it so this is just a private attr on ser dag object...
So really this just fixes the existing feature without adding any new backcompat promises.
And it is called dags folder not processor subdir, but, as has been established, the two are not the same thing, and the present attr is always going to tell the truth... so... @potiuk @mhenc does it get your blessing?
Yes, looks good for me. Thank you!
Makes sense - one static check to fix but good to go :)