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

(tree) Added support for constraint to be applied when a change is reverted #22958

Merged
merged 11 commits into from
Dec 21, 2024

Conversation

agarwal-navin
Copy link
Contributor

@agarwal-navin agarwal-navin commented Nov 1, 2024

Added support for constraint to be applies when a change is reverted. This will be used to support specifying undo constraint in a transaction. Basically, when a transaction is run, in addition to the current constraint, an undo constraint can be added which will be applied and validated if and when the change corresponding to the transaction is undone.

The runTransaction API will be updated to suppport undo contraint in a later PR.

AB#8061

@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree base: main PRs targeted against main branch labels Nov 1, 2024
Copy link
Collaborator

@msfluid-bot msfluid-bot left a comment

Choose a reason for hiding this comment

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

Code Coverage Summary

↓ packages.dds.tree.src.feature-libraries.optional-field:
Line Coverage Change: -37.86%    Branch Coverage Change: -18.37%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 98.82% 80.45% ↓ -18.37%
Line Coverage 92.79% 54.93% ↓ -37.86%
↓ packages.dds.tree.src.feature-libraries.sequence-field:
Line Coverage Change: -48.32%    Branch Coverage Change: -6.84%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 90.31% 83.47% ↓ -6.84%
Line Coverage 91.69% 43.37% ↓ -48.32%
↓ packages.dds.tree.src.feature-libraries.modular-schema:
Line Coverage Change: -31.94%    Branch Coverage Change: -15.70%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 92.15% 76.45% ↓ -15.70%
Line Coverage 94.67% 62.73% ↓ -31.94%
↓ packages.dds.tree.src.shared-tree:
Line Coverage Change: -17.59%    Branch Coverage Change: -14.04%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 91.34% 77.30% ↓ -14.04%
Line Coverage 97.44% 79.85% ↓ -17.59%
↓ packages.dds.tree.src.feature-libraries.default-schema:
Line Coverage Change: -28.05%    Branch Coverage Change: 7.15%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 92.85% 100.00% ↑ 7.15%
Line Coverage 98.56% 70.51% ↓ -28.05%

Baseline commit: e432720
Baseline build: 303572
Happy Coding!!

Code coverage comparison check failed!!
More Details: Readme

  • Skip This Check!!

What to do if the code coverage check fails:

  • Ideally, add more tests to increase the code coverage for the package(s) whose code-coverage regressed.

  • If a regression is causing the build to fail and is due to removal of tests, removal of code with lots of tests or any other valid reason, there is a checkbox further up in this comment that determines if the code coverage check should fail the build or not. You can check the box and trigger the build again. The test coverage analysis will still be done, but it will not fail the build if a regression is detected.

  • Unchecking the checkbox and triggering another build should go back to failing the build if a test-coverage regression is detected.

  • You can check which lines are covered or not covered by your tests with these steps:

    • Go to the PR ADO build.
    • Click on the link to see its published artifacts. You will see an artifact named codeCoverageAnalysis, which you can expand to reach to a particular source file's coverage html which will show which lines are covered/not covered by your tests.
    • You can also run different kind of tests locally with :coverage tests commands to find out the coverage.

@agarwal-navin agarwal-navin changed the title API and logic to add undo contraint to transactions WIP: API and logic to add undo contraint to transactions Nov 7, 2024
@agarwal-navin agarwal-navin changed the title WIP: API and logic to add undo contraint to transactions (tree) Add contraint to the output context of a change Dec 4, 2024
@agarwal-navin agarwal-navin changed the title (tree) Add contraint to the output context of a change (tree) Added constraint to the output context of a change Dec 4, 2024
@agarwal-navin agarwal-navin marked this pull request as ready for review December 4, 2024 23:34
@agarwal-navin agarwal-navin requested a review from a team as a code owner December 4, 2024 23:34
@agarwal-navin agarwal-navin requested a review from noencke December 4, 2024 23:34
@agarwal-navin agarwal-navin changed the title (tree) Added constraint to the output context of a change (tree) Added constraint to be applied to the inverse of a change Dec 13, 2024
@agarwal-navin agarwal-navin changed the title (tree) Added constraint to be applied to the inverse of a change (tree) Added constraint to be applied to the revert of a change Dec 20, 2024
@agarwal-navin agarwal-navin changed the title (tree) Added constraint to be applied to the revert of a change (tree) Added support for constraint to be applied when a change is revert Dec 20, 2024
@agarwal-navin agarwal-navin changed the title (tree) Added support for constraint to be applied when a change is revert (tree) Added support for constraint to be applied when a change is reverted Dec 20, 2024
@agarwal-navin agarwal-navin merged commit 05f8561 into microsoft:main Dec 21, 2024
26 checks passed
@agarwal-navin agarwal-navin deleted the inverseConstraint branch December 21, 2024 00:05
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 base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants