github-actions[bot] opened a new pull request, #74968:
URL: https://github.com/apache/airflow/pull/74968

   * Fix clearing with upstream and downstream selecting unrelated tasks
   
   Clearing a task in a specific Dag run with both upstream and downstream
   enabled resolved the downstream relatives from the selected tasks plus
   their upstream tasks, so every other descendant of those upstream tasks
   was selected too. In a Dag whose branches share a root task this
   cleared the whole run, and selecting one map index of a mapped task
   cleared all of its map indexes.
   
   Each direction has to be resolved from the requested tasks alone, as
   clearing without a specific Dag run already does.
   
   * Pass the requested tasks to the relative lookup explicitly
   
   Both directions must be resolved from the same requested tasks.
   Passing the sets in makes that visible where the lookups are made,
   instead of relying on a helper that reads sets which are updated
   after it returns.
   
   * Fix clearing in Dags with a loop selecting unrelated tasks
   
   Any Dag that contains a loop is cleared through the loop-aware
   selection, which still resolved downstream relatives from the selected
   tasks plus their upstream tasks. Clearing with both upstream and
   downstream therefore still selected unrelated tasks in those Dags.
   
   For a task inside a loop it also reached the gate of every iteration,
   so the clear replaced the selected iteration and re-ran the loop from
   its first iteration, and marking the task with both options changed
   every iteration.
   
   * Give the upstream and downstream mapped loop clear its own test
   
   The test name says clearing from the predecessor selects every mapped
   occurrence in the loop. That still holds downstream only, but with
   upstream and downstream the other map index is now deliberately left
   out, so that case no longer fits the name.
   (cherry picked from commit 43129ecb63355c8244df1ac67b392bc8a775f2fa)
   
   Co-authored-by: Kevin Yang <[email protected]>


-- 
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]

Reply via email to