Skip to content

Notarize by polling instead of a single --wait long-poll#12741

Closed
niksedk wants to merge 2 commits into
mainfrom
fix/notarize-poll-not-wait
Closed

Notarize by polling instead of a single --wait long-poll#12741
niksedk wants to merge 2 commits into
mainfrom
fix/notarize-poll-not-wait

Conversation

@niksedk

@niksedk niksedk commented Jul 23, 2026

Copy link
Copy Markdown
Member

Problem

The first signed release build (v5.1.0-rc13, run 29934529671) had both macOS jobs killed at GitHub's 6-hour limit, stuck on:

xcrun notarytool submit "$dmg_out" ... --wait

notarytool history afterwards showed both DMGs were Accepted within minutes of submission:

SubtitleEdit-macOS-x64.dmg    Accepted   (submitted 15:47Z)
SubtitleEdit-macOS-ARM64.dmg  Accepted   (submitted 15:46Z)

So notarization succeeded — --wait, a single long-poll, hung for six hours on a verdict Apple had already returned.

Fix

Submit once to capture the submission id, then poll notarytool info (short request/response calls) in a bounded 30-minute loop. A stuck long-poll can no longer block the job.

  • Transient poll failures fall back to In Progress and retry next tick, rather than tripping the step's set -e.
  • A non-Accepted result now runs notarytool log to surface Apple's reasons — the previous workflow printed nothing on rejection.
  • 30 min ceiling vs Apple's 15-min target for 90% of submissions; comfortably clear of the 6h kill.

YAML validated; JSON parsing tested against the real submit/info output shapes.

🤖 Generated with Claude Code

The v5.1.0-rc13 release build sat on `notarytool submit --wait` until
GitHub's 6-hour job limit killed both macOS jobs. The submissions
themselves were Accepted within minutes (confirmed via
`notarytool history`) - `--wait` is a single long-poll that hung after
Apple had already returned a verdict, so the job blocked for six hours
on a result it could have had at minute six.

Submit once to capture the submission id, then poll `notarytool info`
(short request/response calls) in a bounded 30-minute loop. A stuck
long-poll can no longer block the job, and a transient poll failure
retries on the next tick instead of tripping the step's `set -e`.

Also runs `notarytool log` on a non-Accepted result: the previous
workflow failed blind on rejection, printing nothing from Apple.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the macOS release packaging workflow to avoid xcrun notarytool submit --wait long-poll hangs by switching to a bounded polling approach, improving reliability of notarization within GitHub Actions’ job time limits.

Changes:

  • Replaces notarytool submit --wait with submit (capture submission id) + periodic notarytool info polling (30-minute ceiling).
  • Makes polling resilient to transient info failures to avoid failing the job due to a single request error.
  • Adds notarytool log output on non-Accepted statuses to surface Apple’s rejection details.

Comment thread .github/workflows/build-ui.yml Outdated
The 30-minute poll loop can exit with status still "In Progress". That path
previously reported a generic "did not succeed" and ran `notarytool log`, which
has nothing for an incomplete submission - reading like a rejection when it is a
timeout. Handle "In Progress" as its own case with a clear message and no log
fetch. (Copilot review feedback)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@niksedk niksedk closed this Jul 24, 2026
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