potiuk commented on issue #33178:
URL: https://github.com/apache/airflow/issues/33178#issuecomment-1669152566

   Unfortunately no dice.
   
   
https://github.com/apache/airflow/actions/runs/5794267587/job/15703726213?pr=33190#step:6:9138
   
   ```
   _________________________ test_xcom_map_raise_to_skip 
__________________________
   
   self = <sqlalchemy.future.engine.Connection object at 0x7f123306cac0>
   dialect = <sqlalchemy.dialects.mysql.mysqldb.MySQLDialect_mysqldb object at 
0x7f128bc4d340>
   constructor = <bound method DefaultExecutionContext._init_compiled of <class 
'sqlalchemy.dialects.mysql.mysqldb.MySQLExecutionContext_mysqldb'>>
   statement = 'UPDATE task_instance SET pid=%s, updated_at=%s WHERE 
task_instance.dag_id = %s AND task_instance.task_id = %s AND 
task_instance.run_id = %s AND task_instance.map_index = %s'
   parameters = (90, datetime.datetime(2023, 8, 8, 8, 12, 24, 176037), 
'test_dag', 'push', 'test', -1)
   execution_options = immutabledict({'autocommit': True, 'compiled_cache': 
{(<sqlalchemy.dialects.mysql.mysqldb.MySQLDialect_mysqldb object 
...rigger_id'), False, False), 
<sqlalchemy.dialects.mysql.mysqldb.MySQLCompiler_mysqldb object at 
0x7f12542e6f70>, 548]}})
   args = (<sqlalchemy.dialects.mysql.mysqldb.MySQLCompiler_mysqldb object at 
0x7f128b002fd0>, [{'pid': 90, 'task_instance_dag_i..., type_=String(length=250, 
collation='utf8mb3_bin')), BindParameter('task_instance_map_index', None, 
type_=Integer())])
   kw = {'cache_hit': symbol('CACHE_HIT')}
   branched = <sqlalchemy.future.engine.Connection object at 0x7f123306cac0>
   yp = None
   conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x7f123306cc70>
   context = <sqlalchemy.dialects.mysql.mysqldb.MySQLExecutionContext_mysqldb 
object at 0x7f123306cfa0>
   cursor = <MySQLdb.cursors.Cursor object at 0x7f123306c2b0>, evt_handled = 
False
   
       def _execute_context(
           self,
           dialect,
           constructor,
           statement,
           parameters,
           execution_options,
           *args,
           **kw
       ):
           """Create an :class:`.ExecutionContext` and execute, returning
           a :class:`_engine.CursorResult`."""
       
           branched = self
           if self.__branch_from:
               # if this is a "branched" connection, do everything in terms
               # of the "root" connection, *except* for .close(), which is
               # the only feature that branching provides
               self = self.__branch_from
       
           if execution_options:
               yp = execution_options.get("yield_per", None)
               if yp:
                   execution_options = execution_options.union(
                       {"stream_results": True, "max_row_buffer": yp}
                   )
       
           try:
               conn = self._dbapi_connection
               if conn is None:
                   conn = self._revalidate_connection()
       
               context = constructor(
                   dialect, self, conn, execution_options, *args, **kw
               )
           except (exc.PendingRollbackError, exc.ResourceClosedError):
               raise
           except BaseException as e:
               self._handle_dbapi_exception(
                   e, util.text_type(statement), parameters, None, None
               )
       
           if (
               self._transaction
               and not self._transaction.is_active
               or (
                   self._nested_transaction
   /usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py:2134: in 
_handle_dbapi_exception
       util.raise_(
   /usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py:211: in 
raise_
       raise exception
   /usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py:1910: in 
_execute_context
       self.dialect.do_execute(
   /usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py:736: in 
do_execute
       cursor.execute(statement, parameters)
   /usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py:174: in execute
       self._discard()
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
   
   self = <MySQLdb.cursors.Cursor object at 0x7f123306c2b0>
   
       def _discard(self):
           self.description = None
           self.description_flags = None
           # Django uses some member after __exit__.
           # So we keep rowcount and lastrowid here. They are cleared in 
Cursor._query().
           # self.rowcount = 0
           # self.lastrowid = None
           self._rows = None
           self.rownumber = None
       
           if self._result:
               self._result.discard()
               self._result = None
       
           con = self.connection
           if con is None:
               return
   >       while con.next_result() == 0:  # -1 means no more data.
   E       sqlalchemy.exc.ProgrammingError: (MySQLdb.ProgrammingError) (2014, 
"Commands out of sync; you can't run this command now")
   E       [SQL: UPDATE task_instance SET pid=%s, updated_at=%s WHERE 
task_instance.dag_id = %s AND task_instance.task_id = %s AND 
task_instance.run_id = %s AND task_instance.map_index = %s]
   E       [parameters: (90, datetime.datetime(2023, 8, 8, 8, 12, 24, 176037), 
'test_dag', 'push', 'test', -1)]
   E       (Background on this error at: https://sqlalche.me/e/14/f405)
   ```
   
   For me it looks like REALLY there is a bug somewhere in mapping code that we 
need to track.


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