fix(release): opt the unreleased crates out of publishing in release-plz.toml - #1021
Conversation
…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
|
freshtonic
left a comment
There was a problem hiding this comment.
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.
|
Correction to my review: the EQL job in |
There was a problem hiding this comment.
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.
This PR fixes the crates release configuration, so that release-plz can run. release-plz is the tool that publishes
stack-authandstack-profileto 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: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.tomlsetspublish = truein its[workspace]table. release-plz applies that setting to every package that does not set its own. Seven workspace members, such asstack-kms, saypublish = falsein 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 = falseinrelease-plz.toml, beside itsrelease = false.stack-authandstack-profilekeep the workspace setting, and still publish.A new test in
scripts/__tests__/release-plz-root-config.test.mjschecks this. Every workspace member withpublish = falsein its Cargo.toml must also havepublish = falsehere. The test fails on the old file.How it was checked
release-plz release --dry-runreportsstack-profile 0.42.3: already publishedandstack-auth 0.42.3: already published, and does nothing else. Onmain, it fails with the error above.stack-profile0.43.0 first.stack-auth0.43.0 then fails to package, becausestack-profile0.43.0 is not yet on crates.io. Only a dry run hits this. A real run publishesstack-profilefirst, thenstack-auth.pnpm test:scriptspasses 1,146 tests, andpnpm run code:checkpasses.What happens when this merges
This PR edits
release-plz.toml, so merging it startsrelease-plz.ymlagain. 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