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(CI): update playwright cache on CI consistently #8559

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Feb 10, 2025

Description

I got a strange error on the CI on another PR:
Pasted Graphic 1
Turns out the Cache Playwright Browsers for Playwright's Version step is failing to restore the cache:

Cache restored successfully
Cache restored from key: playwright-browsers-

It should be restoring the cache from playwright-browsers-1.50.1, but it's falling back to some previous cache step that had an empty PLAYWRIGHT_VERSION env var.
This issue started appearing after #8552 merged. This PR changes it so that the playwright version is stored with the GitHub output API instead of an intermediary env var.
It also shifts the cache key to ${version}-playwright-browsers. That way, if 1.50.1-playwright-browsers has no match, github will look at these as fallbacks:

1.50.1-playwright-browsers
1.50.1-playwright
1.50.1

Instead of the current behavior of:

playwright-browsers-1.50.1
playwright-browsers
playwright

Which isn't what we want.

What to review

Makes sense?

Testing

If builds pass we're good. Although I don't think the playwright-ct-test (webkit, 1, 2) and playwright-ct-test (webkit, 2, 2) jobs will pass, as they didn't for #8552 which bumped playwright to 1.50.1. (test 1, test 2)

Notes for release

N/A

@stipsan stipsan requested a review from a team as a code owner February 10, 2025 11:04
@stipsan stipsan requested review from rexxars and removed request for a team February 10, 2025 11:04
Copy link

vercel bot commented Feb 10, 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 Feb 10, 2025 11:04am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 10, 2025 11:04am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 10, 2025 11:04am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Feb 10, 2025 11:04am
test-next-studio ⬜️ Ignored (Inspect) Feb 10, 2025 11:04am

@stipsan stipsan enabled auto-merge February 10, 2025 11:04
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.44% 53803 / 126771
🔵 Statements 42.44% 53803 / 126771
🔵 Functions 47.94% 2772 / 5782
🔵 Branches 78.79% 10298 / 13069
File CoverageNo changed files found.
Generated in workflow #30046 for commit b6b4488 by the Vitest Coverage Report Action

Copy link
Contributor

Component Testing Report Updated Feb 10, 2025 11:13 AM (UTC)

❌ Failed Tests (2) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 13s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 1m 57s 4 0 2
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 53s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 16s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 7s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 36s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 2m 5s 21 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 45s 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
Contributor

github-actions bot commented Feb 10, 2025

⚡️ Editor Performance Report

Updated Mon, 10 Feb 2025 11:37:00 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 28.6 efps (35ms) 25.6 efps (39ms) +4ms (+11.4%)
article (body) 71.9 efps (14ms) 67.8 efps (15ms) +1ms (-/-%)
article (string inside object) 29.0 efps (35ms) 25.3 efps (40ms) +5ms (+14.5%)
article (string inside array) 25.6 efps (39ms) 22.7 efps (44ms) +5ms (+12.8%)
recipe (name) 52.6 efps (19ms) 52.6 efps (19ms) +0ms (-/-%)
recipe (description) 62.5 efps (16ms) 62.5 efps (16ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 20.6 efps (49ms) 20.0 efps (50ms) +2ms (+3.1%)
synthetic (string inside object) 20.0 efps (50ms) 20.0 efps (50ms) +0ms (-/-%)

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) 35ms 41ms 51ms 103ms 146ms 11.2s
article (body) 14ms 17ms 33ms 174ms 182ms 5.4s
article (string inside object) 35ms 36ms 38ms 50ms 120ms 6.3s
article (string inside array) 39ms 41ms 46ms 243ms 236ms 6.7s
recipe (name) 19ms 21ms 26ms 38ms 0ms 6.9s
recipe (description) 16ms 18ms 19ms 32ms 0ms 4.4s
recipe (instructions) 5ms 6ms 7ms 8ms 0ms 3.0s
synthetic (title) 49ms 54ms 66ms 353ms 828ms 13.3s
synthetic (string inside object) 50ms 54ms 111ms 403ms 930ms 8.7s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 39ms 43ms 63ms 366ms 222ms 11.2s
article (body) 15ms 18ms 24ms 218ms 331ms 5.2s
article (string inside object) 40ms 43ms 50ms 195ms 287ms 7.1s
article (string inside array) 44ms 45ms 50ms 152ms 236ms 7.3s
recipe (name) 19ms 21ms 23ms 60ms 0ms 7.4s
recipe (description) 16ms 17ms 19ms 27ms 0ms 4.4s
recipe (instructions) 5ms 6ms 7ms 8ms 0ms 2.9s
synthetic (title) 50ms 56ms 68ms 479ms 1207ms 14.2s
synthetic (string inside object) 50ms 53ms 64ms 422ms 997ms 8.4s

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

Great catch, thank you so much @stipsan! <3

@stipsan stipsan added this pull request to the merge queue Feb 10, 2025
Merged via the queue into next with commit f660657 Feb 10, 2025
62 checks passed
@stipsan stipsan deleted the update-playwright-install-cache branch February 10, 2025 12:37
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