Skip to content

Filter nightly builds by finished state to avoid picking up concurren…#18739

Open
SanabriaRusso wants to merge 2 commits intodkijania/nightly-promoter-pipelinefrom
fix/nightly-promoter-review-fixes
Open

Filter nightly builds by finished state to avoid picking up concurren…#18739
SanabriaRusso wants to merge 2 commits intodkijania/nightly-promoter-pipelinefrom
fix/nightly-promoter-review-fixes

Conversation

@SanabriaRusso
Copy link
Copy Markdown
Member

@SanabriaRusso SanabriaRusso commented Apr 8, 2026

Filter nightly builds by finished state to avoid picking up concurrent runs

When the nightly promoter runs while a new nightly build is in progress, the unfiltered ListBuilds call picks up the running build and fails with a confusing "jobs still running" error. Filter for passed/failed builds so we always promote the latest completed nightly. We include "failed" because the existing checkPackageJobs logic already inspects individual Debian/Docker job states — a build marked failed may still have all packaging jobs passed.

dkijania and others added 2 commits April 7, 2026 08:07
Replace the tear-down-based AutoPromoteNightly job with a standalone
pipeline that runs independently after nightly builds complete. The
nightly-promoter Go binary queries the Buildkite API for the latest
build, verifies all Debian/Docker packaging jobs passed, computes
source/target versions from git, and calls manager.sh to publish
both Debian packages and Docker images.

Architecture:
- Single Buildkite step with three commands sharing the same agent
- Go binary built inside Docker (minaToolchain has Go)
- Debian publish inside Docker (needs GPG, deb-s3, AWS creds)
- Docker publish on host (needs Docker daemon)
- API auth via BUILDKITE_AGENT_WRITE_TOKEN (same as hardfork runner)

New files:
- buildkite/src/Entrypoints/PromoteNightly.dhall
- buildkite/scripts/entrypoints/run-nightly-promoter.sh
- buildkite/scripts/pipeline/cmd/nightly-promoter/main.go
- buildkite/scripts/pipeline/cmd/hardfork-runner/main.go
- buildkite/scripts/pipeline/internal/{bk,gcs}/

Removed:
- buildkite/src/Jobs/Promote/AutoPromoteNightly.dhall
- buildkite/scripts/pipeline/run-hardfork-pipeline.go

Also refactors Publish.dhall for readability (no functional changes)
and restructures Go pipeline tools into multi-binary layout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t runs

  When the nightly promoter runs while a new nightly build is in progress,
  the unfiltered ListBuilds call picks up the running build and fails with
  a confusing 'jobs still running' error. Filter for passed/failed builds
  so we always promote the latest completed nightly. We include 'failed'
  because the existing checkPackageJobs logic already inspects individual
  Debian/Docker job states — a build marked failed may still have all
  packaging jobs passed.
@SanabriaRusso SanabriaRusso self-assigned this Apr 8, 2026
@github-project-automation github-project-automation bot moved this to To triage in Mesa Triage Apr 8, 2026
@SanabriaRusso SanabriaRusso requested a review from dkijania April 8, 2026 10:36
@SanabriaRusso SanabriaRusso marked this pull request as ready for review April 8, 2026 10:36
@SanabriaRusso SanabriaRusso requested review from dkijania and removed request for dkijania April 8, 2026 10:38
@SanabriaRusso
Copy link
Copy Markdown
Member Author

!ci-build-me

@dkijania dkijania force-pushed the dkijania/nightly-promoter-pipeline branch 4 times, most recently from 197c7eb to a62bf35 Compare April 9, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants