tirkarthi commented on issue #46765:
URL: https://github.com/apache/airflow/issues/46765#issuecomment-2660719755

   I can reproduce this with below dag where event driven scheduler creates a 
dagrun on creating file `/tmp/a` . It seems like another place to handle 
`logical_date` which is nullable.
   
   ```
   pydantic_core._pydantic_core.ValidationError: 3 validation errors for 
AssetEventCollectionResponse
   asset_events.0.created_dagruns.0.logical_date
     Input should be a valid datetime [type=datetime_type, input_value=None, 
input_type=NoneType]
       For further information visit 
https://errors.pydantic.dev/2.10/v/datetime_type
   asset_events.0.created_dagruns.0.data_interval_start
     Input should be a valid datetime [type=datetime_type, input_value=None, 
input_type=NoneType]
       For further information visit 
https://errors.pydantic.dev/2.10/v/datetime_type
   asset_events.0.created_dagruns.0.data_interval_end
     Input should be a valid datetime [type=datetime_type, input_value=None, 
input_type=NoneType]
       For further information visit 
https://errors.pydantic.dev/2.10/v/datetime_type
   ```
   
   ```python
   from __future__ import annotations
   
   from datetime import datetime
   
   from airflow import DAG
   from airflow.providers.standard.operators.empty import EmptyOperator
   from airflow.providers.standard.triggers.file import FileDeleteTrigger
   from airflow.sdk.definitions.asset import Asset, AssetWatcher
   
   
   trigger = FileDeleteTrigger(filepath="/tmp/a")
   asset = Asset(
       "test_asset_1", watchers=[AssetWatcher(name="file_watcher", 
trigger=trigger)]
   )
   
   
   with DAG(
       dag_id="file_trigger_timeout",
       start_date=datetime(2021, 1, 1),
       catchup=False,
       schedule=[asset],
   ) as dag:
       t1 = EmptyOperator(task_id="t1")
   
       t1
   ```
   
   cc: @uranusjr @vincbeck 


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