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(core): releases history #7973

Merged
merged 24 commits into from
Dec 13, 2024
Merged

feat(core): releases history #7973

merged 24 commits into from
Dec 13, 2024

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Dec 6, 2024

Description

implements corel-236
Introduces release events, using the translog and the release-events api.

Screenshot 2024-12-12 at 11 27 26

Why we get events from the translog and the api?
The events API doesn't generate events for the edits that happen in the release metadata, we need to get those from the translog. Also, the creation event from the API doesn't contain the metadata information, so we get that from the translog.

What to review

Testing

Tests have been added for the new observables and logic.

Notes for release

Copy link

vercel bot commented Dec 6, 2024

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 Dec 13, 2024 10:10am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 10:10am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 10:10am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 10:10am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 13, 2024 10:10am

Copy link
Contributor

github-actions bot commented Dec 6, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Dec 6, 2024

⚡️ Editor Performance Report

Updated Fri, 13 Dec 2024 10:06:40 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 24.7 efps (41ms) 18.3 efps (55ms) +14ms (+34.6%) 🔴
article (body) 64.9 efps (15ms) 77.5 efps (13ms) -2ms (-/-%)
article (string inside object) 25.0 efps (40ms) 19.2 efps (52ms) +12ms (+30.0%) 🔴
article (string inside array) 21.7 efps (46ms) 17.2 efps (58ms) +12ms (+26.1%) 🔴
recipe (name) 50.0 efps (20ms) 29.0 efps (35ms) +15ms (+72.5%) 🔴
recipe (description) 55.6 efps (18ms) 29.4 efps (34ms) +16ms (+88.9%) 🔴
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) -0ms (-/-%)
synthetic (title) 17.5 efps (57ms) 7.0 efps (143ms) +86ms (+150.9%) 🔴
synthetic (string inside object) 19.2 efps (52ms) 7.0 efps (143ms) +91ms (+175.0%) 🔴

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) 41ms 43ms 47ms 79ms 154ms 10.8s
article (body) 15ms 18ms 24ms 153ms 195ms 5.5s
article (string inside object) 40ms 44ms 49ms 160ms 380ms 7.1s
article (string inside array) 46ms 50ms 55ms 173ms 152ms 7.4s
recipe (name) 20ms 22ms 28ms 68ms 1ms 7.9s
recipe (description) 18ms 20ms 24ms 33ms 0ms 4.6s
recipe (instructions) 5ms 8ms 10ms 25ms 0ms 3.2s
synthetic (title) 57ms 60ms 64ms 341ms 715ms 15.0s
synthetic (string inside object) 52ms 56ms 65ms 483ms 940ms 8.8s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 55ms 58ms 75ms 202ms 858ms 14.5s
article (body) 13ms 15ms 22ms 151ms 166ms 5.0s
article (string inside object) 52ms 55ms 73ms 314ms 922ms 8.6s
article (string inside array) 58ms 61ms 71ms 107ms 1024ms 8.6s
recipe (name) 35ms 37ms 40ms 55ms 4ms 8.7s
recipe (description) 34ms 35ms 41ms 67ms 21ms 6.2s
recipe (instructions) 5ms 7ms 7ms 21ms 0ms 3.1s
synthetic (title) 143ms 158ms 191ms 768ms 7553ms 24.1s
synthetic (string inside object) 143ms 156ms 169ms 709ms 7026ms 16.9s

📚 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.

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Component Testing Report Updated Dec 13, 2024 10:06 AM (UTC)

❌ Failed Tests (6) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 15s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 41s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 57s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 28s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 16s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ❌ Failed (Inspect) 4m 27s 0 0 6
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 12s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 54s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 49s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 14s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 42s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 53s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

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

Super solid work, @pedrobonamin! Appreciate the thorough unit tests inclued as well. Left a few comments, please have a look. No blockers for merge I think :)

vi.resetAllMocks()
})
it('should not get the events if release is undefined', () => {
testScheduler.run(({expectObservable, hot}) => {
Copy link
Member

Choose a reason for hiding this comment

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

Oh, cool – first time I've seen this pattern with hot/cold

Copy link
Contributor Author

Choose a reason for hiding this comment

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

First time using it, it's a very nice way to "mock" the observables and indicate they are "alive" and that we could receive updates from it.


return fetchLogs({fromTransaction: cachedTransactions[0]?.id, toTransaction: toTransaction})
.pipe(
expand((response) => {
Copy link
Member

Choose a reason for hiding this comment

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

Oh, neat! Don't think I've ever had a use for expand before. Makes the whole "keep fetching until reaching the end" logic look so simple!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've been going deep into rxjs with this latest changes and I'm really surprised how it makes async functions really easy and declarative. Wish I knew all of this earlier.

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.

2 participants