[COMPASS-4568] Remove `data-service-initialized` event or move it after we have successfully connected Created: 12/Jan/21  Updated: 10/Jan/24  Resolved: 20/Jan/21

Status: Closed
Project: Compass
Component/s: Connectivity, Tech debt
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Rhys Howell Assignee: Rhys Howell
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by COMPASS-4393 Let connecting not be blocking Closed
Epic Link: COMPASS-4362
Documentation Changes: Not Needed
Sprint: Iteration Tangerine

 Description   

Currently the `data-service-initialized` emitted in compass-connect emits the connecting dataservice to the appregistry. This event is listened to in a few places and the data-service is stored. However if it fails to connect, this data-service object is a risk because any actions on it may introduce errors or side effects.

This ticket involves either removing the `data-service-initialized` event, and just using the `data-service-connected` event if it works for the use cases of the `data-service-initialized` listeners, or we see if we can change where the `data-service-initialized` event is emitted so it only emits for successfully connected connections. If we go with this second approach we should also ensure any handlers don't need to be using the dataservice while it is still being connected to.



 Comments   
Comment by Githook User [ 20/Jan/21 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: chore(connectivity): remove `data-service-initialized` event COMPASS-4568 (#2100)
Branch: master
https://github.com/mongodb-js/compass/commit/741406903ccd645bc1e13b280d7e9771b06ad03b

Comment by Githook User [ 19/Jan/21 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: feat: add saving last seen topology description COMPASS-4568 (#291)
Branch: master
https://github.com/mongodb-js/data-service/commit/193f9ffe0dfac2c2b4ede41cf856d04ad3e360cc

Generated at Wed Feb 07 22:36:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.