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

   The `command` column in the `edge_job` table is hitting the character limit 
of `1000` during retires of decent sized BashOperator commands. This is causing 
the EdgeExecutor to crash and exit leaving the scheduler in a bad state. This 
PR bumps up the char limit to `2048`
   
   Here's the snippet of the error from the scheduler logs
   
   ```
   [SQL: INSERT INTO edge_job (dag_id, task_id, run_id, map_index, try_number, 
state, queue, concurrency_slots, command, queued_dttm, edge_worker, 
last_update) VALUES (%(dag_id)s, %(task_id)s, %(run_id)s, %(map_index)s, 
%(try_number)s, %(state)s, %(queue)s, %(concurrency_slots)s, %(command)s, 
%(queued_dttm)s, %(edge_worker)s, %(last_update)s)]
   
   (Background on this error at: https://sqlalche.me/e/14/9h9h)
   [2025-06-14T02:26:26.528+0000] {edge_executor.py:343} INFO - Shutting down 
EdgeExecutor
   [2025-06-14T02:26:26.528+0000] {scheduler_job_runner.py:1031} INFO - Exited 
execute loop
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 1890, in _execute_context
       self.dialect.do_executemany(
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py",
 line 982, in do_executemany
       context._psycopg2_fetched_rows = xtras.execute_values(
                                        ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/psycopg2/extras.py", line 
1299, in execute_values
       cur.execute(b''.join(parts))
   psycopg2.errors.StringDataRightTruncation: value too long for type character 
varying(1000)
   


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