You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Lee-W (via GitHub)" <gi...@apache.org> on 2026/06/04 06:49:35 UTC

Re: [PR] Make partition_key provenance-only and inherit it onto asset events [airflow]

Lee-W commented on code in PR #67718:
URL: https://github.com/apache/airflow/pull/67718#discussion_r3354055075


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py:
##########
@@ -161,6 +161,14 @@ def check_data_intervals(self):
         return self
 
     def validate_context(self, dag: SerializedDAG) -> dict:
+        if (
+            self.partition_key is not None
+            and not dag.timetable.partitioned
+            and not dag.timetable.partitioned_at_runtime
+        ):
+            raise ValueError(

Review Comment:
   Now extracted it into `SerializedDAG.validate_partition_key` and pointed both `validate_context` and `create_dagrun` at it.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org