Skip to content

Support multi-package releases#64

Merged
David Elner (delner) merged 1 commit into
mainfrom
release_multi_package
Jul 24, 2026
Merged

Support multi-package releases#64
David Elner (delner) merged 1 commit into
mainfrom
release_multi_package

Conversation

@delner

Copy link
Copy Markdown
Collaborator

This pull request attempts to simplify the mechanics for multi-package release workflows by:

  1. Reducing the number of jobs required to prepare a package (merge of configure and prepare)
  2. The ability to produce/consume package manifests (JSON metadata that describes what's being released) in various actions.
  3. Allow request-approval to enumerate multiple packages in its descriptions/messaging (via package manifest)
  4. Add idempotent behavior when one package in a multi-package workflow fails (allow for self-healing/rerunning the same version without republishing existing versions)

In sum, this should make it easier to build and deploy release workflows for repositories that need to release multiple packages in a single workflow.

@delner

Copy link
Copy Markdown
Collaborator Author

This is a pre-requisite for braintrustdata/autoevals#204 and may also be beneficial for braintrustdata/braintrust-sdk-javascript#2216

set -euo pipefail
if [ -n "$PACKAGES" ]; then
# Accept a bare array of entries or a {"packages":[…]} wrapper.
M="$(jq -c 'if type=="array" then {packages: .} elif .packages then {packages: .packages} else {packages: []} end' <<<"$PACKAGES")"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just make this very strict from the get-go. We don't have any consumers yet. Ie just accept {"packages":[…]} - no top level array.

Also, I would fail in case there is an invalid manifest instead of defaulting to an empty array.

@@ -1,67 +0,0 @@
name: Prepare Release

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to update a bunch of comments in the codebase referencing this step. eg grep for "from prepare"

description: "Fail if the version is already published to the registry"
description: "Fail if the version is already published to the registry (judges configure's already_published)"
required: false
default: 'true'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this defaulting to true in direct conflict with already_publihsed being 1?

Since they both do different things, "Does this version exist?" vs "Should we make it fail?". One thought I had to fix this maybe would be to combine them into one thing: "fail" or "skip"?

I personally would even gravitate towards entirely removing it and always just using skip. I don't see myself ever wanting to fail an entire manifest when one package publish fails I think.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally would even gravitate towards entirely removing it and always just using skip. I don't see myself ever wanting to fail an entire manifest when one package publish fails I think.

I think this makes sense in a multi-package workflow (allows self-healing by default), but the default case here is single package workflow where failing prevents a superfluous ping for approval for a release that isn't going to do anything anyways. I lean towards keeping this as is.

@delner
David Elner (delner) merged commit 337c547 into main Jul 24, 2026
38 checks passed
@delner
David Elner (delner) deleted the release_multi_package branch July 24, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants