Taragolis commented on PR #37242:
URL: https://github.com/apache/airflow/pull/37242#issuecomment-1934033043

   Interesting issue after switch to query builder AP, only related to the 
remote loggers
   
   ```console
   ERROR 
tests/providers/alibaba/cloud/log/test_oss_task_handler.py::TestOSSTaskHandler::test_oss_write_into_remote_existing_file_via_append
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/alibaba/cloud/log/test_oss_task_handler.py::TestOSSTaskHandler::test_oss_write_into_remote_non_existing_file_via_append
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/alibaba/cloud/log/test_oss_task_handler.py::TestOSSTaskHandler::test_oss_write_into_remote_existing_file_not_via_append
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/alibaba/cloud/log/test_oss_task_handler.py::TestOSSTaskHandler::test_oss_write_into_remote_non_existing_file_not_via_append
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_hook
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_hook_warns
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_wasb_log_exists
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_wasb_read_raises
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_write_log
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_write_on_existing_log
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_write_when_append_is_false
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/microsoft/azure/log/test_wasb_task_handler.py::TestWasbTaskHandler::test_write_raises
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_gcs_task_handler.py::TestGCSTaskHandler::test_client_conn_id_behavior[no-conn]
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_gcs_task_handler.py::TestGCSTaskHandler::test_client_conn_id_behavior[with-conn]
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_set_labels
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_append_labels
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_read_logs_for_all_try
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_read_logs_for_task_with_quote
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_read_logs_for_single_try
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_read_logs_with_pagination
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_read_logs_with_download
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_read_logs_with_custom_resources
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_use_credentials
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ERROR 
tests/providers/google/cloud/log/test_stackdriver_task_handler.py::TestStackdriverLoggingHandlerTask::test_should_return_valid_external_url
 - sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance' 
expected to update 1 row(s); 0 were matched.
   ```
   
   All errors are happen in teardown method when called `clear_db_*`
   
   ```console
   >                   raise orm_exc.StaleDataError(
                           "UPDATE statement on table '%s' expected to "
                           "update %d row(s); %d were matched."
                           % (table.description, len(records), rows)
                       )
   E                   sqlalchemy.orm.exc.StaleDataError: UPDATE statement on 
table 'task_instance' expected to update 1 row(s); 0 were matched.
   ```
   
   I know how to fix the tests, but worthwhile check remote loggers, maybe 
session have uncommitted changes 


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