nathadfield commented on code in PR #67285:
URL: https://github.com/apache/airflow/pull/67285#discussion_r3379796259


##########
airflow-core/docs/migrations-ref.rst:
##########
@@ -39,7 +39,10 @@ Here's the list of all the Database Migrations that are 
executed via when you ru
 
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
 | Revision ID             | Revises ID       | Airflow Version   | Description 
                                                 |
 
+=========================+==================+===================+==============================================================+
-| ``9ff64e1c35d3`` (head) | ``dd5f3a8e2b91`` | ``3.3.0``         | Add indexes 
on dag_run.created_dag_version_id and            |
+| ``d2f4e1b3c5a7`` (head) | ``9ff64e1c35d3`` | ``3.3.0``         | Add 
partition_date to asset_event and                        |

Review Comment:
   Done. I've dropped the `AssetEvent.partition_date` column and re-derived the 
consumer's source date by threading the `partition_date` that 
`register_asset_change` already receives through `_queue_dagruns` and 
`_queue_partitioned_dags` into `_compute_target_partition_date`. The APDR is 
created synchronously in that same call, so there's no event column and no 
extra DagRun lookup, and the consumer DagRun stays self-contained once created.
   
   I also took the field off the execution-API asset-event path 
(`AssetEventResponse` and `DagRunAssetReference`) and reduced the Cadwyn 
`AddPartitionDateField` to the `DagRun` change only, since neither asset-event 
field fed the `{{ partition_date }}` template feature. The DagRun-side 
surfacing (`AssetPartitionDagRun.partition_date`, `DagRun.partition_date`, the 
template variable, OTel, and the core-API response) is unchanged, and the 
migration is narrowed to `asset_partition_dag_run` alone.
   
   Thanks for the steer, it's a cleaner result.
   



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