Skip to content
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

feat(databases-collections): handle non-existent namespaces COMPASS-5750 #6664

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

mabaasit
Copy link
Contributor

@mabaasit mabaasit commented Jan 28, 2025

Light Mode image
Dark Mode image

Description

Checklist

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)

@mabaasit mabaasit changed the title feat(databases-collections): handle non-existant namespaces COMPASS-5750 feat(databases-collections): handle non-existent namespaces COMPASS-5750 Jan 29, 2025
Comment on lines +255 to +264
// If the collection is not unprovisioned `is_non_existent` anymore,
// let's update the parent database model to reflect the change.
// This happens when a user tries to insert first document into a
// collection that doesn't exist yet or creates a new collection
// for an unprovisioned database.
if (!this.is_non_existent) {
getParentByType(this, 'Database').set({
is_non_existent: false,
});
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this is the right place for this, but if you feel it does not belong here, let me know

@mabaasit mabaasit marked this pull request as ready for review January 29, 2025 12:08
Comment on lines 812 to +817
void dispatch(fetchCollectionInfo(workspaceOptions));
}

if (workspaceOptions.type === 'Collections') {
// Fetching extra metadata for database should not block tab opening
void dispatch(fetchDatabaseInfo(workspaceOptions));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created COMPASS-8897 to clean this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants