[COMPASS-5210] Refactor mongodb-instance-model to allow for decoupling of instance/db/coll fetching logic Created: 20/Oct/21  Updated: 29/Oct/23  Resolved: 02/Nov/21

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: None
Fix Version/s: 1.29.5

Type: Task Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Sergey Petushkov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on COMPASS-5206 Remove databases and collections rela... Closed
depends on COMPASS-5208 Refactor mongodb-database-model to al... Closed
depends on COMPASS-5209 Refactor mongodb-collection-model to... Closed
is depended on by COMPASS-5211 SidebarDatabase/SidebarCollections sh... Closed
is depended on by COMPASS-5212 database-collections-plugin should ha... Closed
Epic Link: COMPASS-4764
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Novokuybyshevsk, Iteration Orlando

 Description   
  • Remove top-level collections collection, it's not used and should be nested under databases logically anyway
  • Databases should still part of the model collections
  • Activate database model fetch method to get databases info instead of fetching databases manually and pre-populating the collection with this info

Miro board with changes context



 Comments   
Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(instance-model, database-model, collection-model): Refactor instance db coll models COMPASS-5208 COMPASS-5209 COMPASS-5210 (#2558)

  • chore(collection-model, database-model, instance-model): Update mocha and eslint
  • refactor(mongodb-data-service): Change and provide new methods for databases/collections info fetching
  • Remove db/coll fetching from instance method
  • Add databaseStats public method to fetch dbStats
  • Add listCollectionsNamesOnly that safely fetches collection names with priviliges fallback
  • Add collectionInfo method that gets coll info for a single collection from listCollections
  • Allow nameOnly option in listDatabases
  • chore(compass-schema-validation): Refactor schema-validation to use new dataService.collectionInfo method
  • feat(collection-model): Add fetch method to the collection model and collection so it can handle it's own data loading
  • feat(database-model): Add fetch method to the database model and collection so it can handle it's own data loading
  • refactor(instance-model): Refactor instance fetch method
  • refactor(compass-app-stores): Refactor instance store to use new instance/db/coll fetch methods
  • fix(compass-home): Do not show overlay from compass-home

It races with the one in app-stores plugin, no need for that

  • refactor(compass-sidebar): Refactor sidebar instance state handling to match new app-stores behaviour, update mocks in tests
  • chore: Update package-lock
  • chore: Address review feedback
  • Use async methods in data-service instead of callbacks
  • Rename extended-model to model
  • chore(sidebar): Destruct arguments
  • chore: Mention relevant NODE ticket
  • test(data-service): Don't forget to call done in tests
  • test(instance-model): Update instance method mock
Comment by Githook User [ 02/Nov/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(instance-model, database-model, collection-model): Refactor instance db coll models COMPASS-5208 COMPASS-5209 COMPASS-5210 (#2558)

  • chore(collection-model, database-model, instance-model): Update mocha and eslint
  • refactor(mongodb-data-service): Change and provide new methods for databases/collections info fetching
  • Remove db/coll fetching from instance method
  • Add databaseStats public method to fetch dbStats
  • Add listCollectionsNamesOnly that safely fetches collection names with priviliges fallback
  • Add collectionInfo method that gets coll info for a single collection from listCollections
  • Allow nameOnly option in listDatabases
  • chore(compass-schema-validation): Refactor schema-validation to use new dataService.collectionInfo method
  • feat(collection-model): Add fetch method to the collection model and collection so it can handle it's own data loading
  • feat(database-model): Add fetch method to the database model and collection so it can handle it's own data loading
  • refactor(instance-model): Refactor instance fetch method
  • refactor(compass-app-stores): Refactor instance store to use new instance/db/coll fetch methods
  • fix(compass-home): Do not show overlay from compass-home

It races with the one in app-stores plugin, no need for that

  • refactor(compass-sidebar): Refactor sidebar instance state handling to match new app-stores behaviour, update mocks in tests
  • chore: Update package-lock
  • chore: Address review feedback
  • Use async methods in data-service instead of callbacks
  • Rename extended-model to model
  • chore(sidebar): Destruct arguments
  • chore: Mention relevant NODE ticket
  • test(data-service): Don't forget to call done in tests
  • test(instance-model): Update instance method mock
Comment by Githook User [ 02/Nov/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(instance-model, database-model, collection-model): Refactor instance db coll models COMPASS-5208 COMPASS-5209 COMPASS-5210 (#2558)

  • chore(collection-model, database-model, instance-model): Update mocha and eslint
  • refactor(mongodb-data-service): Change and provide new methods for databases/collections info fetching
  • Remove db/coll fetching from instance method
  • Add databaseStats public method to fetch dbStats
  • Add listCollectionsNamesOnly that safely fetches collection names with priviliges fallback
  • Add collectionInfo method that gets coll info for a single collection from listCollections
  • Allow nameOnly option in listDatabases
  • chore(compass-schema-validation): Refactor schema-validation to use new dataService.collectionInfo method
  • feat(collection-model): Add fetch method to the collection model and collection so it can handle it's own data loading
  • feat(database-model): Add fetch method to the database model and collection so it can handle it's own data loading
  • refactor(instance-model): Refactor instance fetch method
  • refactor(compass-app-stores): Refactor instance store to use new instance/db/coll fetch methods
  • fix(compass-home): Do not show overlay from compass-home

It races with the one in app-stores plugin, no need for that

  • refactor(compass-sidebar): Refactor sidebar instance state handling to match new app-stores behaviour, update mocks in tests
  • chore: Update package-lock
  • chore: Address review feedback
  • Use async methods in data-service instead of callbacks
  • Rename extended-model to model
  • chore(sidebar): Destruct arguments
  • chore: Mention relevant NODE ticket
  • test(data-service): Don't forget to call done in tests
  • test(instance-model): Update instance method mock
Comment by Githook User [ 02/Nov/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(instance-model, database-model, collection-model): Refactor instance db coll models COMPASS-5208 COMPASS-5209 COMPASS-5210 (#2558)

  • chore(collection-model, database-model, instance-model): Update mocha and eslint
  • refactor(mongodb-data-service): Change and provide new methods for databases/collections info fetching
  • Remove db/coll fetching from instance method
  • Add databaseStats public method to fetch dbStats
  • Add listCollectionsNamesOnly that safely fetches collection names with priviliges fallback
  • Add collectionInfo method that gets coll info for a single collection from listCollections
  • Allow nameOnly option in listDatabases
  • chore(compass-schema-validation): Refactor schema-validation to use new dataService.collectionInfo method
  • feat(collection-model): Add fetch method to the collection model and collection so it can handle it's own data loading
  • feat(database-model): Add fetch method to the database model and collection so it can handle it's own data loading
  • refactor(instance-model): Refactor instance fetch method
  • refactor(compass-app-stores): Refactor instance store to use new instance/db/coll fetch methods
  • fix(compass-home): Do not show overlay from compass-home

It races with the one in app-stores plugin, no need for that

  • refactor(compass-sidebar): Refactor sidebar instance state handling to match new app-stores behaviour, update mocks in tests
  • chore: Update package-lock
  • chore: Address review feedback
  • Use async methods in data-service instead of callbacks
  • Rename extended-model to model
  • chore(sidebar): Destruct arguments
  • chore: Mention relevant NODE ticket
  • test(data-service): Don't forget to call done in tests
  • test(instance-model): Update instance method mock
Comment by Githook User [ 02/Nov/21 ]

Author:

{'name': 'Sergey', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(instance-model, database-model, collection-model): Refactor instance db coll models COMPASS-5208 COMPASS-5209 COMPASS-5210 (#2558)

  • chore(collection-model, database-model, instance-model): Update mocha and eslint
  • refactor(mongodb-data-service): Change and provide new methods for databases/collections info fetching
  • Remove db/coll fetching from instance method
  • Add databaseStats public method to fetch dbStats
  • Add listCollectionsNamesOnly that safely fetches collection names with priviliges fallback
  • Add collectionInfo method that gets coll info for a single collection from listCollections
  • Allow nameOnly option in listDatabases
  • chore(compass-schema-validation): Refactor schema-validation to use new dataService.collectionInfo method
  • feat(collection-model): Add fetch method to the collection model and collection so it can handle it's own data loading
  • feat(database-model): Add fetch method to the database model and collection so it can handle it's own data loading
  • refactor(instance-model): Refactor instance fetch method
  • refactor(compass-app-stores): Refactor instance store to use new instance/db/coll fetch methods
  • fix(compass-home): Do not show overlay from compass-home

It races with the one in app-stores plugin, no need for that

  • refactor(compass-sidebar): Refactor sidebar instance state handling to match new app-stores behaviour, update mocks in tests
  • chore: Update package-lock
  • chore: Address review feedback
  • Use async methods in data-service instead of callbacks
  • Rename extended-model to model
  • chore(sidebar): Destruct arguments
  • chore: Mention relevant NODE ticket
  • test(data-service): Don't forget to call done in tests
  • test(instance-model): Update instance method mock
Generated at Wed Feb 07 22:38:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.