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(core): updating document version actions to match deviated API #8913

Merged
merged 3 commits into from
Mar 14, 2025

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Mar 12, 2025

Description

Some of the actions used in createReleaseOperationsStore (which is used by useReleaseOperations and useVersionOperations) have drifted from the actual APIs.

This PR adjusts the types and updates the uses of these actions according to the version actions and the release actions from content lake.

Additionally, since version.create is now supported by content lake, handleCreateVersion uses the version action rather than creating a document directly with the version _id.

What to review

Testing

Tests updated for createReleaseOperationsStore.test

Manual testing trying to use most of the actions that have been impacted

Notes for release

Creating a new version of a document uses the Sanity API version.create action.

Copy link

vercel bot commented Mar 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2025 0:58am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2025 0:58am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2025 0:58am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Mar 13, 2025 0:58am
test-next-studio ⬜️ Ignored (Inspect) Mar 13, 2025 0:58am

Copy link
Contributor

github-actions bot commented Mar 13, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.02% 54456 / 129572
🔵 Statements 42.02% 54456 / 129572
🔵 Functions 46.89% 2729 / 5820
🔵 Branches 79.43% 10216 / 12861
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/releases/store/createReleaseOperationStore.ts 98.13% 100% 100% 98.13% 178-179, 367-368
Generated in workflow #32236 for commit 175137f by the Vitest Coverage Report Action

@jordanl17 jordanl17 closed this Mar 13, 2025
@jordanl17 jordanl17 reopened this Mar 13, 2025
Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Mar 13, 2025

⚡️ Editor Performance Report

Updated Thu, 13 Mar 2025 01:26:41 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 22.2 efps (45ms) 19.4 efps (52ms) +7ms (+14.4%)
article (body) 70.2 efps (14ms) 67.8 efps (15ms) +1ms (-/-%)
article (string inside object) 24.4 efps (41ms) 22.7 efps (44ms) +3ms (+7.3%)
article (string inside array) 22.2 efps (45ms) 20.8 efps (48ms) +3ms (+6.7%)
recipe (name) 43.5 efps (23ms) 47.6 efps (21ms) -2ms (-8.7%)
recipe (description) 47.6 efps (21ms) 52.6 efps (19ms) -2ms (-9.5%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (5ms) -1ms (-/-%)
synthetic (title) 19.2 efps (52ms) 18.9 efps (53ms) +1ms (+1.9%)
synthetic (string inside object) 20.4 efps (49ms) 19.6 efps (51ms) +2ms (+4.1%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 45ms 76ms 100ms 406ms 785ms 11.2s
article (body) 14ms 18ms 25ms 42ms 86ms 5.3s
article (string inside object) 41ms 43ms 48ms 219ms 319ms 7.7s
article (string inside array) 45ms 47ms 49ms 132ms 214ms 7.2s
recipe (name) 23ms 25ms 29ms 47ms 8ms 7.3s
recipe (description) 21ms 26ms 27ms 30ms 0ms 5.0s
recipe (instructions) 6ms 8ms 10ms 24ms 0ms 3.3s
synthetic (title) 52ms 56ms 63ms 207ms 782ms 12.4s
synthetic (string inside object) 49ms 51ms 57ms 207ms 627ms 7.8s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 52ms 54ms 78ms 272ms 1194ms 11.6s
article (body) 15ms 16ms 16ms 44ms 57ms 4.8s
article (string inside object) 44ms 46ms 48ms 137ms 184ms 7.6s
article (string inside array) 48ms 50ms 52ms 85ms 167ms 7.2s
recipe (name) 21ms 22ms 23ms 43ms 0ms 7.0s
recipe (description) 19ms 20ms 23ms 27ms 0ms 4.7s
recipe (instructions) 5ms 7ms 8ms 11ms 0ms 3.1s
synthetic (title) 53ms 58ms 62ms 205ms 838ms 13.1s
synthetic (string inside object) 51ms 52ms 55ms 68ms 472ms 7.2s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

@jordanl17 jordanl17 marked this pull request as ready for review March 13, 2025 10:33
@jordanl17 jordanl17 requested a review from a team as a code owner March 13, 2025 10:33
@jordanl17 jordanl17 requested review from pedrobonamin and removed request for a team March 13, 2025 10:33
@jordanl17 jordanl17 enabled auto-merge (squash) March 13, 2025 10:33
Copy link
Contributor

@pedrobonamin pedrobonamin left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you Jordan!

@jordanl17 jordanl17 merged commit 1a064d4 into next Mar 14, 2025
61 checks passed
@jordanl17 jordanl17 deleted the fix/sapp-2493-update-version-actions branch March 14, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants