Adding promises and operation timeouts to fix race conditions and infinite loading in OE (#22475)

* Adding promises and operation timeouts to fix race conditions

* cleaning up logic

* Update src/sql/workbench/services/objectExplorer/browser/objectExplorerService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update src/sql/workbench/services/objectExplorer/browser/objectExplorerService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Fixing promise type

* Reverting back to old error logic

* Making onsessioncreated async

* Removed polling and converted to event based

* removing connection variable out of promise

* Combining promises

* Update src/sql/workbench/services/objectExplorer/browser/treeUpdateUtils.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Fixing error messages and localizing user facing errors

* Fixing error message

* localizing config

* Update src/sql/workbench/services/objectExplorer/browser/objectExplorerService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update src/sql/workbench/services/objectExplorer/browser/objectExplorerService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update src/sql/workbench/services/objectExplorer/browser/objectExplorerService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update src/sql/workbench/services/objectExplorer/browser/objectExplorerService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Fixing comment

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Aasim Khan
2023-03-28 18:36:45 -07:00
committed by GitHub
parent 5c6ea2890a
commit f60bd1335c
5 changed files with 166 additions and 61 deletions

View File

@@ -41,9 +41,10 @@ const serverGroupConfig: IConfigurationNode = {
}
};
export const NODE_EXPANSION_CONFIG = 'serverTree.nodeExpansionTimeout';
const serverTreeConfig: IConfigurationNode = {
'id': 'serverTree',
'title': 'Server Tree',
'title': localize('serverTree.configuration.title', "Server Tree"),
'type': 'object',
'properties': {
'serverTree.useAsyncServerTree': {