bugraoz93 opened a new issue, #68402:
URL: https://github.com/apache/airflow/issues/68402

   ### 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](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-81+Enhanced+Security+in+CLI+via+Integration+of+API)
   and its sub-proposal
   [AIP-94: Decouple Remote Commands from the airflow 
CLI](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=382175838).
   
   **How to do it:** follow [PR 
#68175](https://github.com/apache/airflow/pull/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.
   
   [CLI Implementation 
Guide](https://github.com/apache/airflow/blob/main/contributing-docs/27_cli_implementation_guide.rst)
   
   **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
   
   - [x] `dags trigger` (#68175)
   - [x] `dags delete` (#68175)
   - [ ] `dags list`
   - [ ] `dags details`
   - [ ] `dags state`
   - [ ] `dags list-runs`
   - [ ] `dags list-jobs`
   - [ ] `dags list-import-errors`
   - [ ] `dags report`
   - [ ] `dags clear`
   - [ ] `dags pause`
   - [ ] `dags unpause`
   - [ ] `dags next-execution`
   
   ## tasks
   
   - [ ] operations for `tasks` (#66173)
   - [ ] `tasks state` (depends on #66173)
   - [ ] `tasks states-for-dag-run` (depends on #66173)
   - [ ] `tasks clear` (depends on #66173)
   - [ ] `tasks list` (depends on #66173)
   - [ ] `tasks failed-deps` (depends on #66173)
   
   ## assets
   
   - [x] `assets materialize` (#68175)
   - [ ] `assets list`
   - [ ] `assets details`
   
   ## pools
   
   - [x] `pools`: list / get / set / delete / import / export (#68175)
   
   ## 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
   
   - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow 
project.


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