Repository navigation
feat(workflow): mark the pinned version in the revision history - #8577
yangzhang75 wants to merge 2 commits into
Conversation
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 389 | 0.238 | 25,651/30,788/30,788 us | 🔴 +20.5% / 🔴 +140.9% |
| 🔴 | bs=100 sw=10 sl=64 | 800 | 0.488 | 125,421/135,560/135,560 us | 🟢 -5.8% / 🔴 +49.8% |
| ⚪ | bs=1000 sw=10 sl=64 | 920 | 0.561 | 1,083,719/1,165,419/1,165,419 us | ⚪ within ±5% / 🔴 +37.5% |
Baseline details
Latest main 3726dd7 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 389 tuples/sec | 425 tuples/sec | 968.33 tuples/sec | -8.5% | -59.8% |
| bs=10 sw=10 sl=64 | MB/s | 0.238 MB/s | 0.259 MB/s | 0.591 MB/s | -8.1% | -59.7% |
| bs=10 sw=10 sl=64 | p50 | 25,651 us | 21,286 us | 10,646 us | +20.5% | +140.9% |
| bs=10 sw=10 sl=64 | p95 | 30,788 us | 34,010 us | 14,120 us | -9.5% | +118.0% |
| bs=10 sw=10 sl=64 | p99 | 30,788 us | 34,010 us | 16,498 us | -9.5% | +86.6% |
| bs=100 sw=10 sl=64 | throughput | 800 tuples/sec | 842 tuples/sec | 1,252 tuples/sec | -5.0% | -36.1% |
| bs=100 sw=10 sl=64 | MB/s | 0.488 MB/s | 0.514 MB/s | 0.764 MB/s | -5.1% | -36.1% |
| bs=100 sw=10 sl=64 | p50 | 125,421 us | 118,680 us | 83,736 us | +5.7% | +49.8% |
| bs=100 sw=10 sl=64 | p95 | 135,560 us | 143,875 us | 92,464 us | -5.8% | +46.6% |
| bs=100 sw=10 sl=64 | p99 | 135,560 us | 143,875 us | 108,561 us | -5.8% | +24.9% |
| bs=1000 sw=10 sl=64 | throughput | 920 tuples/sec | 920 tuples/sec | 1,321 tuples/sec | 0.0% | -30.3% |
| bs=1000 sw=10 sl=64 | MB/s | 0.561 MB/s | 0.561 MB/s | 0.806 MB/s | 0.0% | -30.4% |
| bs=1000 sw=10 sl=64 | p50 | 1,083,719 us | 1,085,986 us | 811,260 us | -0.2% | +33.6% |
| bs=1000 sw=10 sl=64 | p95 | 1,165,419 us | 1,142,211 us | 847,636 us | +2.0% | +37.5% |
| bs=1000 sw=10 sl=64 | p99 | 1,165,419 us | 1,142,211 us | 879,277 us | +2.0% | +32.5% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,513.90,200,128000,389,0.238,25650.74,30787.87,30787.87
1,100,10,64,20,2499.85,2000,1280000,800,0.488,125421.46,135559.87,135559.87
2,1000,10,64,20,21747.49,20000,12800000,920,0.561,1083718.59,1165419.02,1165419.02
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8577 +/- ##
============================================
+ Coverage 92.33% 92.34% +0.01%
- Complexity 5045 5046 +1
============================================
Files 1260 1260
Lines 54067 54165 +98
Branches 6755 6764 +9
============================================
+ Hits 49921 50018 +97
- Misses 2486 2489 +3
+ Partials 1660 1658 -2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6c57b03 to
c2e9a09
Compare
c2e9a09 to
d5a2eec
Compare
7385c46 to
699d08a
Compare
699d08a to
aac7861
Compare
Search and the listings it feeds were reading the author's live columns, which for a pinned workflow is the one copy the public cannot open. A draft would turn up in a public search under a title nobody has seen, and the card would advertise a name the detail page does not show. Each filter is now applied to whichever copy the caller may see: `onVisibleCopy` builds the same filter twice -- over the live columns for rows the caller was granted access to, over the frozen ones for rows they reach only because the workflow is public -- and ORs the two. A disjunction over bare columns rather than a CASE, so each side stays eligible for its own fulltext index. Unpinned public rows fall back to the live columns, so a following workflow searches exactly as it does now. Listings carry two more things from the same query: the frozen name and description to show a viewer without granted access, and whether the copy on show is behind the author's working copy. `constructWhereClause` takes `includePublic` for this; the other builders accept and ignore it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The author can pin a version, and their working copy then moves on. This gives them a way back to what the public is seeing: pinning leaves an anchor in the revision history they already use, and the panel marks it as the one currently public, so restoring the published version is the restore they already know. The anchor is a version row whose delta is the identity patch, so replaying it returns exactly what was pinned however many edits pile up after. An existing row cannot stand in: a version row replays to the content as it was *before* the change it records. Pinning content that is already the pinned one reuses its anchor rather than adding a twin, and the read that decides takes a row lock so two pins racing cannot both insert. Two consequences the anchor forces: - It must not start the version panel's aggregation window. It lands seconds after the save it freezes, and the panel folds close-together versions into the newest, which would hide the author's own save behind a row they never made. - The revision history is now readable only with granted access, or while nothing is pinned. Replaying a version folds deltas back from the author's current content, so listing versions of a pinned workflow would hand a public viewer the very edits the pin is holding back. `publish-status` carries the pinned version's date, read from the version row so the dialog and the panel print one value rather than two clocks'. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
aac7861 to
43494d3
Compare
What changes were proposed in this PR?
Which version is the public one should be answerable, and the answer should be a row the author
can already see — the version panel is where they go to look at, and restore, an earlier version.
that row returns what was published however many edits pile up later. An existing version row
cannot stand in: one replays to the content as it was before the change it records, so it
names the wrong thing by exactly one save. Pinning again with nothing changed reuses the anchor
rather than adding a twin, and
workflow.published_version_idnames it.what the public has, but it must not start the panel's aggregation window — the save it was
pinned from is seconds older and would otherwise be folded into it and disappear.
edit, and the share dialog names the same date from the same row, so the two cannot disagree.
wrote, and both insert an anchor.
Any related issues, documentation, discussions?
Closes #7941
Part of #7828. Design discussion: #7128. Stacked on #8576; until that merges this PR shows
its commit too, and the review here is the last one.
How was this PR tested?
7 new cases in
WorkflowPublishSpecandWorkflowVersionResourceSpec(572 in the dashboardpackage):
beside it rather than folded into it;
scalafmtCheckAllclean.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)
🤖 Generated with Claude Code