Refactor: Invert dependency between query history and remote quries managers#1396
Refactor: Invert dependency between query history and remote quries managers#1396
Conversation
| constructor( | ||
| private readonly qs: QueryServerClient, | ||
| private readonly dbm: DatabaseManager, | ||
| private readonly localQueriesInterfaceManager: InterfaceManager, |
There was a problem hiding this comment.
We could rename InterfaceManager to something like LocalQueriesInterfaceManager.
There was a problem hiding this comment.
Yeah I'd like to do that but I thought I'd leave it for a separate PR.
There are a lot of things that refer to local queries that aren't prefixed with local (since local was the only queries you could run until 6 months ago!). It'd be good to gradually make the terminology more specific.
shati-patel
left a comment
There was a problem hiding this comment.
Thanks for tidying this up! 🧹
I tried locally, and I wonder if something has changed with reporting progress of the Run Variant Analysis command? 🔄
Specifically, the final stage of the command ("Sending request") now stays on-screen the whole time until the results are back. I'd expect it to disappear as soon as we've successfully scheduled the run:
Great catch! Not sure how I missed this. I'm not sure what could be causing this. I'll take a look tomorrow. @aeisenberg please let me know if you have any ideas. I don't think I've changed the "run remote query" code path so I'm a bit puzzled as to why this would be happening. |
|
Bug fixed now - there was an |
elenatanasoiu
left a comment
There was a problem hiding this comment.
This makes sense 👍

Currently, the
RemoteQueriesManagerdepends on theQueryHistoryManagerand related models e.g.QueryHistoryInfo. This is a bit problematic because theRemoteQueriesManagerends up having knowledge about query history stuff and can receive events that are potentially for local queries.This PR inverts that dependency and makes
RemoteQueriesManagera dependency of QueryHistoryManager. TheRemoteQueriesManageris completely independent of query history and simply publishes events that theQueryHistoryManagercan consume. I think this way makes more sense because the query history area has to be aware of local/remote queries, but remote queries don't have to necessarily be aware of the query history.Checklist
N/A
ready-for-doc-reviewlabel there.