switch dashboard stats queries to use new bulk DB session#4625
switch dashboard stats queries to use new bulk DB session#4625
Conversation
|
There are two tests of Obviously you can't add the |
Add notify_db_session_bulk fixture to yield _notify_db.session_bulk for tests that need to run against the bulk/replica database. Ensures cleanup after each test by invoking _clean_database(_notify_db), keeping behaviour consistent with notify_db_session.
…uery Replace flask_sqlalchemy's get_recorded_queries with SQLAlchemy event listeners that capture the bind_key for each engine. Add QueryInfo dataclass with statement, parameters, and bind_key fields. This enables tests to verify that queries are being routed to the correct database when using db.session_bulk.
This change routes dashboard queries to the new 'bulk' database via the . We are starting with the dashboards as the first real-world test of the replica connection. This is a low-risk change that can be easily rolled back if users see any issues.
5b0f1fa to
dbc34ed
Compare
|
We probably need to adapt this to chop up the queries if we want to run it on the replica. |
|
See #4669 |
This change routes dashboard stats queries to the new 'bulk' database via the
session_bulk. We are starting with the dashboards as the first real-world test of the replica connection. This is a low-risk change that can be easily rolled back if users see any issues.This PR will be deployed after initial connectivity test: #4624. More details on this card.