Skip to content

[AIP-94] airflowctl command migration #68402

@bugraoz93

Description

@bugraoz93

Body

Goal: move every remote airflow CLI command (anything backed by a public REST API endpoint)
into airflowctl. Admin commands have no API and are local-only. They run components (scheduler,
api-server, triggerer, dag-processor, kerberos, standalone), manage the DB, or reach internals
directly (DAG parsing/rendering, local provider manager). Those remain in the airflow CLI and are
out of scope here.

Why:
AIP-81: Enhanced Security in CLI via Integration of API
and its sub-proposal
AIP-94: Decouple Remote Commands from the airflow CLI.

How to do it: follow PR #68175 (the reference
example). For each command, add an *Operations class/method in
airflow-ctl/src/airflowctl/api/operations.py backed by the existing API endpoint (the CLI command is
auto-generated from it), add help text in help_texts.yaml, and add tests under airflow-ctl-tests/.
Anything that needs more than a single endpoint or some transformation belongs in
airflow-ctl/src/airflowctl/ctl/commands instead.

Note: Always create PRs with relates: #issue_number as the issue should be manually closed at the end.

CLI Implementation Guide

Deprecation (applies to every migrated command): once a command is available in airflowctl, add
a deprecation warning to its matching airflow CLI command pointing at the new airflowctl one (as
#68175 did). This is part of the same work item. There is no separate deprecation task.

Tracking: each command below is a GitHub issue, following the #66173 to #66176 approach. For a
group with no *Operations yet, first a foundation issue adds the operations, then one issue per
command that depends on that foundation issue. Only tasks currently lacks operations. Every other
group already has its *Operations, so its commands are independent issues.

[x] = migrated (in airflowctl and the airflow side deprecated).

Admin (no API, local-only, not migrated, stay in the airflow CLI):

  • dags: show, show-dependencies, test, reserialize (parse/render DAGs directly)
  • tasks: test, render (execute/render DAG files directly)
  • providers: links, widgets, hooks, triggers, behaviours, logging, secrets,
    executors, queues, notifications, configs, lazy-loaded, auth-managers (read the local
    provider manager)

dags

tasks

assets

pools

variables

  • variables list
  • variables get
  • variables set
  • variables delete
  • variables import

connections

  • connections list
  • connections add
  • connections delete
  • connections import
  • connections test
  • connections create-default-connections

backfill

  • backfill create

jobs

  • jobs check

config

  • config get-value
  • config list

providers

  • providers list
  • providers get

Committer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions