Skip to content

ci(desktop): allow manual dispatch of Desktop Swift CI - #11585

Merged
Git-on-my-level merged 1 commit into
mainfrom
ci/desktop-swift-manual-dispatch
Aug 14, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
ci/desktop-swift-manual-dispatch

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Problem

plan-desktop-release.py gates every desktop release on this workflow's checks existing for the exact source SHA:

REQUIRED_SOURCE_CHECK_NAMES = (
    RELEASE_ELIGIBILITY_CHECK_NAME,
    "Desktop Swift Build & Tests",
    "Desktop Swift Release Compile",
)

Until today this workflow had no manual trigger, only push and pull_request. That makes the gate unrecoverable whenever a run does not happen: push events cannot be replayed, and for a commit already on main neither a force-push nor a PR close/reopen produces one. The SHA stays permanently unreleasable, and the only remedy is to land an unrelated commit purely to move main forward.

That is not hypothetical. This workflow was disabled manually for part of today. During that window several changes merged to main with no checks, so the planner could not resolve a releasable SHA. It polls every 30s for up to 5400s and then fails — two release runs burned the full window and ended cancelled with tag-release skipped. Re-enabling the workflow did not fix it, because enabling does not retroactively create runs for commits that already merged.

Meanwhile the release train looked healthy: builds were dispatched, PRs showed mergeStateStatus: CLEAN, and no check reported failure. A required check that is absent is materially different from one that fails, and only the second is visible.

Change

Adds workflow_dispatch so the evidence can be re-minted for any SHA without inventing a commit.

No job logic changes. The changes job already tolerates the dispatch event: github.event.pull_request.base.sha is empty, so DIFF_BASE falls through to the existing git rev-parse HEAD^ fallback, and github.event.action is empty so the != 'closed' guard passes.

Verification

Merging this is itself the test: it pushes main, which must produce Desktop Swift Build & Tests and Desktop Swift Release Compile for the new SHA and unblock the planner. After that the trigger can be exercised directly with gh workflow run desktop-swift-ci.yml.

Failure-Class: none

Review in cubic

`plan-desktop-release.py` requires this workflow's checks on the exact source SHA
before a desktop release can be tagged. With only `push` and `pull_request` triggers,
any SHA whose run did not happen is permanently unreleasable: push events cannot be
replayed, and for a commit already on `main` neither a force-push nor a PR close/reopen
creates one.

This bit today. The workflow was manually disabled for part of the afternoon; several
changes merged to `main` during that window with no checks, and the planner could not
resolve a releasable SHA. It polls for up to 5400s before failing, so two release runs
consumed the full window and ended cancelled with `tag-release` skipped. Re-enabling the
workflow did not help, because enabling does not backfill runs for commits that already
merged.

The failure is also quiet: an absent required check reports nothing, so PRs read as
CLEAN and the release train appears healthy while it cannot tag anything.

No job logic changes. `DIFF_BASE` already falls back to `git rev-parse HEAD^` when
`github.event.pull_request.base.sha` is empty, and the `github.event.action != 'closed'`
guard passes for dispatch.

Failure-Class: none
Co-Authored-By: Claude Opus 5 <[email protected]>
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.

1 participant