Skip to content

Clear one single mapped task instance #24699

Closed

Description

@uranusjr

Body

We can handle this programmatically, but currently there’s no user interface available for this. The “Clear” button in the task modal applies to all the mapped tasks no matter which map index is chosen (which also is a UX issue), while the clearTaskInstances API only takes a list of task IDs.

Currently DAG.clear() supports passing in a 2-tuple instead of string to clear one single mapped task (e.g. task_ids=[("my_task", 1)]). But I’m not sure how to expose this in the REST API—something like {"task_ids": [["my_task", 1], "another_task"]} is difficult to spec in Open API.

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Activity

  1. added
    kind:feature
    area:API
    area:UI
    on Jun 28, 2022
  2. bbovenzi commented on Jun 28, 2022

    @bbovenzi
    Contributor

    I think that was the source of some confusion over at #23516

  3. pierrejeambrun commented on Nov 17, 2022

    @pierrejeambrun
    Member

    Hello @bbovenzi and @uranusjr,

    I feel like this is addressed as of today, both via the grid view and task modal actions.

    Closing for now, feel free to reopen if needed

  4. manugarri commented on May 3, 2024

    @manugarri
    Contributor

    @pierrejeambrun maybe im not understanding your answer. On my current dag, we map (with expand) 5 tasks to run in parallel, and for what I see there is no place where we can clear the task.
    image

    You can see there are no tasks to select.
    image

  5. bbovenzi commented on May 6, 2024

    @bbovenzi
    Contributor

    This isn't the normal behavior so you'll need to help us debug.

    Do you see any errors in your browser's network tab or is the response just an empty array?
    Can you clear any non mapped tasks in this dag normally?
    Once the dag finished running is everything performing as expected?

  6. jayceslesar commented on Dec 20, 2024

    @jayceslesar
    Contributor

    @manugarri I noticed that the map index data is empty when there are certain special characters in the run id of the DAG -- for instance with forward slashes in the run id, nothing appears in the mapped task instances, but if I replace all forward slashes with underscores for example, this data shows up in the UI fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:APIarea:UIarea:dynamic-task-mappingkind:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions