Repository navigation
feat(scripts): publish the four Rust crates in pre-release candidates - #685
Merged
Merged
Conversation
…candidates # Conflicts: # tools/prerelease/candidates.md
…nd cargo's report
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.
What Changed
scripts/prerelease.mjsgains arustport (aliascargo, included in--only all). It publishesmetaobjects,metaobjects-render,metaobjects-codegenandmetaobjects-clito the private Gitea Cargo registry in crates.io release order, at1.3.0-rc.N. Before any ecosystem publishes, the run refuses a candidate number the registry already holds for any crate.scripts/lib/rust-release.mjsaddscandidateRustManifest, which pins each sibling-crate path dependency to the private registry for the publish. It also adds guardsassertCargoPublishTargetandassertCargoPublishOutput, which refuse anycargo publishnot bound to the private registry and check the registry cargo reports. The run removes crates.io token variables from cargo's environment. Manifests are restored on exit.docs/features/prerelease.mddocuments the Cargo registry setup for consumers and keeps the pinned-commit fallback for candidates before1.3.0-rc.6.tools/prerelease/candidates.md,tools/prerelease/estate-run.mdandscripts/prerelease-version.mjsare updated to the five-ecosystem candidate log.scripts/test-rust-release.mjscovers the new helpers.rc.6 crates on the private registry
The four
1.3.0-rc.6crates were published to the private registry from a clean checkout of94e4475ffa7d(only the two script files overlaid), with--only rust --iter 6. Nothing else was republished.Verification: a scratch Cargo project outside the repository depended on
metaobjects,metaobjects-renderandmetaobjects-codegenat=1.3.0-rc.6withregistry = "mo-prerelease".cargo buildsucceeded and all three resolved in its lockfile from the private sparse registry.cargo info metaobjects-cli@1.3.0-rc.6 --registry mo-prereleasedownloaded the fourth from the same registry. All four resolve from the private registry. The scratch project was deleted afterwards.The hosted
java (java-slow)failure on the first push was unrelated flakiness: Maven Central answered HTTP 429 while resolvingmaven-clean-plugin.Validation
Risk Assessment
✅ Low: Release-script change is additive and gated: explicit --registry, index env check, crates.io token stripped, manifests restored on exit, candidate number precheck. server/rust is unchanged since the rc.6 source commit, so the log row is accurate.
Testing
Changed behaviour is the Rust leg of the prerelease publisher. Live against a disposable local Gitea: dry run passed; a real --only rust publish put all four crates at 1.3.0-rc.1 on the private Cargo index in dependency order; the four crates answer 200 on the registry API; a repeat of the same iteration is refused; a consumer crate pins and resolves metaobjects from the private registry. Gates lane was red on a scripts/ typecheck error in the change; fixed and green locally (not a live scenario). Two lanes failed in the parallel --affected run and both passed when rerun alone. The full regression suite was not completed. Disposable Gitea torn down; the candidate-log row the publish wrote was reverted.
Evidence: Rust prerelease publish transcript
Evidence: Dry run transcript
Evidence: Registry lookup of the four crates (HTTP codes)
Evidence: Refused re-publish of the same iteration
Evidence: Consumer crate fetch from private registry
Evidence: Gates lane after typecheck fix
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
scripts/ci-local.sh --affected --strict-toolchainsnode scripts/test-rust-release.mjs (all rust-release checks pass)scripts/ci-local.sh --affected --strict-toolchains (first run: rust conformance and java-reactor failed under parallel load; reruns alone passed: scripts/ci-local.sh --only rust, cargo test --locked -p metaobjects-codegen --test api_contract, scripts/ci-local.sh --only java)scripts/ci-local.sh --only gates --strict-toolchains (first run: scripts/ typecheck TS7006 at scripts/lib/rust-release.mjs:215; fixed with JSDoc param type; rerun green)Disposable Gitea 1.27 via docker compose project mo-rustval-130 on 127.0.0.1:3941 (own container, own sqlite, torn down with down -v)node scripts/prerelease.mjs --only rust --dry-run (env MO_REGISTRY_BASE/OWNER/TOKEN only, no registry.env) -> cargo dry run passed, nothing publishednode scripts/prerelease.mjs --only rust -> Uploaded/Published metaobjects, metaobjects-render, metaobjects-codegen, metaobjects-cli at 1.3.0-rc.1 to registry mo-prerelease, in that order; manifests restoredAuthenticated GET /api/v1/packages/rustval/cargo/<crate>/1.3.0-rc.1 for all four crates -> 200node scripts/prerelease.mjs --only rust --iter 1 --dry-run -> refused: metaobjects@1.3.0-rc.1 already on the pre-release registryConsumer crate with metaobjects = { version = "=1.3.0-rc.1", registry = "mo-prerelease" } and CARGO_REGISTRIES_MO_PRERELEASE_INDEX set: cargo fetch resolves metaobjects 1.3.0-rc.1 with source sparse at the private indexNot run: full regression suite.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.