Skip to content

Set PREFLIGHT env var on preflight builds, keep BUILDKITE_PREFLIGHT as deprecated#761

Merged
mcncl merged 1 commit intomainfrom
preflight-env-var
Apr 7, 2026
Merged

Set PREFLIGHT env var on preflight builds, keep BUILDKITE_PREFLIGHT as deprecated#761
mcncl merged 1 commit intomainfrom
preflight-env-var

Conversation

@pda
Copy link
Copy Markdown
Member

@pda pda commented Apr 7, 2026

Description

Preflight builds now set PREFLIGHT=true as the canonical env var for consumers to detect preflight builds. BUILDKITE_PREFLIGHT=true is kept for backwards compatibility but marked as deprecated, giving consumers time to migrate.

Context: BUILDKITE_* env vars can't be used in certain contexts, so we need a non-prefixed alternative.

Slack thread: https://buildkite-corp.slack.com/archives/C0AENNRSHRC/p1775525473953539?thread_ts=1775525370.757629&cid=C0AENNRSHRC

Changes

  • Set both PREFLIGHT=true and BUILDKITE_PREFLIGHT=true (deprecated) in preflight build env
  • Updated tests to assert both env vars are present

Testing

  • Tests have run locally (with go test ./...)
  • Code is formatted (with go fmt ./...)

Disclosures / Credits

  • Amp wrote the implementation and tests under direction.

Related

  • Resolves TE-5528

…s deprecated

Preflight builds now set PREFLIGHT=true as the canonical env var.
BUILDKITE_PREFLIGHT=true is kept for backwards compatibility but
marked as deprecated, giving consumers time to migrate.

Context: https://buildkite-corp.slack.com/archives/C0AENNRSHRC/p1775525473953539?thread_ts=1775525370.757629&cid=C0AENNRSHRC
Amp-Thread-ID: https://ampcode.com/threads/T-019d6590-f6ee-753f-acc2-1051ceb058ab
Co-authored-by: Amp <amp@ampcode.com>
@pda pda requested review from a team as code owners April 7, 2026 01:34
@mcncl mcncl merged commit 7539134 into main Apr 7, 2026
1 check passed
@mcncl mcncl deleted the preflight-env-var branch April 7, 2026 01:39
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