Skip to content

[AIP-94] Route airflow assets list/details through the API server#68531

Draft
justinpakzad wants to merge 1 commit into
apache:mainfrom
justinpakzad:airflow-cli-list-assets-migration
Draft

[AIP-94] Route airflow assets list/details through the API server#68531
justinpakzad wants to merge 1 commit into
apache:mainfrom
justinpakzad:airflow-cli-list-assets-migration

Conversation

@justinpakzad

@justinpakzad justinpakzad commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

This PR migrates the cli assets list and assets details commands to go through the API server (via airflow-ctl client). This is part of the wave of command migrations in the issue linked below. Couple of notes on each command:

For assets list the original helper functions _list_asset_aliases and _list_assets were removed and the detail_mapper function was simplified since the ctl client returns Pydantic models, meaning the mapper function can just call model_dump directly on the objects. Now, depending on the args this command would either map to airflowctl assets list or airflowctl assets list-by-alias. I specified both of the commands in the deprecation warning.

For assets details, if a user provides an asset name or uri, we use the list method and then filter (similar to asset_materialize), if they provide an alias name we call get-by-alias directly. Similar to the list command, both airflowctl assets get / airflowctl assets get-by-alias commands were added to the deprecation warning.

Tests were modified to use a mock api_client and handle any new cases, following a similar pattern to the reference PR posted in the issue.

I do have a PR open right now which proposes a name change to the airflowctl list-by-alias command, if that gets merged then I will update it with the new command name.

related: #68402

Was generative AI tooling used to co-author this PR?
  • Yes (Claude Opus 4.6)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@justinpakzad justinpakzad changed the title [AIP-94] Route airflow assets list through the airflow-ctl client [AIP-94] Route airflow assets list through the API server Jun 14, 2026
@justinpakzad justinpakzad force-pushed the airflow-cli-list-assets-migration branch from bdd3937 to e7920cb Compare June 14, 2026 20:08
@justinpakzad justinpakzad changed the title [AIP-94] Route airflow assets list through the API server [AIP-94] Route airflow assets list/details through the API server Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant