chore(ci): drop the nightly E2E iOS and Android runs, rebuild only on request - #161
Conversation
The nightly cron fired every day without fail and took roughly half of this repository's macOS minutes, on a branch nobody had touched. E2E iOS now runs when a pull request opens, reopens or leaves draft, on workflow_dispatch, and whenever the `run-ci` label is added. A push to an open pull request no longer rebuilds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| gh api -X DELETE \ |
There was a problem hiding this comment.
For pull requests from forks, github.token is read-only, so this API call cannot delete the run-ci label. Because continue-on-error hides that failure, the label remains attached and cannot be re-added to generate another labeled event. As a result, the new on-request rebuild mechanism works only once for fork pull requests.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/e2e-ios.yml
Line: 62-64
Comment:
**Fork labels remain attached**
For pull requests from forks, `github.token` is read-only, so this API call cannot delete the `run-ci` label. Because `continue-on-error` hides that failure, the label remains attached and cannot be re-added to generate another `labeled` event. As a result, the new on-request rebuild mechanism works only once for fork pull requests.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 96654dc, in both e2e-ios.yml and e2e-android.yml — you reviewed cae0d62, before the Android workflow carried the same step.
The step now requires github.event.pull_request.head.repo.full_name == github.repository, so on a fork PR it no longer attempts a DELETE it cannot perform and continue-on-error has nothing to bury.
The premise is right; "works only once for fork pull requests" is not. A stuck label is removable from the PR sidebar, and removing then re-adding it raises a fresh labeled event. The real cost on a fork PR is one manual click. The comment above the step now says that.
For context on exposure here: this repository has no forks and has never taken a fork PR. The guard is in because the defect is real, not because it is currently reachable.
E2E Android carried the same daily cron as E2E iOS. It now runs when a pull request opens, reopens or leaves draft, on workflow_dispatch, and whenever the run-ci label is added. A push to an open pull request no longer rebuilds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A `pull_request` from a fork gets a read-only token, so deleting the label would 403 and continue-on-error would bury it. The step now runs only for same-repository pull requests; on a fork PR the label comes off by hand. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A labeled event for any label shared the E2E group, so with cancel-in-progress it killed a running suite and the replacement run skipped the job — the check read "skipped" and the requested validation was lost. Dependabot makes that concrete: it opens a PR and then applies its own labels to it. The label cleanup also needs a writable token, which neither a fork PR nor a Dependabot PR gets. It now runs only where the DELETE can succeed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
E2E iOSandE2E Androideach fired a cron every single day over Sep 1–16 2026 — 15 runs, 15 days, no gap — whether or not anything had changed. Measured macOS minutes forE2E iOSover the period:The nightly is roughly half the macOS bill of that workflow, spent on a branch nobody touched.
E2E Androidruns on Linux with KVM, so it is far cheaper, but it is the same daily run with the same justification.Changes
Both
e2e-ios.ymlande2e-android.yml:scheduleremoved.pull_requestno longer listens tosynchronize: a push to an open pull request does not rebuild.pull_requestnow listens toopened,reopened,ready_for_reviewandlabeled.run-cilabel builds the current head. The first step removes the label again, because GitHub raises nolabeledevent for a label that is already present.workflow_dispatchis unchanged.The existing
pathsfilters still apply, so the label only starts a run on a pull request that actually touches the SDK or the example app.Coverage this gives up
The nightlies were the only thing that exercised
mainafter merge. Everything they covered still runs when a pull request opens, and on demand — one merge-time run less. There is no branch protection onmainin this repository, so no check is required and nothing is blocked by a job that did not run.Verification
The push that added the second commit to this branch is a
synchronizeevent. Under the new configuration it started no run — that is the change working.🤖 Generated with Claude Code