Skip to content

Fix CLI asset materialization to use correct dag run type#63815

Merged
amoghrajesh merged 1 commit into
apache:mainfrom
astronomer:asset-materialization-cli
Mar 17, 2026
Merged

Fix CLI asset materialization to use correct dag run type#63815
amoghrajesh merged 1 commit into
apache:mainfrom
astronomer:asset-materialization-cli

Conversation

@amoghrajesh

@amoghrajesh amoghrajesh commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Was generative AI tooling used to co-author this PR?
  • No

closes: #63809

When materializing an asset via CLI command: airflow assets materialize, the created DAG run had run_type=MANUAL which is a bug. UI did it properly and had it as ASSET_MATERIALIZATION, so rectifying this behaviour in CLI to match UI.

I updated trigger_dag() helper to accept an optional run_type parameter (defaulting to MANUAL for backward compatibility), allowing call sites to specify the correct run type or not for default.

Run id is also updated for consistency.

Working here:
image

First one is after the fix, Second one before the fix (both CLI), and third one is from UI


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

@amoghrajesh amoghrajesh merged commit ca401d0 into apache:main Mar 17, 2026
134 checks passed
@amoghrajesh amoghrajesh deleted the asset-materialization-cli branch March 17, 2026 14:44
fat-catTW pushed a commit to fat-catTW/airflow that referenced this pull request Mar 22, 2026
techcodie pushed a commit to techcodie/airflow that referenced this pull request Mar 23, 2026
abhijeets25012-tech pushed a commit to abhijeets25012-tech/airflow that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dagrun type should be uniform while materialising an asset via UI and CLI

3 participants