Skip to content

Fix asset materialization dropping partition date on partitioned Dag runs#69314

Merged
Lee-W merged 1 commit into
apache:mainfrom
astronomer:fix-materialize-partition-date
Jul 3, 2026
Merged

Fix asset materialization dropping partition date on partitioned Dag runs#69314
Lee-W merged 1 commit into
apache:mainfrom
astronomer:fix-materialize-partition-date

Conversation

@Lee-W

@Lee-W Lee-W commented Jul 3, 2026

Copy link
Copy Markdown
Member

Why

  • The materialize_asset route resolved partition_date via validate_context but never passed it to create_dagrun, unlike the sibling /dags/{dag_id}/dagRuns trigger route.
  • As a result, materialized runs of partitioned Dags were left with partition_date NULL.
  • That broke two downstream behaviours: backfill dedup created duplicate runs, and partition-date-window clears skipped these runs.

What

  • Pass partition_date=params["partition_date"] into create_dagrun in materialize_asset, matching the trigger route.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude] following the guidelines


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

…runs

The materialize_asset route resolved partition_date via validate_context but
never passed it to create_dagrun, unlike the sibling trigger route. This left
partition_date NULL on materialized runs of partitioned Dags, causing backfill
dedup to create duplicate runs and partition-date-window clears to skip them.
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Jul 3, 2026
@Lee-W Lee-W changed the title Fix asset materialization dropping partition date on partitioned Dag … Fix asset materialization dropping partition date on partitioned Dag runs Jul 3, 2026
@Lee-W Lee-W marked this pull request as ready for review July 3, 2026 09:10
@Lee-W Lee-W added this to the Airflow 3.3.1 milestone Jul 3, 2026
@Lee-W Lee-W self-assigned this Jul 3, 2026

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@henry3260 henry3260 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@Lee-W Lee-W merged commit a1f81ef into apache:main Jul 3, 2026
130 of 135 checks passed
@Lee-W Lee-W deleted the fix-materialize-partition-date branch July 3, 2026 14:45
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants