Skip to content

fix(release): opt the unreleased crates out of publishing in release-plz.toml - #1021

Merged
auxesis merged 1 commit into
mainfrom
fix/release-plz-publish-false
Oct 2, 2026
Merged

auxesis merged 1 commit into
mainfrom
fix/release-plz-publish-false

Conversation

@auxesis

@auxesis auxesis commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the crates release configuration, so that release-plz can run. release-plz is the tool that publishes stack-auth and stack-profile to crates.io. Without this fix, the crates release in #1010 fails before it publishes anything.

It is part of today's freeze for the stack crates import (Linear issue CIP-4274).

The first release run after PR E failed

Merging PR E, #1009, started release-plz.yml. Its job "Release stack-auth and stack-profile" failed in run 37065978124:

Package stack-kms has publish = false or publish = [] in the Cargo.toml, but it has publish = true in the release-plz configuration.

release-plz checks its configuration before it publishes, so nothing was published. Both crates are still at 0.42.3 on crates.io.

Why release-plz refused to run

release-plz.toml sets publish = true in its [workspace] table. release-plz applies that setting to every package that does not set its own. Seven workspace members, such as stack-kms, say publish = false in their Cargo.toml. release-plz stops when its configuration says a package publishes and the package's Cargo.toml says it does not.

The release job had never run before PR E. Until then, the freeze stopped it before it reached release-plz.

The fix

Each of the seven members now repeats publish = false in release-plz.toml, beside its release = false. stack-auth and stack-profile keep the workspace setting, and still publish.

A new test in scripts/__tests__/release-plz-root-config.test.mjs checks this. Every workspace member with publish = false in its Cargo.toml must also have publish = false here. The test fails on the old file.

How it was checked

  • On this branch, release-plz release --dry-run reports stack-profile 0.42.3: already published and stack-auth 0.42.3: already published, and does nothing else. On main, it fails with the error above.
  • On chore(release): stack-auth and stack-profile 0.43.0 #1010 merged with this branch, the same dry run passes the configuration check, and packages stack-profile 0.43.0 first. stack-auth 0.43.0 then fails to package, because stack-profile 0.43.0 is not yet on crates.io. Only a dry run hits this. A real run publishes stack-profile first, then stack-auth.
  • pnpm test:scripts passes 1,146 tests, and pnpm run code:check passes.
  • This branch merges with chore(release): stack-auth and stack-profile 0.43.0 #1010 with no conflicts.

What happens when this merges

This PR edits release-plz.toml, so merging it starts release-plz.yml again. Its job "Release stack-auth and stack-profile" should pass, and should find both crates at 0.42.3 already published. After that, #1010 can merge and publish 0.43.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PaY5xYydZUWhv8Nex9Sw8a

…plz.toml

The first release-crates run after #1009 failed before publishing anything:

    Package `stack-kms` has `publish = false` or `publish = []` in the
    Cargo.toml, but it has `publish = true` in the release-plz configuration.

The workspace table sets `publish = true`, and release-plz applies it to
every package that does not set its own, including the seven members whose
Cargo.toml says `publish = false`. Each of those now repeats
`publish = false` beside its `release = false`.

`release-plz release --dry-run` on this commit reports stack-auth and
stack-profile 0.42.3 as already published, and does nothing else. A new
test in release-plz-root-config.test.mjs fails on the old file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PaY5xYydZUWhv8Nex9Sw8a
@auxesis
auxesis requested a review from a team as a code owner October 2, 2026 21:22
@changeset-bot

changeset-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 739cee3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@freshtonic freshtonic left a comment

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.

The fix is correct and small. The seven release = false members now also set publish = false, so the release-plz configuration agrees with each Cargo.toml. The new test reads the members from the root Cargo.toml, so it also covers a member added later. It also checks that stack-auth and stack-profile still publish. A changeset is not necessary: this changes only the crate release configuration, and Changesets does not version these crates. CI passes.

Non-blocking follow-up: packages/eql/release-plz.toml has the same shape. It sets publish = true in [workspace]. eql-domains, eql-codegen, eql-tests-macros and tests/sqlx set publish = false in their Cargo.toml, and that file has no [[package]] entry for them. Its header (and the comments in those Cargo.toml files) say "release-plz skips it automatically". The run in this PR shows that release-plz applies the workspace publish = true to a member that does not override it. If release-plz also does this for a member with no [[package]] entry, the release-eql-crate job will fail in the same way at the Phase-5 cutover. It uses the same release-plz/action pin. That job is behind eql-armed, so it has not run in this repository, and nothing shows the problem today. Before the cutover, run release-plz release --dry-run --manifest-path packages/eql/Cargo.toml --config packages/eql/release-plz.toml. If it fails, apply the same fix there, and correct the header comment.

@freshtonic

Copy link
Copy Markdown
Contributor

Correction to my review: the EQL job in .github/workflows/release-plz.yml is release (name "Release"), not release-eql-crate. The rest of the note is unchanged.

Copilot AI left a comment

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.

Copilot review overview

🟢 Approval recommended

The targeted overrides resolve the configuration conflict, preserve intended publishing, and include regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes release-plz configuration so unpublished workspace members no longer block releases of stack-auth and stack-profile, enabling the planned release in #1010.

Changes:

  • Explicitly disables publishing for seven unpublished workspace members.
  • Adds regression coverage while preserving publishing for both released crates.
File Description
scripts/​__tests__/​release-plz-root-config.test.mjs Checks publishing settings against workspace members.
release-plz.toml Adds seven publishing opt-outs and explains why they are required.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@auxesis
auxesis merged commit 348f8b8 into main Oct 2, 2026
27 checks passed
@auxesis
auxesis deleted the fix/release-plz-publish-false branch October 2, 2026 21:46
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.

4 participants