Merge branch 'fix/cli-39-version-train'
# Conflicts: # archreview/2026-07-12/remediation/00-tracking.md
This commit is contained in:
@@ -32,6 +32,73 @@ $env:MXGATEWAY_TEST_ITEM = 'TestObject.TestInt'
|
||||
Use plaintext only for a local gateway. Use TLS when the gateway crosses a
|
||||
machine boundary or uses a production certificate.
|
||||
|
||||
## Versioning
|
||||
|
||||
Every client's version lives in its own manifest: `clients/rust/Cargo.toml`
|
||||
(`[package]` and `[workspace.package]`, both must match — `crates/mxgw-cli`
|
||||
inherits via `version.workspace = true`), `clients/python/pyproject.toml`
|
||||
(`[project].version`) and `clients/python/src/zb_mom_ww_mxgateway/version.py`
|
||||
(`__version__`, must match `pyproject.toml`), `clients/go/mxgateway/version.go`
|
||||
(`ClientVersion`), `clients/dotnet/ZB.MOM.WW.MxGateway.Client/ZB.MOM.WW.MxGateway.Client.csproj`
|
||||
(`<Version>`), and `clients/java/build.gradle` (`subprojects { version = ... }`,
|
||||
mirrored by the hand-maintained `MxGatewayClientVersion.CLIENT_VERSION`
|
||||
constant — the two have drifted before and there is no build-time link
|
||||
between them, so bump both together).
|
||||
|
||||
`src/ZB.MOM.WW.MxGateway.Contracts/ZB.MOM.WW.MxGateway.Contracts.csproj`
|
||||
(`<Version>`) is a fifth, easy-to-miss manifest: it is not itself a
|
||||
language client, but `Invoke-PackDotnet` in `scripts/pack-clients.ps1`
|
||||
packs and publishes it in lockstep with the .NET Client (both
|
||||
`ZB.MOM.WW.MxGateway.*` nupkgs go through the same `-Publish` loop), and
|
||||
Contracts and the .NET Client have always released at the same version.
|
||||
Bump Contracts' `<Version>` alongside the .NET Client's — leaving it behind
|
||||
means the next `-Publish` packs a stale Contracts version, the collision
|
||||
guard below correctly refuses to re-publish it, and the loop aborts
|
||||
mid-way with the Client possibly already pushed (nupkgs are enumerated
|
||||
alphabetically, and `Client` sorts before `Contracts`). This is distinct
|
||||
from `src/Directory.Build.props`'s repo-wide `<Version>` default, which
|
||||
stamps the Server/Worker/test assemblies and is not part of the published
|
||||
client package set — see the comment there.
|
||||
|
||||
**Bump the version before every publish, never after.** A Gitea package feed
|
||||
rejects re-uploading an existing name+version, and `scripts/pack-clients.ps1`
|
||||
enforces this before it ever attempts a push: each per-language `-Publish`
|
||||
step queries the Gitea package API
|
||||
(`GET /api/v1/packages/dohertj2/{type}/{name}/{version}`) for the version
|
||||
about to be published and aborts with a clear error if it already exists —
|
||||
the script never force-overwrites a published artifact. `scripts/tag-go-module.ps1`
|
||||
carries the equivalent guard for the Go module: it refuses to create a
|
||||
`clients/go/vX.Y.Z` tag unless `clients/go/mxgateway/version.go`'s
|
||||
`ClientVersion` already equals `X.Y.Z` (CLI-21/CLI-39), so a forgotten
|
||||
version bump fails the tag instead of shipping a mismatched module.
|
||||
|
||||
As of 2026-08-07 (CLI-39) all five clients — plus `ZB.MOM.WW.MxGateway.Contracts`,
|
||||
which releases in lockstep with the .NET Client — moved to **0.2.0**,
|
||||
converging on one number after four of the five had drifted onto the
|
||||
*already-published* 0.1.2/0.1.1 while their public APIs kept changing
|
||||
underneath it (see `archreview/2026-07-12/remediation/50-clients.md` CLI-39).
|
||||
A code-review follow-up on the same branch caught that the initial CLI-39
|
||||
pass bumped the .NET Client but left `Contracts.csproj` at 0.1.2 — since
|
||||
both publish through the same `Invoke-PackDotnet` `-Publish` loop, that
|
||||
would have made the very next `.NET` publish abort on the new collision
|
||||
guard partway through (Client already pushed, Contracts refused as a
|
||||
re-publish of the already-published 0.1.2). Fixed in the same branch.
|
||||
Verified against the live Gitea package API at that time: `nuget` had
|
||||
`ZB.MOM.WW.MxGateway.Client` and `.Contracts` published through 0.1.2; `pypi` (`zb-mom-ww-mxaccess-gateway-client`)
|
||||
and `cargo` (`zb-mom-ww-mxgateway-client`) had only reached 0.1.1 despite their
|
||||
source pinning 0.1.2; **`maven`
|
||||
(`com.zb.mom.ww.mxgateway:zb-mom-ww-mxgateway-client`) had already published
|
||||
0.2.0 on 2026-06-26** — before the CLI-37/38/40/41 conformance fixes changed
|
||||
the client's observable behavior (`category`-based status validation,
|
||||
`hresult < 0`, exact-secret redaction, typed malformed-reply errors). Reusing
|
||||
0.2.0 for the conformant Java build would have labeled two different APIs
|
||||
with the same coordinate, so **Java is the one exception: it shipped as
|
||||
0.2.1**, not 0.2.0. Operators publishing a future release must re-check the
|
||||
target version against the live registry before assuming any of these
|
||||
numbers are still unclaimed — the guards above do this automatically at
|
||||
publish time, but a version bump in the source is still a manual step per
|
||||
client.
|
||||
|
||||
## .NET
|
||||
|
||||
The .NET client uses .NET 10 and references
|
||||
|
||||
Reference in New Issue
Block a user