Skip to content

Conversation

gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Sep 16, 2025

This patch adds a checkbox that allows to opt-out of automatic relationship discovery logic when generating a new diagram. Should be easier to review with no whitespace changes

image

@gribnoysup gribnoysup requested a review from a team as a code owner September 16, 2025 14:12
@github-actions github-actions bot added the feat label Sep 16, 2025
@gribnoysup gribnoysup added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Sep 16, 2025
// @ts-expect-error Element is accepted, but not typed correctly
description={
<>
Using a special algorithm, Compass will try to automatically
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits

"Using a special algo" can be removed. This might just cause people to ask for details on that algo

Using a special algorithm, Compass will try to automatically
discover relationships in selected collections. This operation
will run multiple find requests against{' '}
<strong>indexed fields</strong> of the collections and might
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"and will take additional time per collection being analyzed"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and maybe this is what should be bolded, since this is where we expect there to be customer impact


enableAutomaticRelationshipInference: {
stage: 'development',
stage: 'released',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we remove FF's once they've been fully released?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally keep them around as no-ops since there's no harm in doing so and Compass would otherwise reject usage of the feature flag. Not a huge deal either way, though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo... we should be cleaning them up over time, but practically we always forget to schedule this work, so a lot of very old flags are hanging out in the codebase (tell me if this sounds familiar @johnjackweir 😄) and as Anna correctly noticed there's not really much harm in that and so very little pressure for cleaning up

The main reason we have a dedicated released state is to be able to easy roll back in the first few weeks of the feature being available by just flipping the value instead of, for example, reverting the patches that would remove the flag from the code completely. But after this "trial" period we should be cleaning those up, in theory

onCollectionsSelect: (colls: string[]) => void;
onAutomaticallyInferRelationshipsToggle: (newVal: boolean) => void;
}) {
const showAutoInferOption = usePreference(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basic Compass FF question, can this be removed now that the FF is enabled?

Copy link
Collaborator

@addaleax addaleax Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes – but see Sergey's answer below for why we may want to keep it for a bit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this one really need to stay for that long, I really wanted it only for the initial algo merging while there was no form checkbox, I'll clean this up in a week or so.

@gribnoysup
Copy link
Collaborator Author

Updated the wording, please take another look!

@gribnoysup gribnoysup merged commit 238a79b into main Sep 17, 2025
60 checks passed
@gribnoysup gribnoysup deleted the COMPASS-9777 branch September 17, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat feature flagged PRs labeled with this label will not be included in the release notes of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants