fix(connections, web): handle flex clusters without deployment COMPASS-9008 #6741
+79
−32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We noticed that some flex clusters are not displayed in compass-web correctly, the reason seems to be that flex replaced both serverless and shared tier clusters (at least that's my guess, it's hard to validate to be honest).
It seems like if cluster was shared tier, we're able to build the metadata for it because the cluster looks like a replica set with associated deployment (although because we're not accounting for it actually being flex, we use it subtly wrong in some cases), but serverless clusters don't have a deployment, our code wasn't expecting that and so clusters would be just filtered out when listed due to the error when building the metadata.
I scanned through the mms codebase and seems to me that the flex handling in really close to serverless, so this patch maps flex explicitly in the metrics metadata and changes the places that are checking against it accordingly