mobuchowski opened a new pull request, #44537:
URL: https://github.com/apache/airflow/pull/44537

   It was failing because heartbeat was failing due to primary key duplication:
   
   ```
   WARNING  
airflow.jobs.local_task_job_runner.LocalTaskJobRunner:local_task_job_runner.py:215
 Heartbeat failed with Exception: (psycopg2.errors.UniqueViolation) duplicate 
key value violates unique constraint "job_pkey"
   DETAIL:  Key (id)=(1) already exists.
   
   [SQL: INSERT INTO job (id, dag_id, state, job_type, start_date, end_date, 
latest_heartbeat, executor_class, hostname, unixname) VALUES (%(id)s, 
%(dag_id)s, %(state)s, %(job_type)s, %(start_date)s, %(end_date)s, 
%(latest_heartbeat)s, %(executor_class)s, %(hostname)s, %(unixname)s)]
   [parameters: ({'id': '1', 'dag_id': 'test_openlineage_execution', 'state': 
None, 'job_type': 'LocalTaskJob', 'start_date': datetime.datetime(2024, 12, 1, 
15, 43, 57, 356380, tzinfo=Timezone('UTC')), 'end_date': None, 
'latest_heartbeat': datetime.datetime(2024, 12, 1, 15, 44, 2, 585608, 
tzinfo=Timezone('UTC')), 'executor_class': None, 'hostname': '3b984b754931', 
'unixname': 'root'}, {'id': '1', 'dag_id': 'test_openlineage_execution', 
'state': None, 'job_type': 'LocalTaskJob', 'start_date': 
datetime.datetime(2024, 12, 1, 15, 43, 57, 356380, tzinfo=Timezone('UTC')), 
'end_date': None, 'latest_heartbeat': datetime.datetime(2024, 12, 1, 15, 44, 2, 
585608, tzinfo=Timezone('UTC')), 'executor_class': None, 'hostname': 
'3b984b754931', 'unixname': 'root'})]
   (Background on this error at: https://sqlalche.me/e/14/gkpj)
   ```
   
   Removing id when passing job fixes that issue. 


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