Public API changes
The breaking changes in each release of the public API, and how to move past them. The rules for what counts as breaking, and how the version responds, are in the stability policy.
There is one section per version, headed ## MAJOR.MINOR.PATCH. Each breaking change since the
previous release gets a bullet that names the name or route it affects (a Python name such as
ConnectorRegistry, a route such as GET /v1/status, or a Node Type directory such as
node-types/erp) and says how to migrate. The release check (python -m engine.release_check)
blocks a release whose breaking changes are not each named under the heading for the version in
pyproject.toml. A section with nothing breaking in it is allowed.
0.1.0
First release. Nothing breaks: there is no earlier release to break.
0.2.0
Nothing breaks. This release only adds to the public API: the offline configuration check
(check_candidate, preview_candidate, expand_source_keys and the report types they return) and the
POST /v1/config/check route.
0.3.0
Nothing breaks. This release only adds to the public API: the sign-off routes (GET /v1/signoffs,
GET /v1/signoffs/{record_id}, POST /v1/signoffs/{record_id}/resolve and
POST /v1/signoffs/{record_id}/edit-and-resubmit), the identity-match routes (GET /v1/identity-matches,
POST /v1/identity-matches/{match_id}/resolve and POST /v1/identity-matches/{match_id}/reopen), the
token_file field of GET /v1/status and the version field of its identity block.
0.4.0
Nothing breaks. This release only adds to the public API: the GET /v1/revocations route, behind the new
revocations scope, and the peer_revocations field of GET /v1/status.
The package now also ships a py.typed marker, so an integrator's type checker reads the annotations of the
declared names and holds their code to them. From this release a change to one of those annotations is
judged by the same rules as any other change to a signature or a field (see
the stability policy). Nothing in the declared surface changed its annotations in
this release.
0.5.0
One change to a covered command breaks scripts written for 0.4.0, and everything else only adds to the public API.
Breaking
-
python -m engine.management.tokens mint(anddeployment/mint_management_token.sh, which runs it) no longer mints a token with no expiry by default. A token now carries an expiry, so a mint must say when it ends. A mint with none of the three options below is refused, and nothing is written or logged.--no-expiryis also refused for a token with thesignoff,syncorcheckscope, which a person holds. To migrate, add one of:--expires-in 90d(any number of days) or--expires-at 2027-03-01T00:00:00+00:00to the mint command. An expiry is held toMANAGEMENT_TOKEN_MAX_LIFETIME_DAYS(180 days unless the node sets it).--no-expiryfor a token only a system holds, such as a read-only monitor.MANAGEMENT_TOKEN_LIFETIME_DAYSin the node's settings, which gives every mint that names no expiry a default, so an existing script keeps working unchanged.
Tokens already in the file are not touched and keep working; give one an expiry with the new
set-expirycommand (below).
Added
- Token commands:
set-expirygives an existing token an expiry and keeps its secret;resetgives a token a new secret under the same scopes and ends the old one at once.listalso shows each token's expiry. A token past its expiry is refused with the same401as an unknown token, and an authenticated response carries the expiry inX-Token-Expires-At. POST /v1/tokens/rotate: a token holder replaces their own secret in place, under the same id and scopes, and the old secret works for a short grace window.GET /v1/status: thetoken_fileblock gainsexpired_tokens,earliest_expiryandtokens_without_expiry.POST /v1/documents,POST /v1/documents/activate,POST /v1/documents/deactivateandGET /v1/documents/{call_id}, behind the newdocumentsscope: hand the Node a document, or an availability call, to apply, and read how it went.GET /v1/orders/{order_id}/trailandGET /v1/orders/{order_id}/genealogy, behind the newcorrelationscope: what the Node and its peers hold for one order.ChunkingStrategySpecandregister_chunking_strategyinengine.public, for naming a chunking strategy a Node Type can ask for.check_candidatetakes an optionaldb_sampleflag (off by default). With it, a database log connector also reads one row of its table and returns it as the sample.
0.6.0
The pull of other nodes' revoked token ids is removed, and a revoke now reaches another node only when an
administrator sends it there (the cascade tool, deployment/management_tokens.sh revoke --nodes). What
breaks is listed first, and the routes added after it.
Breaking
GET /v1/revocationsis removed and answers404. It listed the token ids a node had revoked, for another node to pull. To migrate, stop reading it: revoke on every node withmanagement_tokens.sh revoke --id NAME --nodes nodes.txt, which sends the revoke to each node instead.GET /v1/statusno longer has thepeer_revocationsfield. Nothing replaces it: a node pulls no peer, so there is no pull to report. To migrate, stop reading the field.token_fileis unchanged.POST /v1/tokens/rotatedeclares its scope rule asany_tokenin the description atGET /v1/openapi.json(x-required-scope), where it saidnot_revocations. The route now accepts every token, as therevocationsscope it excluded is gone. To migrate, readany_tokenwherevernot_revocationswas handled.- The
revocationsscope is removed.mint_management_token.sh --scope revocationsandpython3 -m engine.management.tokens mint --scope revocationsare refused. A token file that still holds a token with the scope loads: the service drops the scope, logs one line naming the tokens, and skips a token left with no scope. To migrate, revoke the node-to-node pull tokens (management_tokens.sh revoke --id NAME). mintno longer takes--allow-unreachable, and makes no network call. A script that passes it fails with a usage error; remove the option.MANAGEMENT_PEERS,MANAGEMENT_PEERS_TOKEN_FILEandMANAGEMENT_PEERS_INTERVAL_SECONDSdo nothing. A node that still sets one starts, logs a warning naming it, and ignores it;doctor.shnames it too. Remove them from.envand from the environment.python -m engine.management.tokens mint --no-expiry(andmint_management_token.sh) is also refused for a token with thecorrelationscope, which a person holds, as it is forsignoff,sync,checkandadmin. A script that mints acorrelationtoken with--no-expiryfails with a usage error. To migrate, give it--expires-in 90d(any number of days up toMANAGEMENT_TOKEN_MAX_LIFETIME_DAYS) or--expires-at.documentsis unchanged: a system holds it, so it may still never expire.POST /v1/tokens/rotateanswers429withRetry-Afterwhen the same token rotated less than 60 seconds ago, where it answered200. A caller that rotates in a loop, or retries a lost answer at once, must wait the seconds the header names.
Added
POST /v1/tokens/revoke: an administrator, authenticated by a site-CA client certificate, revokes a token id on this node. It is what the cascade tool calls on each node.GET /v1/admin/tokensandPOST /v1/admin/tokens/{token_id}/revoke, behind the newadminscope: list this node's tokens and revoke one of them.GET /v1/status: thetoken_fileblock gainsadmin_tokens.GET /v1/signoffs/record-types, behind thesignoffscope: the distinct record types the sign-off records hold, which is what a filter's choices are built from.GET /v1/statusalso gainsscheduled_tasks(the state of each scheduled task),host_time_utc,time_syncandvirtualization(the host's clock and what the host says about keeping it, with no verdict),coverage(when the Node was last known to be running, and its latest coverage gap) andschema_generation(whether the database's schema generation matches the engine's).GET /v1/orders/{order_id}/trailgainscoverage_gaps, the coverage gaps that overlap the order, and each entry ofdisagreementsgainsinvolves_this_node.- The responses of authenticated routes now declare the
X-Token-Expires-Atheader in the description atGET /v1/openapi.json.
0.7.0
Nothing in the declared surface breaks. This release only adds to the public API: the alert routes and the scope that goes with them, and a new version of the MES Node Type.
Added
GET /v1/alerts,GET /v1/alerts/count,GET /v1/alerts/{alert_id}andPOST /v1/alerts/{alert_id}/acknowledge, behind the newalertsscope: list the alerts a Node raised when a reading stayed outside a limit of a confirmed instruction, count those no one has acknowledged, read one, and record a person's acknowledgement of it. A token that carries thealertsscope always carries an expiry. See instruction conformance.
The MES Node Type is version 0.5.0
The MES Node Type gains the instruction_bindings section, so its version is now 0.5.0. A configuration is
compared with the Node Type's version exactly, so each MES configuration must name 0.5.0 in
node_type_version; one that still names 0.4.0 is refused as stale. A configuration that has no
instruction_bindings section needs nothing else. The steps are in
changelog actions.
0.8.0
Nothing in the declared surface breaks. This release only adds to the public API: a route that submits an approved case summary as a document, the document chunk-preview command, and a new version of the MES Node Type.
Added
POST /v1/signoffs/{record_id}/submit-as-document: a person submits an approved case summary as a past case, with a disposition they write, so that precedent retrieval can offer it. It needs a token that carries both thesignoffand thedocumentsscope; the description atGET /v1/openapi.jsongives the first asx-required-scopeand any further one in the newx-also-required-scopes. See submit an approved case summary as a document.python3 -m engine.document_preview_cli, the document chunk-preview command: it shows how a document type would cut a file, connects to nothing and stores nothing. Its exit codes (0 to 3) and the names and meanings of its options are covered, and--jsonmay only gain keys. See document chunk preview.
The MES Node Type is version 0.6.0
The MES Node Type gains the optional require_effective_range setting on a document type that keeps its
revisions, so its version is now 0.6.0. A configuration is compared with the Node Type's version exactly, so each
MES configuration must name 0.6.0 in node_type_version; one that still names 0.5.0 is refused as stale. A
configuration that does not set require_effective_range needs nothing else, though a newer revision that arrives
with no effective range is now stored with a warning instead of silently applying at every date. The steps are in
changelog actions.
0.9.0
Nothing in the declared surface breaks. This release only adds to the public API: the routes and the Python
function that carry a configuration to an appliance and back, and more that GET /v1/status and GET /v1/config
say about the staged configuration.
Added
- A configuration can be staged from a bundle built where the repository is reachable:
POST /v1/config/bundlevalidates a bundle and stages it if it is valid, and the Python functionbuild_config_bundle(with its result,ConfigBundleBuild) builds one from a ref of a git repository, for an appliance with no route to that repository. The route needs theconfigurescope. See the management API reference and the Python API reference. POST /v1/config/rollback: swap the staged configuration with the prior one, if the prior is still valid. It needs theconfigurescope.- A draft configuration held on the appliance:
GET /v1/config/draftreads it (every credential shown as a placeholder),PUT /v1/config/draftsaves it,DELETE /v1/config/draftdiscards it, andPOST /v1/config/draft/stagevalidates it and stages it.GET /v1/config/draft/exportandPOST /v1/config/draft/exportgive it back as a file, and as a starting-point file for the repository with no credential in it. GET /v1/config/schemareturns a Node Type's Configuration Schema, with its credential fields marked, andPOST /v1/config/migrationlists every schema problem of the staged configuration or the draft against the running Node Type. Neither writes.POST /v1/config/assistturns a plain-language request into a checked change to the draft, on the site's own inference endpoint. It saves and stages only when asked, and the assistant is off where no inference endpoint is set.GET /v1/statusandGET /v1/configreport more about the staged configuration: where it came from (source: a sync, a bundle, the draft or a rollback), when it was staged, whether its origin was stated or verified (provenance), and the one configuration it replaced (prior).GET /v1/configalso reports the template or ref a draft started from (base) and whether the configuration is the repository's rather than a draft made on the appliance (in_repository). Each is a new key in an answer, so a client that ignores keys it does not know is unaffected.
Node Types
No Node Type changes its version. A field's help (a description in a Configuration Schema) is an annotation:
it changes nothing a configuration means.
0.9.1
Nothing in the declared surface changes, and nothing breaks. This release exists because 0.9.0 was tagged in the
private repository and never published: the review of its sync found a test that read an internal document, and a
fix after a tag is a new release. Release 0.9.1 is the first to reach the public repository with everything
0.9.0 added, so every change listed under 0.9.0 above is published here, and the reference's "Since 0.9.0" on
those names means 0.9.1 for anyone reading the public repository. The next release's changes begin at 0.9.1.
0.10.0
Nothing breaks. This release only adds to the public API.
Added
GET /v1/tokens/self: a token is told its own id and the scopes it carries, sorted, and nothing else. Any token may call it, as any token may rotate itself, so it needs no scope; it writes no Activity Log entry and its answer is never cached (Cache-Control: no-store). The scopes are advice to a client, which is the review page's use of it: every route still checks the token itself. See asking a token for its own scopes.
The MES Node Type is version 0.7.0
The MES Node Type's deviation_flagging, costing_variance, material_consumption and instruction_bindings
sections can now read a field of each record beside an mqtt or database_log source, not only a node of an
opcua server, so its version is now 0.7.0. Those four sections no longer require the opcua section; the keys
that name an OPC UA node (node_id, and order_id where a check fixes one) are required only beside opcua; and
new keys name the record fields (cycle_time_field, material_field, and field and time_field in an instruction
binding). A configuration is compared with the Node Type's version exactly, so each MES configuration must name
0.7.0 in node_type_version; one that still names 0.6.0 is refused as stale. A configuration that reads an OPC UA
server needs nothing else. The steps are in changelog actions.
No other Node Type changes its version.
0.11.0
One change to a covered command breaks a pipeline that gates on it, and the rest only adds to the public API.
Breaking
python -m engine.mapping_preview_clinow exits 1 for a rule that is never reached, which it did not report before, so a config that previewed clean can now preview with a gap. The same holds for thestateof aPreviewReport, which is"gaps"where it was"clean". The meaning of exit code 1, a gap or a flagged event, is unchanged, and so is what a Node does with the config: a rule that is never reached has never run. A pipeline or script that fails a config unless the preview exits 0 now fails a config that passed before. To migrate, read the report's line for the rule (rule N is never reached: rule M matches every record it would, counted from 0) and move the more specific rule above the broader one, or delete the rule. A rule set with no catch-all prints a note and leaves the exit code alone.
Added
PreviewReportgains three fields, each with a default, so code that builds or reads a report is unaffected:dead_rules, the rules no record can reach as(position, shadowed_by)pairs counted from 0;dead_rules_omitted, how many of them the list left out; andno_catch_all, true for a rule set none of whose rules has an emptywhen. See a rule that is never reached.
Release: v0.11.0