Skip to content

[AIP-94] airflowctl tasks: add TasksOperations and TaskInstancesOperations to operations.py #66173

Description

@bugraoz93

Body

Add TasksOperations and TaskInstancesOperations classes to airflowctl/api/operations.py.
These return the API response directly with no transformation — CLI commands are auto-generated
by CommandFactory. Also unblocks Issue C (custom task commands), which reuses the same operations.

All REST API endpoints already exist.

Operations to add

On top of #61547, verify the existence, and please don't duplicate

Note

  • anything work with single endpoint under operation.py
  • anything needs multiple endpoint or transformation goesn ctl/commands
  • including unit and integration test under airflow-ctl-tests/

Committer

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

Activity

  1. added
    kind:meta
    on Apr 30, 2026
  2. added
    area:API
    kind:feature
    on Apr 30, 2026
  3. riyanmohmmeed-dev commented on Apr 30, 2026

    @riyanmohmmeed-dev
    Contributor

    Hi @bugraoz93, I'd like to work on this. I see PR #63889 is a stale draft covering similar ground — I'll implement just the 5 operations listed here following the existing pattern in operations.py (like DagsOperations, PoolsOperations). Will submit a PR shortly.

  4. csrinivas2130 commented on May 2, 2026

    @csrinivas2130

    Hi @riyanmohmmeed-dev are you working on this? let me know I can take up incase you did n't complete.

  5. awadhesh14 commented on May 3, 2026

    @awadhesh14

    @bugraoz93
    Please review #66318

    One thing to note:

    Implemented TaskInstancesOperations.clear using:

    POST /api/v2/dags/{dag_id}/clearTaskInstances

    Validated that task instances are successfully cleared and re-executed by the scheduler.

    While testing via airflowctl, the command executes successfully but fails during output handling with:

    AttributeError: 'Namespace' object has no attribute 'output'

    This appears to be a CLI formatting issue after execution, not related to the API behavior itself.

  6. Ryota-Di commented on Aug 27, 2026

    @Ryota-Di

    Hi, I'd like to work on this issue. Is it still available?

  7. jasperjonkhans commented on Aug 29, 2026

    @jasperjonkhans
    Contributor

    Hi! I’d be interested in contributing to this issue.

  8. Zuhaibkhan100 commented on Oct 25, 2026

    @Zuhaibkhan100

    I'd be happy moving forward with this issue ! feel free to assign it to me !

  9. gitPratikSingh commented on Oct 31, 2026

    @gitPratikSingh
    Contributor

    Working on this — opened #76145 adding TasksOperations.get/list.

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:CLIarea:airflow-ctlgood first issuekind:featurekind:meta

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions