Skip to content

chore(ci): drop the nightly E2E iOS and Android runs, rebuild only on request - #161

Merged
kherembourg merged 4 commits into
mainfrom
chore/e2e-ios-on-demand
Sep 16, 2026
Merged

kherembourg merged 4 commits into
mainfrom
chore/e2e-ios-on-demand

Conversation

@kherembourg

@kherembourg kherembourg commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

E2E iOS and E2E Android each 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 for E2E iOS over the period:

Repository cron everything else
Purchasely-Cordova 474 min 441 min
Purchasely-Flutter 433 min 562 min
Purchasely-ReactNative 324 min 380 min

The nightly is roughly half the macOS bill of that workflow, spent on a branch nobody touched. E2E Android runs on Linux with KVM, so it is far cheaper, but it is the same daily run with the same justification.

Changes

Both e2e-ios.yml and e2e-android.yml:

  • schedule removed.
  • pull_request no longer listens to synchronize: a push to an open pull request does not rebuild.
  • pull_request now listens to opened, reopened, ready_for_review and labeled.
  • Adding the run-ci label builds the current head. The first step removes the label again, because GitHub raises no labeled event for a label that is already present.
  • workflow_dispatch is unchanged.
gh pr edit <number> --add-label run-ci

The existing paths filters 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 main after merge. Everything they covered still runs when a pull request opens, and on demand — one merge-time run less. There is no branch protection on main in 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 synchronize event. Under the new configuration it started no run — that is the change working.

🤖 Generated with Claude Code

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>
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR is not safe to merge until repeat on-request runs are made functional for fork pull requests.

Fix All in Claude CodeFindings

  1. P1 Fork labels remain attached
Fix with agent prompt
### Issue 1
.github/workflows/e2e-ios.yml:62-64
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.
Summary

This PR reduces macOS CI consumption by removing the nightly iOS E2E schedule and automatic rebuilds on pull-request synchronization.

  • Runs automatically when a pull request opens, reopens, or becomes ready for review.
  • Adds run-ci label handling for requested rebuilds.
  • Retains manual workflow dispatch.
  • The label-consumption step cannot remove the label on fork pull requests, preventing repeat requested runs there.

Reviews (1) · Last reviewed commit: "chore(ci): drop the nightly E2E iOS run ..."

Comment on lines +62 to +64
GH_TOKEN: ${{ github.token }}
run: |
gh api -X DELETE \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 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.

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.

Fix in Claude Code Fix in Cursor Fix in Codex

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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>
@kherembourg kherembourg changed the title chore(ci): drop the nightly E2E iOS run, rebuild only on request chore(ci): drop the nightly E2E iOS and Android runs, rebuild only on request Sep 16, 2026
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>
@kherembourg kherembourg added the run-ci Trigger the E2E / CI build against the current PR head label Sep 16, 2026
@github-actions github-actions Bot removed the run-ci Trigger the E2E / CI build against the current PR head label Sep 16, 2026
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>
@kherembourg kherembourg added the run-ci Trigger the E2E / CI build against the current PR head label Sep 16, 2026
@github-actions github-actions Bot removed the run-ci Trigger the E2E / CI build against the current PR head label Sep 16, 2026
@kherembourg
kherembourg merged commit ff970c4 into main Sep 16, 2026
13 checks passed
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