Skip to content

Build PR prototypes on demand - #841

Open
twstokes wants to merge 2 commits into
trunkfrom
twstokes/ainfra-3348-optional-prototype-builds
Open

twstokes wants to merge 2 commits into
trunkfrom
twstokes/ainfra-3348-optional-prototype-builds

Conversation

@twstokes

@twstokes twstokes commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Each push to a PR builds the Demo app on a Mac and uploads it to Firebase App Distribution, though few PRs need it. This PR builds and uploads the Demo on PRs only when someone asks: a Deploy Prototype Build? button in the Buildkite build. Part of AINFRA-3348, which frees up the mac queue. Pocket Casts iOS and Studio already work this way.

  • On trunk, the input is skipped, which Buildkite treats as satisfied, so the Demo still builds after every merge. Breakage in the Demo is caught there.
  • On PRs, Build Demo and the upload no longer post github_commit_status. Buildkite posted those statuses as pending as soon as the steps waited for the input, which left "Build Prototype" and "Publish Prototype" pending on every PR where nobody asked for a prototype. Build Demo still posts "Build Prototype" on trunk.
  • The pipeline has publish_blocked_as_pending = false, so a PR build whose button is never clicked reports passed and blocked (success) to GitHub, not pending.

Build Prototype is no longer a required status check on trunk; a repo admin removed it for this change. PRs no longer post that check, and they no longer check that the Demo app compiles. trunk still builds the Demo after every merge.

Testing Steps

  1. In this PR's Buildkite build, check that every step except Build Demo and the upload runs, that the build ends as passed and blocked, and that the PR shows no pending "Build Prototype" or "Publish Prototype" check.
  2. Click Deploy Prototype Build?, confirm, and check that the Demo builds and is uploaded.
  3. After merging, check that the trunk build runs Build Demo without a prompt and posts "Build Prototype".

🤖 Generated with Claude Code

Every push to a PR built a prototype, though few PRs need one. A
"Deploy Prototype Build?" input now gates the prototype step on PRs,
which frees CI agents (AINFRA-3348). The input sits in a group so that
it blocks only the prototype step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build Demo and the upload posted "Build Prototype" and "Publish
Prototype" as pending while they waited for the input, and left them
pending on every PR where nobody asked for a prototype. Build Demo keeps
its "Build Prototype" status on trunk, where it runs without the input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@twstokes
twstokes marked this pull request as ready for review October 16, 2026 14:55
@twstokes
twstokes requested a review from a team as a code owner October 16, 2026 14:55
Comment thread .buildkite/pipeline.yml
Comment on lines 89 to 91
notify:
- github_commit_status:
context: "Build Prototype"

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.

IIRC in the similar PR for another repo you removed the notify.github_commit_status from the step building the prototype on the justification that if you kept it it would be shown in GitHub PR's list of CI checks as pending. Which at the time made sense to me.

But looking at this PR, while the Prototype Build has not been triggered on it, while this step still has its notify block, I don't see any row for "Bulid Prototype" shown in there:

Image

So I'm guessing that we'd only see that step if Buildkite actually starts this "Build Demo", which will only happen if someone clicked on the "Deploy Prototype Build?" first, and if nobody triggered a prototype build then "Build Prototype" row will not appear as a CI check row on the PR in GitHub, right?

If that's indeed how this works, then I'd suggest we keep the notify: [ github_commit_status: { context: … } ] nodes when doing those PRs, so that if no Prototype Build is triggered nothing is shown but if one is triggered then at least the progress of building that PB shows up in the GitHub PR's status checks.

Comment thread .buildkite/pipeline.yml
Comment on lines -88 to -90
notify:
- github_commit_status:
context: "Publish Prototype"

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.

In particular, if my understanding from above is correct, we should probably not remove those 3 lines.

Easy to check, btw: restore those lines then look if the row appears on GitHub even if you don't trigger a Prototype Build.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants