Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6909

Move connection store management out of compass-connections

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Tech debt
    • 3

      Currently, compass-connections takes on both the role of the frontend for the connection list in the Compass UI, as well as the role of managing how and when connection information is stored and loaded from disk, leaving to ConnectionStorage only the reponsibility of actually doing so.

      This is problematic because:

      • It mixes providing connection information to the frontend with storage logic
      • It duplicates information, namely, keeps an in-memory copy of the connection list in addition to the on-disk connection information
      • And it does a poor job of keeping that duplicated information in sync (e.g.: updating OIDC tokens requires updates to two different stores, importing connection needs to be finished by fully reloading the connection list)

      We should extract the parts of the frontend-facing useConnections() hook that are responsible for managing the "collection" of all ConnectionInfo objects, and encapsulate that responsibility either inside of ConnectionStorage or in a layer between the two.

            Assignee:
            Unassigned Unassigned
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: