wolfier opened a new issue, #42456:
URL: https://github.com/apache/airflow/issues/42456

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   2.10.0
   
   ### What happened?
   
   An OTEL Collector exception caused the scheduler to terminate unexpectedly.
   
   ```
   [2024-09-13T14:12:12.681+0000] {scheduler_job_runner.py:1001} ERROR - 
Exception when executing SchedulerJob._run_scheduler_loop
   Traceback (most recent call last):
     File 
"/usr/local/lib/python3.10/site-packages/airflow/jobs/scheduler_job_runner.py", 
line 984, in _execute
       self._run_scheduler_loop()
     File 
"/usr/local/lib/python3.10/site-packages/airflow/jobs/scheduler_job_runner.py", 
line 1132, in _run_scheduler_loop
       num_finished_events += self._process_executor_events(
     File 
"/usr/local/lib/python3.10/site-packages/airflow/jobs/scheduler_job_runner.py", 
line 851, in _process_executor_events
       span.add_event(name="started", timestamp=datetime_to_nano(ti.start_date))
     File "/usr/local/lib/python3.10/site-packages/airflow/utils/dates.py", 
line 283, in datetime_to_nano
       return int(datetime.timestamp() * 1000000000)
   AttributeError: 'NoneType' object has no attribute 'timestamp'
   ```
   
   The exception was due to the processing of an executor event where the tied 
task instance start_date attribute did not have the expected type of datetime.
   
   ### What you think should happen instead?
   
   Instead of raising the exception and causing the schedule to terminate, the 
exception should be caught and an error log to be generated.
   
   ### How to reproduce
   
   Unknown.
   
   ### Operating System
   
   n/a
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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