lemaadi opened a new issue, #24940:
URL: https://github.com/apache/superset/issues/24940

   Hi there,
   
   I am deploying superset to aws fargate instances ( app, worker and worker 
beat ) using a custom Dockerfile. All the services were working correctly until 
i upgraded superset to version `2.1.0` after spinning up the services now i am 
getting the following error 
   
   ```
   Traceback (most recent call last):
   --
   File "/app/superset/utils/log.py", line 368, in log
   sesh.bulk_save_objects(logs)
   File "<string>", line 2, in bulk_save_objects
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 3705, in bulk_save_objects
   self._bulk_save_mappings(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 3913, in _bulk_save_mappings
   transaction.rollback(_capture_exception=True)
   File 
"/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 
70, in __exit__
   compat.raise_(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", 
line 211, in raise_
   raise exception
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 3901, in _bulk_save_mappings
   persistence._bulk_insert(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", 
line 107, in _bulk_insert
   _emit_insert_statements(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", 
line 1097, in _emit_insert_statements
   c = connection._execute_20(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1710, in _execute_20
   return meth(self, args_10style, kwargs_10style, execution_options)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", 
line 334, in _execute_on_connection
   return connection._execute_clauseelement(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1577, in _execute_clauseelement
   ret = self._execute_context(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1953, in _execute_context
   self._handle_dbapi_exception(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 2134, in _handle_dbapi_exception
   util.raise_(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", 
line 211, in raise_
   raise exception
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1910, in _execute_context
   self.dialect.do_execute(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", 
line 736, in do_execute
   cursor.execute(statement, parameters)
   sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate 
key value violates unique constraint "logs_pkey"
   DETAIL:  Key (id)=(5664) already exists.
   [SQL: INSERT INTO logs (action, user_id, slice_id, json, dttm, duration_ms) 
VALUES (%(action)s, %(user_id)s, %(slice_id)s, %(json)s, %(dttm)s, 
%(duration_ms)s) RETURNING logs.id]
   [parameters: {'action': 'welcome', 'user_id': 23, 'slice_id': 0, 'json': 
'{"path": "/superset/welcome/", "object_ref": "Superset.welcome"}', 'dttm': 
datetime.datetime(2023, 8, 9, 23, 58, 2, 844797), 'duration_ms': 226}]
   (Background on this error at: https://sqlalche.me/e/14/gkpj)
   ``` 
   
   The error shows up with random key id whenever i access the home page of the 
webapp.
   
   Any ideas why this error is occurring and how can i fix it ?
   
   I am ready to provide more details 
   
   Thank you for your support  
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to