fix(ci): release-plz manages only the API client; deploy every push again - #545
Open
passcod wants to merge 1 commit into
Open
fix(ci): release-plz manages only the API client; deploy every push again#545passcod wants to merge 1 commit into
passcod wants to merge 1 commit into
Conversation
…gain release-plz's release command ignores any package whose manifest says `publish = false`, whatever `git_only` says. Every canopy crate is private, so the canopy track never tagged anything and the deploy hanging off those tags never fired — which is how 1.0.0 reached crates.io while canopy itself was neither tagged nor deployed. Making the crates visible to release-plz would mean making them packageable: a version requirement on all 32 intra-workspace path dependencies, and `cargo package` building nine more crates on every release-PR run. So the two tracks stop sharing a tool. `bes-canopy-api` depends on nothing in the workspace, so it becomes a cargo project of its own and release-plz manages that alone. Canopy goes back to the model it had before: cd.yml deploys every push to main, tagging the image by commit. Gating that again is open work, recorded on a card. Leaving the workspace also puts the crate out of reach of every workspace-wide cargo command, so `check-api-crate` and a CI job run fmt, clippy and its tests over it, dependabot gets a second cargo entry, and `gen-api` keeps its lockfile in step with the version it stamps. The nine canopy 1.0.0 tags stay as they are: release-plz no longer looks at the workspace, so the tree they point at is never packaged again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Supersedes #544, which is now redundant — this rewrites
release-plz.tomlwholesale.Why the canopy track never worked
release-plz's
releasecommand ignores any package whoseCargo.tomlsayspublish = false, whatevergit_onlysays. Every canopy crate is private, so none was ever tagged and the deploy gated on those tags never fired — which is howbes-canopy-api1.0.0 reached crates.io while canopy itself was neither tagged nor deployed.Verified against release-plz 0.3.161, the version CI runs. With the workspace uniformly private and
bes-canopy-apiexcluded,releasereportsnothing to release; removingpublish = falsefrom just two crates in that same tree makes it offer to tag exactly those two. The docs claimpublish = false"will continue creating git tags", so this looks like an upstream bug worth reporting.Making the crates visible is not a config tweak.
publish = falseis what lets this workspace use barepathdependencies: once a crate is packageable,cargo packageverifies its manifest and demands a version on all 32 intra-workspace path deps, andcargo package --workspacethen builds nine more crates on every release-PR run. A registry allow-list (publish = ["..."]) fails earlier still — cargo rejects the workspace with--registry is required because not all package.publish settings agree.What this does instead
The two tracks stop sharing a tool.
bes-canopy-apidepends on nothing in the workspace, so it becomes a cargo project of its own and release-plz manages that alone, viamanifest_pathon both jobs. Canopy returns to the model it had before the release pipeline:cd.ymltriggers on push to main and tags the imagesha-<short>, exactly as it did at39751dee8^.This also fixes
main, which currently fails the release-PR job on every push: release-plz worktrees the last tag and runscargo package --allow-dirty --workspacethere, and the nine*-v1.0.0tags point at a tree cargo rejects. Confirmed with those tags present thatrelease-plz updateagainst the split project runs clean and proposes onlybes-canopy-api: 1.0.0 -> 1.0.1. No tag deletion or force-push is needed — release-plz never looks at the workspace again.Consequences handled
Leaving the workspace puts the crate out of reach of every workspace-wide cargo command, so
just check-api-crateruns fmt, clippy and its tests over it from a new CI job, wired intoTests pass. Dependabot gets a second cargo entry — without it the one crate with outside consumers would stop getting updates.gen-apiandcheck-generatednow keepcrates/canopy-api/Cargo.lockin step with the version they stamp. And.gitignorepicks up the new project'starget/, which the root-anchored/targetdid not cover.Gating the deploy again is deliberately not attempted here; card raised separately.