Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
build-broker:
name: Build broker (${{ matrix.target }})
runs-on: ${{ matrix.os }}
if: github.event.inputs.package == 'all' || github.event.inputs.package == 'main'
if: github.event.inputs.package == 'all' || github.event.inputs.package == 'main' || github.event.inputs.package == 'sdk'
strategy:
matrix:
include:
Expand Down Expand Up @@ -430,7 +430,7 @@ jobs:
# Publish all packages in parallel (npm publish doesn't need deps published first)
publish-packages:
name: Publish ${{ matrix.package }}
needs: build
needs: [build, build-broker]
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.

🔴 Adding build-broker to publish-packages needs blocks all non-SDK package publishes if broker build fails

When package == 'all', the publish-packages job publishes 10 packages in parallel (policy, memory, utils, trajectory, hooks, user-directory, config, sdk, telemetry, acp-bridge). By changing needs: build to needs: [build, build-broker], if the Rust broker build fails for any reason, all package publishes are blocked — not just the SDK.

Root Cause and Impact

In GitHub Actions, when any job in the needs list fails, the dependent job is skipped (unless it uses if: always()). Before this PR, publish-packages only depended on build, so a broker build failure would not block publishing non-SDK packages like policy, memory, utils, etc.

After this PR at .github/workflows/publish.yml:433:

publish-packages:
    needs: [build, build-broker]  # NEW: added build-broker
    if: github.event.inputs.package == 'all'

Only the sdk matrix entry actually needs the broker binaries (lines 469-479 correctly guard the download with if: matrix.package == 'sdk'). But the job-level needs dependency means a broker build failure (e.g., Rust compilation error, cross-compilation toolchain issue) will prevent publishing all 10 packages, including those completely unrelated to the broker.

Impact: A transient Rust/broker build failure during an all publish would block the entire release pipeline for packages that have no dependency on the broker.

Prompt for agents
In .github/workflows/publish.yml, the publish-packages job at line 433 should revert to `needs: build` (removing `build-broker` from the needs list). Instead, the broker binary download steps at lines 469-479 should handle the case where broker artifacts might not be ready by either: (1) Making the SDK publish a separate job (like publish-sdk-only already exists), or (2) Using a conditional approach where the SDK matrix entry has its own dependency. The simplest fix is to revert line 433 to `needs: build` and instead ensure the SDK package in the publish-packages matrix is handled by the existing publish-sdk-only job (i.e., remove 'sdk' from the publish-packages matrix at line 449, since publish-sdk-only already handles it when package=='sdk'). However, since publish-packages only runs when package=='all', you need to decide: either keep sdk in the matrix and accept the broker dependency, or split it out. The cleanest approach is to revert needs to just `build` and add `if: always()` style logic, or remove sdk from the publish-packages matrix and have publish-sdk-only also trigger on package=='all'.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

runs-on: ubuntu-latest
if: github.event.inputs.package == 'all'
strategy:
Expand Down Expand Up @@ -466,6 +466,18 @@ jobs:
name: build-output
path: .

- name: Download broker binaries (SDK only)
if: matrix.package == 'sdk'
uses: actions/download-artifact@v4
with:
pattern: agent-relay-broker-*
path: packages/sdk/bin/
merge-multiple: true

- name: Make broker binaries executable (SDK only)
if: matrix.package == 'sdk'
run: chmod +x packages/sdk/bin/agent-relay-broker-*

- name: Update npm for OIDC support
run: npm install -g npm@latest

Expand Down
Loading