From 3a578a3674445e760857eba3bc05fb938b889a42 Mon Sep 17 00:00:00 2001 From: Jacob Repp Date: Sun, 19 Oct 2025 12:21:34 -0700 Subject: [PATCH] Fix release pipeline by adding protobuf code generation job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User request: "the release is already failing let's make sure we're on a clean branch so we get any release test fixes into a pr" Issue: Release workflow failed because Go binaries tried to build without generated protobuf code. Errors showed missing packages: - github.com/jrepp/prism-data-layer/pkg/plugin/gen/prism/launcher - github.com/jrepp/prism-data-layer/pkg/plugin/gen/prism Root cause: Release workflow lacked protobuf generation step that exists in CI workflow. All Go services and Rust proxy depend on generated proto code in pkg/plugin/gen/. Fix: 1. Add generate-proto job at beginning of workflow - Installs protoc, protoc-gen-go, and buf - Runs `make proto-go` to generate code - Uploads generated code as artifact 2. Make build-binaries and build-proxy depend on generate-proto 3. Add download-artifact step in both build jobs to retrieve generated proto code This mirrors the CI workflow pattern where proto generation happens once and artifacts are shared across all build jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/release.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec0cfb6d0..6ad5aeac0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,49 @@ env: IMAGE_PREFIX: ${{ github.repository }} jobs: + # ============================================================================ + # Job 0: Generate protobuf code (required by all builds) + # ============================================================================ + generate-proto: + name: Generate Protobuf Code + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.21' + + - name: Setup protoc + uses: arduino/setup-protoc@v3 + with: + version: '25.x' + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install protoc-gen-go + run: | + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + + - name: Install buf + uses: bufbuild/buf-setup-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate protobuf code + run: make proto-go + + - name: Upload generated proto code + uses: actions/upload-artifact@v4 + with: + name: proto-generated + path: pkg/plugin/gen/ + retention-days: 1 + # ============================================================================ # Job 1: Build release and debug binaries for all platforms # ============================================================================ @@ -38,6 +81,7 @@ jobs: name: Build Binaries (${{ matrix.service }}-${{ matrix.os }}-${{ matrix.arch }}) runs-on: ${{ matrix.runner }} timeout-minutes: 20 + needs: generate-proto strategy: fail-fast: false @@ -63,6 +107,12 @@ jobs: with: fetch-depth: 0 # Full history for version info + - name: Download generated proto code + uses: actions/download-artifact@v4 + with: + name: proto-generated + path: pkg/plugin/gen/ + - name: Setup Go uses: actions/setup-go@v5 with: @@ -186,6 +236,7 @@ jobs: name: Build Rust Proxy (${{ matrix.target }}) runs-on: ${{ matrix.runner }} timeout-minutes: 30 + needs: generate-proto strategy: fail-fast: false @@ -214,6 +265,12 @@ jobs: with: fetch-depth: 0 + - name: Download generated proto code + uses: actions/download-artifact@v4 + with: + name: proto-generated + path: pkg/plugin/gen/ + - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: