ci(release): publish the Rust client to crates.io from the core v* tag - #739
Merged
Merged
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…erence changes Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
6 tasks done
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ore-tag' into feature/release-rust-client-on-core-tag Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # .circleci/config.yml # docs/project/releasing.md # docs/project/roadmap.md
Base automatically changed from
feature/release-java-client-on-core-tag
to
develop
September 30, 2026 04:36
This was referenced Sep 30, 2026
Merged
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.
Stacked on #738 (base:
feature/release-java-client-on-core-tag). Merge #738 first; this PR then retargets todevelop.What and why
The Rust crate
opensysmlis now published the way the Python, Node and Java clients are: from the corev*tag, in the corereleaseworkflow, at the core's version. It replaces the maintainer-runcargo publishand theopensysml-rust-v*tag, which was never used. The nameopensysmlis free on crates.io.Version lock
client/rust/opensysml/Cargo.tomlis set to0.9.0, matching develop's_version.py; the release branch bumps it to 0.9.1.Cargo.lockchanges by one line, opensysml's version.opensysml-conformancekeeps its own version because it ispublish = false.check_version.py --rustreads the[package]version with a line scan, not tomllib, because Python 3.10 is still supported. It goes through the shared_client_version, so it uses the same SemVer→PEP 440 translation and exact-tag rule as--node/--java(0.9.0-rc.1↔0.9.0rc1). Aversion =in any other table doesn't count.--rustis added to the mutually exclusive group, andbuild-python-packageexportsRUST_VERSION.Cargo.lockopensysmlentry, which must name the Cargo.toml version.scripts/ci-changed-areas.sh: changes toclient/rust/opensysml/Cargo.tomlandclient/rust/Cargo.locknow run the Python suite. So do changes toeditors/cameo/pom.xmlandeditors/syson/backend/pom.xml, which fixes a gap an automated review found on ci(release): publish the Java client to Maven Central from the core v* tag #738: the Java consumer-reference test lives in the Python suite, but those poms didn't trigger it. Thecameo-only/syson-onlycases becamecameo-manifest/syson-backend-manifestand gainedpython; nothing else in any emit changed.publish-cratesjob (rust-executor,context: [crates.io]). The token isCARGO_REGISTRY_TOKENfrom the restricted org contextcrates.io. It requiresPublish GitHub releaseandRust client tests, and runs beside the other three registry jobs, independent of them.rust-testwas added to thereleaseworkflow; it builds its ownsysml-grpc.Publish GitHub releasenow also requires it.Everything that can fail runs before the upload:
CIRCLE_TAG. The version comes fromcargo pkgid(…#0.9.0→${pkgid##*[#@]}), and the tag must equalv<version>.CARGO_REGISTRY_TOKENmust be non-empty; only its name is printed.GET https://crates.io/api/v1/crates/opensysml/<version>with a User-Agent header, which crates.io requires. 200 → refuse (a version can only be yanked, never replaced); 404 → proceed; anything else → refuse rather than guess. I checked this live:serde/1.0.0returns 200 andopensysml/0.9.0returns 404.cargo package -p opensysml --lockedis the dry run.cargo publish -p opensysml --locked --no-verify. Step 4 already verified the package, and cargo reads the token from the environment, so nothing is written to disk.Pre-releases publish as ordinary crates.io versions; Cargo selects them only when a consumer names one exactly.
The
Maven Centralcontext forpublish-mavenlands in #738 and is merged into this branch; this PR adds only thecrates.iocontext.releasing.mdlists all four contexts (PyPI,npm,Maven Central,crates.io) that whoever pushes the tag must be allowed to use.Known limitation, unchanged here. The crate's auto-download verifies only against the digests pinned in its embedded
release-digests.json, which currently runs through v0.3.0. A published crate therefore cannot download thesysml-grpcbinary of its own release. It targets a running service or a binary it is pointed at ($OPENSYSML_GRPC_BINARY, thensysml-grpcon$PATH). The Rust docs now say so plainly.Docs.
releasing.md:crates.iocontext, token expiry, the version lockstep, the job's steps, pre-releases, yank-only immutability, and what can be rerun.cargo update -p opensysml, and the tagging text lists Cargo.toml among the files the tag must match.Also updated:
client/rust/README.md(opensysml = "0.9"plus the limitation),docs/guide/09-clients.md,docs/reference/rust-api.md, the root README and the roadmap. The changelog fragment ischanges/unreleased/rust-client-crates-release.added.md.How it was verified
cargo package -p opensysml --manifest-path client/rust/Cargo.toml --lockedis clean.OPENSYSML_REQUIRE_SERVICE=1 cargo test --workspacepasses against a localsysml-grpc.pytest tests/test_check_version.py tests/test_version.pypasses; no existing test was changed.bash scripts/ci-changed-areas-test.shpasses (33 cases).circleci config validate,python3 scripts/changelog.py check,python3 scripts/check-doc-links.py(0 broken),make docs-check,gofmt -l .andgo test ./tests/hygiene/...all pass.cargo publishwas never run in any form, and nothing was published.Checklist
make testandmake lintpass locally (the affected suites above)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (no gate count moved)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/50e350d0913749039440892f390a0f90
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/50e350d0913749039440892f390a0f90?variant=devin
Requested by: @HuiJun