Hi Jarek,

Thanks for the +1. I agree that moving Dag imports and callbacks to remote
workers would improve isolation. It would also let operators keep a
bundle’s Dag dependencies on the workers that parse it. The processor would
still need the bundle and importer code for discovery, and parsing workers
currently need airflow-core for serialization. Moving the imports gives us
a step toward separating those dependencies.

I’d keep the processor on the Execution API. The AIP keeps the local pool
as the default, and LocalExecutor still runs imports on the processor host
as the same OS user. Even in a remote-only deployment, the API lets us
scope each processor to its bundles and keep database credentials off that
host. We’ve merged the opt-in API mode, and the plan for 3.5 is to make it
the only mode:
https://lists.apache.org/thread.html/y58k4ck2c5tn3rtwc2nlc5fcw24wss58

On delays, the case that concerns me too is a newly uploaded Dag waiting
behind a long task backlog. Your first option works with the proposal: a
team could route its bundles to a parsing queue and assign workers
exclusively to it. That would give parsing capacity even when all the task
workers are busy.

Your second option matters for teams that want to share workers. The
scheduler and Dag processor submit through separate executor instances, so
neither can decide which workload gets the next shared slot. The proposed
parallelism limit only caps outstanding parse batches, but it can’t give a
waiting parse priority over tasks.

The AIP covers your first option: each team could route parsing to a queue
with dedicated workers. On shared workers, the proposed limit caps how many
parse batches are outstanding. A per-team setting to prefer parsing or task
execution would need executor support beyond current proposal.

Ephraim

On Fri, 4 Dec 2026 at 14:42, Ephraim Anierobi <[email protected]>
wrote:

> Hi Dheeraj,
>
> Thanks for the +1.
>
> On worker choice: each bundle can set its own parsing executor and queue,
> so parsing can go to dedicated workers. Edge is outside this first rollout.
>
> On concurrency: on Celery, a parse batch runs as one workload and takes
> one worker slot under [celery] worker_concurrency, like a task. The
> proposed [dag_processor] parallelism caps outstanding batches.
>
> On pools: parse batches wouldn't use them, since the scheduler assigns
> pool slots to task instances and parsing doesn't go through it.
>
> Ephraim
>
> On Fri, 4 Dec 2026 at 12:47, Jarek Potiuk <[email protected]> wrote:
>
>> Generally +1 mostly because it has a chance of finally closing the gap in
>> the "security boundaries" in Dag Processor, as user code will no longer
>> run
>> there. Consequently, we could even get by with leaving direct access to
>> the
>> DB in Dag Processor - which we tried to address by adding the API to
>> apiserver—and this might be an alternative way of fixing the gap - the API
>> is already implemented in main, but we could drop it then and have Dag
>> Processor use the DB. access directly. It would also help with the
>> "dependency" separation and decouple the task-sdk from airflow-core, as
>> the
>> task-sdk will only be needed in workers. When all callbacks and dag
>> parsing
>> is executed via executors, all the user code will execute outside of the
>> Dag Processor.
>>
>> However, timing must be handled very carefully— and you already mentioned
>> queuing in the AIP. This introducesdelays between changing Dags and
>> getting
>> them parsed. Especially in a busy system where workloads share task
>> execution and dag parsing, significant delays in dag parsing might occur
>> due to contention, the number of available workers, etc. This separation
>> might introduce an entirely new problem surface. I think we will need some
>> kind of "fast-path" for the dag parsing requests. And I think it could be
>> handled by two possible options:
>>
>> * have a dedicated queue/worker set for dag parsing, for those who want
>> true isolation between execution or parsing (per team).
>> * prioritty setting (per-team) (prefer parsing / prefer execution)  -
>> different teams can have different expectations here
>>
>>
>> J
>>
>> On Thu, Dec 3, 2026 at 11:26 PM Dheeraj Turaga <[email protected]>
>> wrote:
>>
>> > +1 on the idea
>> >
>> > Distributing the workload onto the workers should ease CPU usage on the
>> > main host if using
>> > a VM based deployment. On the celery/edge side, I think we should be
>> > mindful of the worker
>> > capacity and allow full control on which worker(s) could the dag parsing
>> > would be offloaded to.
>> > We should also count each parsing process towards a pool slot and
>> > concurrency.
>> >
>> > Thanks,
>> > Dheeraj
>> >
>> > On Thu, Dec 3, 2026 at 11:10 AM Ephraim Anierobi via dev <
>> > [email protected]> wrote:
>> >
>> > > Hi all,
>> > >
>> > > I’d like to open discussion on AIP-130, Run Dag parsing through
>> > executors:
>> > > https://cwiki.apache.org/confluence/x/wQiWGw
>> > >
>> > > Today, a Dag processor imports a bundle’s files on its own host.
>> Running
>> > a
>> > > processor per bundle lets deployment managers give each bundle its own
>> > > dependencies and resources. For a single large bundle, though, adding
>> > > parsing processes puts more load on the same host, and a second
>> processor
>> > > pointed at that bundle repeats the same imports instead of sharing
>> them.
>> > > Neither lets the bundle use spare capacity on other workers.
>> > >
>> > > The AIP proposes an optional executor backend for parsing. The Dag
>> > > processor would still discover files and decide which are due, then
>> send
>> > > them to an executor in batches. A deployment could spread one bundle’s
>> > > imports across Celery workers or Kubernetes pods, using existing task
>> > > workers or workers dedicated to parsing. The local parsing pool would
>> > > remain the default.
>> > >
>> > > The LocalExecutor prototype <
>> > https://github.com/apache/airflow/pull/73750>
>> > > runs the parser and returns results through a temporary directory on
>> the
>> > > processor host. To support remote workers, the AIP proposes publishing
>> > each
>> > > file’s result through the Execution API as it finishes. If a worker
>> dies
>> > > partway through a batch, the processor would retry only the unfinished
>> > > files and keep the ones already published.
>> > >
>> > > I’d welcome feedback here or on the AIP. One question for Celery
>> users in
>> > > particular: if parsing and tasks shared workers, neither would get
>> > priority
>> > > over the other. Would your queue setup and the proposed cap on
>> > outstanding
>> > > parse batches ([dag_processor] parallelism) give you enough control
>> over
>> > > how long tasks wait?
>> > >
>> > > Thanks & Regards,
>> > >
>> > > Ephraim
>> > >
>> >
>>
>

Reply via email to