fix: dispatch cloud build on synchronize for preview-labeled PRs#9636
fix: dispatch cloud build on synchronize for preview-labeled PRs#9636
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 554 passed, 0 failed · 3 flaky📊 Browser Reports
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change updates the GitHub Actions PR dispatch workflow to handle both Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor PR as "Pull Request"
participant GH as "GitHub Events"
participant WF as "cloud-dispatch-build Workflow"
participant Runner as "Dispatch Target"
PR->>GH: event: labeled (label added)
GH->>WF: trigger (if added label ∈ {preview, preview-cpu, preview-gpu})
alt added label matches
WF->>Runner: dispatch preview build
else not matching
WF-->>GH: no-op
end
PR->>GH: event: synchronize (new commits)
GH->>WF: trigger (if PR has any label ∈ {preview, preview-cpu, preview-gpu})
alt PR has preview label
WF->>Runner: dispatch preview build
else no preview label
WF-->>GH: no-op
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
📦 Bundle: 4.57 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 28.9 kB (baseline 28.9 kB) • ⚪ 0 BMain entry bundles and manifests
Graph Workspace — 954 kB (baseline 954 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Views & Navigation — 72.4 kB (baseline 72.4 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Panels & Settings — 436 kB (baseline 436 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
User & Accounts — 16.1 kB (baseline 16.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Editors & Dialogs — 77.5 kB (baseline 77.5 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
UI Components — 56.5 kB (baseline 56.5 kB) • ⚪ 0 BReusable component library chunks
Data & Services — 2.77 MB (baseline 2.77 MB) • ⚪ 0 BStores, services, APIs, and repositories
Utilities & Hooks — 56.8 kB (baseline 56.8 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 8.87 MB (baseline 8.87 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 8.04 MB (baseline 8.04 MB) • ⚪ 0 BBundles that do not match a named category
|
⚡ Performance Report
Raw data{
"timestamp": "2026-03-09T06:17:21.421Z",
"gitSha": "d1b5a7ea07caf455d9a6bdcd211df2f8846e5872",
"branch": "fix-cloud-build-dispatch-preview",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2010.605000000055,
"styleRecalcs": 123,
"styleRecalcDurationMs": 21.018,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 391.06399999999996,
"heapDeltaBytes": -3650960
},
{
"name": "canvas-idle",
"durationMs": 2038.6459999999715,
"styleRecalcs": 124,
"styleRecalcDurationMs": 18.259000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 383.03,
"heapDeltaBytes": -4127844
},
{
"name": "canvas-idle",
"durationMs": 2037.2569999999541,
"styleRecalcs": 124,
"styleRecalcDurationMs": 20.551999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.8809999999999,
"heapDeltaBytes": -3672948
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1977.514000000042,
"styleRecalcs": 183,
"styleRecalcDurationMs": 60.044,
"layouts": 12,
"layoutDurationMs": 3.9509999999999996,
"taskDurationMs": 924.863,
"heapDeltaBytes": -3062432
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1791.4819999999736,
"styleRecalcs": 162,
"styleRecalcDurationMs": 43.287,
"layouts": 12,
"layoutDurationMs": 3.2700000000000005,
"taskDurationMs": 774.6829999999999,
"heapDeltaBytes": -2964520
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2030.9399999999869,
"styleRecalcs": 182,
"styleRecalcDurationMs": 52.635,
"layouts": 12,
"layoutDurationMs": 3.4450000000000003,
"taskDurationMs": 1011.1650000000001,
"heapDeltaBytes": -3557144
},
{
"name": "dom-widget-clipping",
"durationMs": 613.6030000000119,
"styleRecalcs": 45,
"styleRecalcDurationMs": 13.431999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 396.22599999999994,
"heapDeltaBytes": 7438664
},
{
"name": "dom-widget-clipping",
"durationMs": 567.4169999999776,
"styleRecalcs": 41,
"styleRecalcDurationMs": 12.607,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 341.056,
"heapDeltaBytes": 6898856
},
{
"name": "dom-widget-clipping",
"durationMs": 536.6980000000012,
"styleRecalcs": 40,
"styleRecalcDurationMs": 16.646,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 354.95799999999997,
"heapDeltaBytes": 6725424
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 579.4530000000577,
"styleRecalcs": 72,
"styleRecalcDurationMs": 14.574000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 405.319,
"heapDeltaBytes": 15341812
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 616.235999999958,
"styleRecalcs": 74,
"styleRecalcDurationMs": 14.936,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 431.64900000000006,
"heapDeltaBytes": -8608108
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 582.9939999999851,
"styleRecalcs": 72,
"styleRecalcDurationMs": 15.294,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 411.331,
"heapDeltaBytes": -8939920
},
{
"name": "subgraph-idle",
"durationMs": 2012.9510000000437,
"styleRecalcs": 122,
"styleRecalcDurationMs": 19.419,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.803,
"heapDeltaBytes": -2904068
},
{
"name": "subgraph-idle",
"durationMs": 2026.1000000000422,
"styleRecalcs": 124,
"styleRecalcDurationMs": 22.904,
"layouts": 1,
"layoutDurationMs": 0.223,
"taskDurationMs": 391.868,
"heapDeltaBytes": -2989456
},
{
"name": "subgraph-idle",
"durationMs": 1991.5320000000065,
"styleRecalcs": 120,
"styleRecalcDurationMs": 18.826000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.796,
"heapDeltaBytes": -4001088
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1695.7170000000588,
"styleRecalcs": 154,
"styleRecalcDurationMs": 42.4,
"layouts": 16,
"layoutDurationMs": 4.309,
"taskDurationMs": 703.406,
"heapDeltaBytes": -5929188
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1730.2349999999933,
"styleRecalcs": 157,
"styleRecalcDurationMs": 44.041,
"layouts": 16,
"layoutDurationMs": 4.307999999999999,
"taskDurationMs": 738.2090000000001,
"heapDeltaBytes": -5216532
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1707.828999999947,
"styleRecalcs": 155,
"styleRecalcDurationMs": 44.288,
"layouts": 16,
"layoutDurationMs": 4.394,
"taskDurationMs": 732.472,
"heapDeltaBytes": -5883712
}
]
} |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/cloud-dispatch-build.yaml:
- Around line 29-40: The current job if-condition uses github.repository and
preview-label checks but doesn't prevent forked PRs; modify the if expression to
require the PR originates from the same repo by adding a same-repo check:
include github.event.pull_request.head.repo.full_name == github.repository as a
prerequisite before evaluating the preview-label logic so jobs for fork PRs are
skipped when CLOUD_DISPATCH_TOKEN is not available.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a515f5e0-27b2-4f8e-a221-07e151cd9119
📒 Files selected for processing (1)
.github/workflows/cloud-dispatch-build.yaml
- Add synchronize event type so pushes to already-labeled PRs trigger builds - Support preview, preview-cpu, and preview-gpu labels - Use label.name for labeled events, pull_request.labels for synchronize
f8bcabf to
77ffac4
Compare
## Summary Cloud build dispatch was only triggering on the `labeled` event, not on subsequent pushes to PRs that already had a preview label. ## Changes - **What**: Add `synchronize` to `pull_request` event types and update the `if` condition to support all three preview labels (`preview`, `preview-cpu`, `preview-gpu`). For `labeled` events, check the added label name; for `synchronize` events, check existing PR labels. ## Review Focus The `if` condition now branches on `github.event.action` to use the correct label-checking mechanism for each event type. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9636-fix-dispatch-cloud-build-on-synchronize-for-preview-labeled-PRs-31e6d73d3650814e9069e37d6199ffc9) by [Unito](https://www.unito.io)
Summary
Cloud build dispatch was only triggering on the
labeledevent, not on subsequent pushes to PRs that already had a preview label.Changes
synchronizetopull_requestevent types and update theifcondition to support all three preview labels (preview,preview-cpu,preview-gpu). Forlabeledevents, check the added label name; forsynchronizeevents, check existing PR labels.Review Focus
The
ifcondition now branches ongithub.event.actionto use the correct label-checking mechanism for each event type.┆Issue is synchronized with this Notion page by Unito