Lookup missing BIC when returning bank account activities #1411
GitHub Actions / JUnit Test Report
failed
Oct 2, 2024 in 0s
1283 tests run, 1280 passed, 1 skipped, 2 failed.
Annotations
Check failure on line 1 in TestDummyHadesLogs
github-actions / JUnit Test Report
TestDummyHadesLogs.test_hades_logs_are_returned
failed on setup with "sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "unix_tombstone_login_hash_key"
DETAIL: Key (login_hash)=(\x87a5bb619193daab2b1cbb7827cb7b7c1b839bc4d105f07714d4875b724c68eef8bad7eac9b0736d53d72afe686f15fbc9a364002d5fff68d692daea89b945ae) already exists.
CONTEXT: SQL statement "insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash)"
PL/pgSQL function user_ensure_tombstone() line 25 at SQL statement
[SQL: INSERT INTO "user" (wifi_passwd_hash, account_id, unix_account_id, address_id, password_reset_token, login, name, registered_at, passwd_hash, email, email_confirmation_key, birthdate, swdd_person_id, room_id) VALUES (%(wifi_passwd_hash)s, %(account_id)s, %(unix_account_id)s, %(address_id)s, %(password_reset_token)s, %(login)s, %(name)s, %(registered_at)s, %(passwd_hash)s, %(email)s, %(email_confirmation_key)s, %(birthdate)s, %(swdd_person_id)s, %(room_id)s) RETURNING "user".email_forwarded, "user".login_hash, "user".email_confirmed, "user".id]
[parameters: {'wifi_passwd_hash': None, 'account_id': 176, 'unix_account_id': None, 'address_id': 93, 'password_reset_token': None, 'login': 'bdominguez', 'name': 'Brian Carter', 'registered_at': datetime.datetime(2021, 9, 10, 8, 8, 36, 38841), 'passwd_hash': '{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=', 'email': '[email protected]', 'email_confirmation_key': None, 'birthdate': None, 'swdd_person_id': None, 'room_id': 79}]
(Background on this error at: https://sqlalche.me/e/20/gkpj)"
Raw output
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1967: in _exec_single_context
self.dialect.do_execute(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py:941: in do_execute
cursor.execute(statement, parameters)
E psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "unix_tombstone_login_hash_key"
E DETAIL: Key (login_hash)=(\x87a5bb619193daab2b1cbb7827cb7b7c1b839bc4d105f07714d4875b724c68eef8bad7eac9b0736d53d72afe686f15fbc9a364002d5fff68d692daea89b945ae) already exists.
E CONTEXT: SQL statement "insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash)"
E PL/pgSQL function user_ensure_tombstone() line 25 at SQL statement
The above exception was the direct cause of the following exception:
tests/frontend/user/test_logs.py:147: in user
return UserFactory.create(with_host=True, patched=True)
../venv/lib/python3.11/site-packages/factory/base.py:528: in create
return cls._generate(enums.CREATE_STRATEGY, kwargs)
../venv/lib/python3.11/site-packages/factory/alchemy.py:51: in _generate
return super()._generate(strategy, params)
../venv/lib/python3.11/site-packages/factory/base.py:465: in _generate
return step.build()
../venv/lib/python3.11/site-packages/factory/builder.py:271: in build
postgen_results[declaration_name] = declaration.declaration.evaluate_post(
../venv/lib/python3.11/site-packages/factory/declarations.py:592: in evaluate_post
return self.call(instance, step, postgen_context)
../venv/lib/python3.11/site-packages/factory/declarations.py:623: in call
return self.function(
tests/factories/user.py:74: in room_history_entries
rhe = RoomHistoryEntry.q.filter_by(user=self, room=self.room).one()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2778: in one
return self._iter().one() # type: ignore
../venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2827: in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:2362: in execute
return self._execute_internal(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:2226: in _execute_internal
) = compile_state_cls.orm_pre_session_exec(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/context.py:561: in orm_pre_session_exec
session._autoflush()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3061: in _autoflush
raise e.with_traceback(sys.exc_info()[2])
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3050: in _autoflush
self.flush()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:4352: in flush
self._flush(objects)
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:4487: in _flush
with util.safe_reraise():
../venv/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py:146: in __exit__
raise exc_value.with_traceback(exc_tb)
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:4448: in _flush
flush_context.execute()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:466: in execute
rec.execute(self)
../venv/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:642: in execute
util.preloaded.orm_persistence.save_obj(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:93: in save_obj
_emit_insert_statements(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:1233: in _emit_insert_statements
result = connection.execute(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1418: in execute
return meth(
../venv/lib/python3.11/site-packages/sqlalchemy/sql/elements.py:515: in _execute_on_connection
return connection._execute_clauseelement(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1640: in _execute_clauseelement
ret = self._execute_context(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1846: in _execute_context
return self._exec_single_context(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1986: in _exec_single_context
self._handle_dbapi_exception(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:2355: in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1967: in _exec_single_context
self.dialect.do_execute(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py:941: in do_execute
cursor.execute(statement, parameters)
E sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
E (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "unix_tombstone_login_hash_key"
E DETAIL: Key (login_hash)=(\x87a5bb619193daab2b1cbb7827cb7b7c1b839bc4d105f07714d4875b724c68eef8bad7eac9b0736d53d72afe686f15fbc9a364002d5fff68d692daea89b945ae) already exists.
E CONTEXT: SQL statement "insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash)"
E PL/pgSQL function user_ensure_tombstone() line 25 at SQL statement
E
E [SQL: INSERT INTO "user" (wifi_passwd_hash, account_id, unix_account_id, address_id, password_reset_token, login, name, registered_at, passwd_hash, email, email_confirmation_key, birthdate, swdd_person_id, room_id) VALUES (%(wifi_passwd_hash)s, %(account_id)s, %(unix_account_id)s, %(address_id)s, %(password_reset_token)s, %(login)s, %(name)s, %(registered_at)s, %(passwd_hash)s, %(email)s, %(email_confirmation_key)s, %(birthdate)s, %(swdd_person_id)s, %(room_id)s) RETURNING "user".email_forwarded, "user".login_hash, "user".email_confirmed, "user".id]
E [parameters: {'wifi_passwd_hash': None, 'account_id': 176, 'unix_account_id': None, 'address_id': 93, 'password_reset_token': None, 'login': 'bdominguez', 'name': 'Brian Carter', 'registered_at': datetime.datetime(2021, 9, 10, 8, 8, 36, 38841), 'passwd_hash': '{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=', 'email': '[email protected]', 'email_confirmation_key': None, 'birthdate': None, 'swdd_person_id': None, 'room_id': 79}]
E (Background on this error at: https://sqlalche.me/e/20/gkpj)
Check failure on line 1 in TestDummyHadesLogs
github-actions / JUnit Test Report
TestDummyHadesLogs.test_disconnected_user_emits_warning
failed on setup with "sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "unix_tombstone_login_hash_key"
DETAIL: Key (login_hash)=(\x87a5bb619193daab2b1cbb7827cb7b7c1b839bc4d105f07714d4875b724c68eef8bad7eac9b0736d53d72afe686f15fbc9a364002d5fff68d692daea89b945ae) already exists.
CONTEXT: SQL statement "insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash)"
PL/pgSQL function user_ensure_tombstone() line 25 at SQL statement
[SQL: INSERT INTO "user" (wifi_passwd_hash, account_id, unix_account_id, address_id, password_reset_token, login, name, registered_at, passwd_hash, email, email_confirmation_key, birthdate, swdd_person_id, room_id) VALUES (%(wifi_passwd_hash)s, %(account_id)s, %(unix_account_id)s, %(address_id)s, %(password_reset_token)s, %(login)s, %(name)s, %(registered_at)s, %(passwd_hash)s, %(email)s, %(email_confirmation_key)s, %(birthdate)s, %(swdd_person_id)s, %(room_id)s) RETURNING "user".email_forwarded, "user".login_hash, "user".email_confirmed, "user".id]
[parameters: {'wifi_passwd_hash': None, 'account_id': 176, 'unix_account_id': None, 'address_id': 93, 'password_reset_token': None, 'login': 'bdominguez', 'name': 'Brian Carter', 'registered_at': datetime.datetime(2021, 9, 10, 8, 8, 36, 38841), 'passwd_hash': '{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=', 'email': '[email protected]', 'email_confirmation_key': None, 'birthdate': None, 'swdd_person_id': None, 'room_id': 79}]
(Background on this error at: https://sqlalche.me/e/20/gkpj)"
Raw output
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1967: in _exec_single_context
self.dialect.do_execute(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py:941: in do_execute
cursor.execute(statement, parameters)
E psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "unix_tombstone_login_hash_key"
E DETAIL: Key (login_hash)=(\x87a5bb619193daab2b1cbb7827cb7b7c1b839bc4d105f07714d4875b724c68eef8bad7eac9b0736d53d72afe686f15fbc9a364002d5fff68d692daea89b945ae) already exists.
E CONTEXT: SQL statement "insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash)"
E PL/pgSQL function user_ensure_tombstone() line 25 at SQL statement
The above exception was the direct cause of the following exception:
tests/frontend/user/test_logs.py:147: in user
return UserFactory.create(with_host=True, patched=True)
../venv/lib/python3.11/site-packages/factory/base.py:528: in create
return cls._generate(enums.CREATE_STRATEGY, kwargs)
../venv/lib/python3.11/site-packages/factory/alchemy.py:51: in _generate
return super()._generate(strategy, params)
../venv/lib/python3.11/site-packages/factory/base.py:465: in _generate
return step.build()
../venv/lib/python3.11/site-packages/factory/builder.py:271: in build
postgen_results[declaration_name] = declaration.declaration.evaluate_post(
../venv/lib/python3.11/site-packages/factory/declarations.py:592: in evaluate_post
return self.call(instance, step, postgen_context)
../venv/lib/python3.11/site-packages/factory/declarations.py:623: in call
return self.function(
tests/factories/user.py:74: in room_history_entries
rhe = RoomHistoryEntry.q.filter_by(user=self, room=self.room).one()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2778: in one
return self._iter().one() # type: ignore
../venv/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2827: in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:2362: in execute
return self._execute_internal(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:2226: in _execute_internal
) = compile_state_cls.orm_pre_session_exec(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/context.py:561: in orm_pre_session_exec
session._autoflush()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3061: in _autoflush
raise e.with_traceback(sys.exc_info()[2])
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3050: in _autoflush
self.flush()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:4352: in flush
self._flush(objects)
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:4487: in _flush
with util.safe_reraise():
../venv/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py:146: in __exit__
raise exc_value.with_traceback(exc_tb)
../venv/lib/python3.11/site-packages/sqlalchemy/orm/session.py:4448: in _flush
flush_context.execute()
../venv/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:466: in execute
rec.execute(self)
../venv/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:642: in execute
util.preloaded.orm_persistence.save_obj(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:93: in save_obj
_emit_insert_statements(
../venv/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:1233: in _emit_insert_statements
result = connection.execute(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1418: in execute
return meth(
../venv/lib/python3.11/site-packages/sqlalchemy/sql/elements.py:515: in _execute_on_connection
return connection._execute_clauseelement(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1640: in _execute_clauseelement
ret = self._execute_context(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1846: in _execute_context
return self._exec_single_context(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1986: in _exec_single_context
self._handle_dbapi_exception(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:2355: in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
../venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1967: in _exec_single_context
self.dialect.do_execute(
../venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py:941: in do_execute
cursor.execute(statement, parameters)
E sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
E (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "unix_tombstone_login_hash_key"
E DETAIL: Key (login_hash)=(\x87a5bb619193daab2b1cbb7827cb7b7c1b839bc4d105f07714d4875b724c68eef8bad7eac9b0736d53d72afe686f15fbc9a364002d5fff68d692daea89b945ae) already exists.
E CONTEXT: SQL statement "insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash)"
E PL/pgSQL function user_ensure_tombstone() line 25 at SQL statement
E
E [SQL: INSERT INTO "user" (wifi_passwd_hash, account_id, unix_account_id, address_id, password_reset_token, login, name, registered_at, passwd_hash, email, email_confirmation_key, birthdate, swdd_person_id, room_id) VALUES (%(wifi_passwd_hash)s, %(account_id)s, %(unix_account_id)s, %(address_id)s, %(password_reset_token)s, %(login)s, %(name)s, %(registered_at)s, %(passwd_hash)s, %(email)s, %(email_confirmation_key)s, %(birthdate)s, %(swdd_person_id)s, %(room_id)s) RETURNING "user".email_forwarded, "user".login_hash, "user".email_confirmed, "user".id]
E [parameters: {'wifi_passwd_hash': None, 'account_id': 176, 'unix_account_id': None, 'address_id': 93, 'password_reset_token': None, 'login': 'bdominguez', 'name': 'Brian Carter', 'registered_at': datetime.datetime(2021, 9, 10, 8, 8, 36, 38841), 'passwd_hash': '{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=', 'email': '[email protected]', 'email_confirmation_key': None, 'birthdate': None, 'swdd_person_id': None, 'room_id': 79}]
E (Background on this error at: https://sqlalche.me/e/20/gkpj)
Loading