Upgrade and compatibility#
This page says what the version 1 API promises, how the server, client and MCP package versions pair, and the order of an upgrade. It covers what the repository’s code and deployment files support. Site procedures, such as change windows and rollback plans, are yours to add.
Prerequisites#
Operator access to the host that runs the server. Schema changes and restores are host-local administration.
A recent verified backup (Host-local administration).
What /v1 promises#
The REST API is versioned in its path. The contract is contracts/openapi/v1.json. A
change to it must pass contracts/tools/check-openapi-compatibility.py, which compares
the old and new documents (Regenerate contracts). The check treats these as
breaking:
Area |
Breaking change |
|---|---|
Paths and operations |
A path or an operation is removed |
Parameters |
A parameter is removed, or becomes required, or its schema narrows |
Request body |
The body becomes required, a media type is removed, a new field becomes required, an enum value is no longer accepted, a limit is tightened, or extra properties are no longer accepted |
Success responses |
A 2xx response or its media type is removed |
Response fields |
A field is removed, a guaranteed field is no longer guaranteed, a type changes, an enum may return new values, or a limit is loosened |
New response properties |
A new property in a response object, unless a reviewed exception lists it |
The last row means strict clients keep working: a response does not gain properties
silently. Reviewed additions, such as the endpoints.mcp field in discovery, are listed in
the tool. A media operation that declares a new major version in its
x-geonemo-media-contract-version extension may change its response. A reviewed,
intentional break is recorded in contracts/openapi/direct-inference-api-transition.json.
The check covers the REST contract. The MCP tool list is held in
contracts/mcp/tools-v1.json and compared with a live server by a deployment test.
Versions#
Package |
Where the version is set |
Current |
|---|---|---|
GeoNeMo server ( |
|
0.2.0 |
Typed client ( |
|
0.3.0 |
MCP package ( |
|
0.2.0 |
The packages are versioned separately (Release notes). The pairs that the packages enforce are:
Package |
Requires |
|---|---|
|
|
|
|
A geonemo-client release outside >=0.3.0,<0.4 does not satisfy geonemo-mcp, so
upgrade the two together when the client’s minor version changes.
Discovery reports the server version and the API version, v1. Read them before and
after an upgrade:
from geonemo.client import GeoNeMoClient
with GeoNeMoClient("https://geonemo.example.com") as client:
document = client.discover()
print(document.server_version, document.api_version)
Pass token= when you do not use a saved geonemo login (Use the Python client).
What a schema upgrade does#
geonemo-services database migrate applies the service-owned schemas to databases that
already exist. It does not create the databases or roles. The commands run only on the
host (Host-local administration).
Command |
Effect |
|---|---|
|
Applies the idempotent schemas, core first, then each part in order. Do not run it against serving writers |
|
Verifies that each installed schema matches the live-compatible baseline, then applies only additive changes that are safe with writers running. |
It prints a JSON summary with the schemas that it applied and the mode, administration or
online. Use the database-admin service in Compose, which holds the migrator
credentials and does not start with the stack.
GKB projections#
The knowledge base projections in PostgreSQL are rebuildable. The canonical Markdown root
is the source of truth, with one writer set per root. An upgrade must not change or move
the canonical root. If a projection is wrong after an upgrade, rebuild it from the
Markdown with geonemo-services gkb reconcile --rebuild-empty-catalog. The steps are in
Host-local administration. The command refuses a projection database that is not empty.
Upgrade steps#
Read the release notes (Release notes).
Check the parts list.
geonemo-services parts check --file deploy/production/parts.yamlvalidates it against the new image (Choose the parts).Back up the PostgreSQL databases and the canonical GKB root. Verify the backup offline. See Host-local administration.
Build or pull the new server image. Record its digest. Deploy by digest, not by tag (Production checklist).
Render and validate the Compose files with the new image (Compose files).
Run
geonemo-services database migratethroughdatabase-admin, before you start the new release (Compose files).Start the new release with the recorded digest.
Check
GET /v1/health/readyandGET /v1/discovery(Observe the server). Confirm the server version and that readiness isready.Upgrade the clients that call the server, within the version pairs above.
Destructive administration stays host-local. Restore, reset, reconciliation and deletion are commands that an operator runs after reviewing the exact change. No API route or MCP tool runs them.
Result#
The server runs the new image, the schemas match it, readiness is ready, and discovery
reports the new server version with API version v1.