fix(desktop): take desktop tests off the master push lane - #96633
Conversation
|
😎 Merged successfully - details. |
🤖 CI report
|
The macOS integration job and the macOS cache warmer both fired on every products/desktop/** master push, which was 48 of the last 63 jobs on the depot-macos-26 pool. The merge queue batch already tests the tree that lands, and every warm-cache key hashes pnpm-lock.yaml alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
da6b745 to
d114122
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new scheduled lane’s intent is partially undermined by missing DevEx alerter registration (and there’s also a cron/comment mismatch that should be corrected).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adjusts Desktop CI workflow triggers to reduce contention on the fixed depot-macos-26 runner pool by eliminating macOS runner usage on master pushes, while preserving macOS coverage via the merge queue lane and a scheduled post-merge run.
Changes:
- Limit
desktop-warm-cachesto run only whenproducts/desktop/pnpm-lock.yaml(or the workflow) changes. - Add a daily scheduled run for
desktop-testand isolate its concurrency group from push runs. - Skip the macOS
integration-testjob onmasterpush events (so macOS coverage comes from PRs/merge queue + schedule instead).
File summaries
| File | Description |
|---|---|
| .github/workflows/desktop-warm-caches.yml | Narrows push trigger paths so cache warming only consumes macOS capacity when the lockfile (cache key input) changes. |
| .github/workflows/desktop-test.yml | Adds a scheduled post-merge lane and updates concurrency; prevents macOS integration tests from running on master pushes. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Prompt To Fix All With AI### Issue 1
.github/workflows/desktop-test.yml:30
**Concurrency key can collide**
The literal `scheduled` key can match a pull request whose branch is also named `scheduled`. Because pull request runs cancel in-progress jobs in the same group, that branch could cancel the daily macOS run and remove the post-merge coverage this change relies on. Use a namespaced key that cannot overlap with a branch name.
```suggestion
group: desktop-test-${{ github.event_name == 'schedule' && 'event-scheduled' || github.head_ref || github.ref }}
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: da6b745 | Re-trigger Greptile |
The schedule and paths comments explained themselves against the triggers they replaced, which reads as change history once the diff is merged. State why each trigger is shaped the way it is instead, and drop the "emptiest hour measured" claim, which nothing keeps current. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A draft desktop pull request asked for a depot-macos-26 runner on every push. That pool is fixed and shared between Depot customers, and Apple's 24-hour minimum lease stops it from autoscaling, so the wait for a runner can be many times the length of the job. A draft now runs quality, typecheck and unit tests only. Trunk opens each merge queue batch as a draft pull request, so both conditions exempt trunk-merge/** heads by name. A bare draft check would skip the run that gates master. desktop-ci.yml gains ready_for_review, so marking a pull request ready is what buys back the build and E2E coverage. Without it the suite would wait for an unrelated push, and a batch could be the first place either job ran. The live-model e2e job needs integration-test, so its skip cascades to drafts as well. Both collation jobs already treat a skipped dependency as success, so a draft still reports green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Problem
depot-macos-26is a fixed pool shared across Depot customers, with no autoscaling, because Apple requires a 24-hour minimum lease. We can change how often we join that queue, not our position in it.products/desktop/**push asks for two macOS runners: the integration test and the macOS cache warmer.Jobs on
depot-macos-26over 24 hours, from the GitHub jobs API:desktop-testintegration testdesktop-warm-cachesdesktop-update-e2eChanges
desktop-test.ymlstops running on master pushes. A daily 05:03 UTC cron carries master coverage instead. Nothing dispatches on a desktop push, so the Linux jobs stop repeating the batch as well.desktop-warm-cachesnow fires only whenproducts/desktop/pnpm-lock.yamlchanges. Every cache key in that workflow hashes that one file, and its install steps already no-op when all three caches hit, so the other runs took a macOS runner to learn they had nothing to do.Across the last 7 days the master lane drops from 100 macOS jobs, from 50 pushes, to 23: 7 scheduled plus 16 lockfile changes.
The diff removes more lines than it adds. Skipping the workflow beats guarding the macOS job by event, which would leave the run dispatching and the Linux jobs repeating work the batch already did.
Note
The
e2ejob needsintegration-test, so the live-model gateway suite follows this schedule on master. It still runs on every pull request and every batch. Itspnpmcache save keys offgithub.ref, which a cron run still satisfies.Before:
flowchart LR A["desktop PR"] --> M1["macOS integration test"] B["merge queue batch"] --> S1["skipped by #96546"] C["master push"] --> M2["macOS integration test"] C --> M3["macOS cache warmer"] classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff; classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff; classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000; class M1 phBlue; class M2,M3 phRed; class S1 phGray;After:
flowchart LR A["desktop PR"] --> M1["macOS integration test"] B["merge queue batch"] --> M2["macOS integration test"] C["master push"] --> S1["no run"] D["daily 05:03 UTC"] --> M3["macOS integration test"] E["pnpm-lock.yaml push"] --> M4["macOS cache warmer"] classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff; classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000; classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000; class M1,M2 phBlue; class M3,M4 phYellow; class S1 phGray;How did you test this code?
if:expression.actionlint,bin/hogli lint:workflowsandbin/hogli ci:preflightall pass on this branch.desktop-test.yml,desktop-ci.yml,desktop-warm-caches.yml,desktop-update-e2e.ymlanddesktop-release.yml. Push frequency comes fromgit logoverorigin/master.e2ejob'spnpmcache save is ref-scoped, and a cron run keepsgithub.refatrefs/heads/master.Automatic notifications
Docs update
None. The change affects CI scheduling only.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Raised from a Slack thread about slow desktop tests. The thread's working diagnosis was contention on the macOS pool, so the first fix cut merge queue demand (#96546). The job timings then showed the long waits happen while PostHog's own macOS jobs sit idle, which moved the target from the batch lane to the master-push lane, and made reverting #96546 part of the fix rather than a reversal of it.
Skills invoked:
/authoring-ci-workflowsand/writing-pr-descriptions.Two rounds of review from the driver shaped the result. The first draft guarded the macOS job with
github.event_name != 'push'and kept the trigger, which still dispatched a run per desktop push; skipping the workflow replaced it. The cron started at six-hourly, until measured push frequency made that a 44% cut.On cadence: the hourly master lane in
/authoring-ci-workflowsis the documented pattern for this substitution, and hourly cannot work here, because 24 runs a day is what this PR removes. Daily master crons are already common in this repo, including for suites:ci-hobby.ymlat 06:00,ci-e2e-playwright-audit.ymlat 07:00,ci-storybook-update-test-timing.ymlat 04:00, anddesktop-update-e2e.yml, which runs adepot-macos-26job daily at 07:00.ci-geoip-canary.ymlruns six-hourly. So the cadence is in-house, but this is the first daily lane that replaces a suite's master-push coverage.desktop-test.ymlis in neitherGATING_WORKFLOWSnorSCHEDULED_GATING_WORKFLOWSinci-alerts-devex.yml, so no desktop lane pages today. Registering the new cron there is a follow-up: the alerter's scheduled thresholds assume an hourly cadence, and a daily lane needs its own arms.No duplicate: #95852 and #94509 are open drafts on the same pool. Both cut the time a job spends on a macOS runner; neither cuts how many runners the repo asks for.
The diff carries no customer data or other non-public material.