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

fix(compass-schema-validation): optimises the opening of tab COMPASS-5093 #3994

Merged
merged 13 commits into from
Feb 3, 2023

Conversation

himanshusinghs
Copy link
Contributor

@himanshusinghs himanshusinghs commented Jan 24, 2023

This PR removes the document count while fetching sample documents as it was not necessary to find the sample of documents matching and not matching the schema

This PR changes the way sample documents are fetched for a provided / modified validator. Changes are summarised below:

  • instead of fetching the sample documents for a set / default validator on tab load or on every change, we now provide users with a button to explicitly request a sample document.
  • on change of validator, the documents are to be explicitly requested again.
  • we now use $sample with a sample size of 10000 as our sample space to match and find documents that could / could not match the set validator.

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)

Preview

updated-feature

@gribnoysup
Copy link
Collaborator

Just double-checking, COMPASS-5093 mentions two other things: using / making sample smaller and adding a button to explicitly run it instead of doing it automatically, is it something we decided not to do, or will this have a follow up?

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.

Left a few comments. Also the CI failures look legit. You need to reformat your code with prettier and update existing e2e for schema validation (maybe would make sense to add one or two new ones for the functionality you are adding)

@himanshusinghs himanshusinghs self-assigned this Jan 26, 2023
@himanshusinghs
Copy link
Contributor Author

@gribnoysup the e2e tests are fixed and I added a few checks for the new behaviour as well. The now failing tests are related to FLE and package test, which as per this discussion is affecting the entire repo.

@himanshusinghs himanshusinghs force-pushed the COMPASS-5093-optimise-schema-validation-tab branch from 3d5366d to 6925276 Compare February 1, 2023 14:09
@himanshusinghs himanshusinghs force-pushed the COMPASS-5093-optimise-schema-validation-tab branch from 6925276 to 7cd30e8 Compare February 2, 2023 11:53
himanshusinghs and others added 13 commits February 2, 2023 14:43
removes the document count which was not necessary to find the sample of
documents matching and not matching the schema
- both valid and invalid sample will now be fetched upon explicit action
- the sample aggregation now uses $sample with a predefined max limit
- icon for passed documents changed to checkmark
- header text added with an inline definition for sample documents section
…ents/sample-documents.jsx

Co-authored-by: Sergey Petushkov <[email protected]>
- PreviewDocument component independently connected to state
- tests now provide Store to the component tree
@himanshusinghs himanshusinghs force-pushed the COMPASS-5093-optimise-schema-validation-tab branch from 7cd30e8 to c7e3422 Compare February 2, 2023 13:43
@himanshusinghs himanshusinghs changed the title fix(compass-schema-validation): optimises the opening of schema validation tab fix(compass-schema-validation): optimises the opening of tab Feb 3, 2023
@himanshusinghs himanshusinghs merged commit 342b379 into main Feb 3, 2023
@himanshusinghs himanshusinghs deleted the COMPASS-5093-optimise-schema-validation-tab branch February 3, 2023 15:51
@lerouxb lerouxb changed the title fix(compass-schema-validation): optimises the opening of tab fix(compass-schema-validation): optimises the opening of tab COMPASS-5093 Sep 2, 2024
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.

3 participants