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(tree): Schema validation #21011

Merged
merged 22 commits into from
May 15, 2024
Merged

Conversation

alexvy86
Copy link
Contributor

@alexvy86 alexvy86 commented May 7, 2024

Description

Builds on top of #20904, to enable content being inserted into a shared tree to be validated against the stored schema of the tree.

Reviewer Guidance

The review process is outlined on this wiki page.

I first tried putting the flag that defines if schema validation should happen or not just in TreeConfiguration but some code paths didn't seem to have good access to it. It felt natural to make it part of the policy.

@alexvy86 alexvy86 requested a review from a team as a code owner May 7, 2024 19:46
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree public api change Changes to a public API base: main PRs targeted against main branch area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct labels May 7, 2024
@github-actions github-actions bot added the area: examples Changes that focus on our examples label May 8, 2024
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented May 8, 2024

@fluid-example/bundle-size-tests: +3.8 KB
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 453.18 KB 453.18 KB No change
azureClient.js 550.61 KB 550.61 KB No change
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 257.02 KB 257.02 KB No change
fluidFramework.js 357.56 KB 359.46 KB +1.9 KB
loader.js 132.89 KB 132.89 KB No change
map.js 41.45 KB 41.45 KB No change
matrix.js 143.67 KB 143.67 KB No change
odspClient.js 518.94 KB 518.94 KB No change
odspDriver.js 97.29 KB 97.29 KB No change
odspPrefetchSnapshot.js 42.15 KB 42.15 KB No change
sharedString.js 160.19 KB 160.19 KB No change
sharedTree.js 357.55 KB 359.45 KB +1.9 KB
Total Size 3.19 MB 3.19 MB +3.8 KB

Baseline commit: 6abe291

Generated by 🚫 dangerJS against 191f1e5

Copy link
Contributor

@noencke noencke left a comment

Choose a reason for hiding this comment

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

Looks great - approving for what I see. I think you mentioned that you're going to make some changes, so feel free to re-request review when necessary.

packages/dds/tree/src/test/simple-tree/toMapTree.spec.ts Outdated Show resolved Hide resolved
@alexvy86 alexvy86 requested a review from noencke May 9, 2024 17:32
@alexvy86
Copy link
Contributor Author

alexvy86 commented May 9, 2024

@noencke new changes in; basically moved the new enableSchemaValidation to a property bag passed to new TreeConfiguration() which required adding ITreeConfigurationOptions to the public API (cc @microsoft/fluid-cr-api). Not sure if this will matter much as #20815 moves forward since it might end up replacing schematize() and have its own API shape (could reuse the new interface, maybe with a new name).

@alexvy86 alexvy86 requested a review from a team May 9, 2024 17:35
@alexvy86 alexvy86 merged commit b14e9fa into microsoft:main May 15, 2024
30 checks passed
@alexvy86 alexvy86 deleted the schema-validation branch May 15, 2024 22:52
kekachmar pushed a commit to kekachmar/FluidFramework that referenced this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: tree area: dds Issues related to distributed data structures area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants