Skip to content

feat(data-modeling): integrate diagramming package COMPASS-9357 #6979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

mabaasit
Copy link
Contributor

@mabaasit mabaasit commented Jun 2, 2025

Description

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@github-actions github-actions bot added the feat label Jun 2, 2025
@mabaasit mabaasit added the no release notes Fix or feature not for release notes label Jun 2, 2025
@mabaasit
Copy link
Contributor Author

mabaasit commented Jun 2, 2025

i have no idea what exploded lock file

source: source.ns,
target: target.ns,
markerStart: 'one',
markerEnd: 'many',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a placeholder item?

Something that's become fairly clear over time is that we're likely going to want to work with concrete cardinalities if we can (i.e. number ranges rather than one or many)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, actually it needs to be like that. I'll change this to reflect the store cardinalities. My assumption is that we will be having 1 or 2 as numeric representation for one and many respectively.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So ... what we'll ultimately have is descriptions like "1 to 4–6" or something along those lines, at least if we ultimately want to give schema recommendations (still a goal for Compass to have that eventually), because it's become pretty clear that the numeric values of the relative cardinality ranges matter for those (you maybe be able to create an embedding of collections in a 1:5 case but not in a 1:200 case)

? 'Unknown'
: typeof field.bsonType === 'string'
? field.bsonType
: field.bsonType[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

This line is also some sort of TODO?

@addaleax
Copy link
Collaborator

addaleax commented Jun 2, 2025

i have no idea what exploded lock file

Looking through it, it mostly seems to be additions of genuine new dependencies?

Comment on lines 255 to 256
"configs/eslint-config-compass/node_modules/eslint": {
"version": "8.57.1",
Copy link
Collaborator

@gribnoysup gribnoysup Jun 2, 2025

Choose a reason for hiding this comment

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

Seems like something went really wrong when you installed a new dep, you now have two versions of eslint in package-lock, one of them is not matchin the required one. This is partially why package-lock blew up so much and why CI is failing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, i finally resolved this, thank you. I tried checking out lock file from main couple of times and was not sure what I am missing. Eventually from your other comment realized its origin that I am missing.

Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

Can you try running

git checkout origin/main -- package-lock.json
npm install 

on your branch? This gives a pretty different result for package-lock at least on my machine (without eslint being messed up)

// to React 18, but for the time being we will just resolve react to
// actual files ourselves to work around that
'react/jsx-runtime': require.resolve('react/jsx-runtime'),
react: require.resolve('react'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably should add this to ignore in depcheckrc file, we do this already for another package that we just need to resolve

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in bba2841

@mabaasit mabaasit marked this pull request as ready for review June 2, 2025 19:42
@mabaasit mabaasit marked this pull request as draft June 2, 2025 19:43
title={diagramLabel}
edges={edges}
nodes={nodes}
onEdgeClick={(evt, edge) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we'll be doing removal like this, but it's actually neat for now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat no release notes Fix or feature not for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants