uranusjr commented on code in PR #57360:
URL: https://github.com/apache/airflow/pull/57360#discussion_r2496964881
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -358,6 +361,11 @@ def __init__(
self.triggering_user_name = triggering_user_name
self.scheduled_by_job_id = None
self.context_carrier = {}
+ if not isinstance(partition_key, str | None):
+ raise ValueError(
+ f"Expected partition_key to be a `str` or `None` but got
`{partition_key.__class__.__name__}`"
+ )
Review Comment:
Probably don’t need this? We control all the code to create a DagRun, and
any incorrect type will cause an error when the model is saved to the database
anyway.
--
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]