@onlineapps/conn-orch-validator 8.1.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,45 @@ All notable changes to this package. Follows [Keep a Changelog](https://keepacha
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [9.0.0] — 2026-09-15
|
|
8
|
+
|
|
9
|
+
### Removed — šablona už nenese job `verify-installation-contract` (d.470)
|
|
10
|
+
|
|
11
|
+
Blok `oa-ci v1` v `templates/business-service/.gitlab-ci.yml` deklaroval job, který pouštěl
|
|
12
|
+
`sh scripts/verify-installation-docs-sql-contract.sh`. Šablona ten skript **nikdy nenesla**
|
|
13
|
+
(`templates/business-service/scripts/` = jen `verify-deploy-uniform.sh`) — osm biz repozitářů mělo
|
|
14
|
+
každý vlastní kopii a mapa vydání d.320 ruší všech osm. Job v bloku tedy sliboval kontrolu, kterou
|
|
15
|
+
nově nascaffoldovaná služba nemůže provést (`automation-gates.md` §5).
|
|
16
|
+
|
|
17
|
+
Norma se nikam neztratila, jen má jednu kolej místo dvou: `install-contract` je ve validatoru
|
|
18
|
+
(`src/utils/installContract.js`) a manifest ji vymáhá řádky `G-SETUP`, `D-DB-PACKAGE` a
|
|
19
|
+
`D-DB-HEADERS`, které běží v uniformě před SSH krokem téhož deploy jobu (konfirmace
|
|
20
|
+
`biz-service-manifest` 008) — a jako podpříkaz `biz-ci-gate verify-install-contract`.
|
|
21
|
+
|
|
22
|
+
### Changed — test job šablony nedělá `REGISTRY_URL` (d.470)
|
|
23
|
+
|
|
24
|
+
`test:` (mimo značky, výchozí job nové služby) deklaroval `REGISTRY_URL: "http://localhost:33100"`.
|
|
25
|
+
Nic, co ten job spouští, ho nečte: `test:ci` je `jest`, `jest.config.js` matchuje
|
|
26
|
+
`**/tests/**/*.test.js` a jediný test šablony požaduje `src/handlers/v3/echo.js`. Klíč byl HTTP
|
|
27
|
+
adresou registru pro `getService()`; konfirmace `biz-discovery-redis` 001 přesunula čtení na Redis
|
|
28
|
+
projekci a `725b25c2` HTTP volání odstranil. Čtyři otázky před rušením deklarace jsou zodpovězeny
|
|
29
|
+
v `api/docs/governance/confirmations/declaration-removal.md` 001. Deklarace klíče v
|
|
30
|
+
`config/env-templates/shared.env` se netýká — tu vlastní `api/config/shared-env.json`.
|
|
31
|
+
|
|
32
|
+
### Changed — deploy job migruje jen tam, kde fáze 1 proběhla (d.477)
|
|
33
|
+
|
|
34
|
+
Krok migrací dělal `touch "$TRACKER"` a poté aplikoval vše, co tracker neznal — na boxu, kde
|
|
35
|
+
fáze 1 nikdy neběžela, by tak deploy aplikoval **celou řadu sám**. Konfirmace
|
|
36
|
+
`api/docs/governance/confirmations/db-migrations-first-deploy.md` 001 dělí práci na dvě fáze a
|
|
37
|
+
první z nich (schéma, účet a první běh téhož běžce ručně podle runbooku) nechává člověku.
|
|
38
|
+
|
|
39
|
+
Tracker `config/runtime/applied-migrations-<schema>.txt` je proto od teď **precondition**, ne
|
|
40
|
+
výstup: chybí-li, job končí fail-fast hláškou `[deploy] Migrations tracker <cesta> missing -
|
|
41
|
+
phase 1 … has not run on this box` a jmenuje runbook `api/docs/setup/INSTALL.md`. Žádný `touch`,
|
|
42
|
+
žádné `mkdir` — krok nezakládá nic, stejně jako nezakládá schéma ani účet. Prázdný tracker
|
|
43
|
+
zůstává platným stavem (fáze 1 bez přenesených souborů). `docs/80-setup/INSTALL.md` šablony
|
|
44
|
+
§ Migrations at deploy time to říká třetí odrážkou.
|
|
45
|
+
|
|
7
46
|
## [8.1.0] — 2026-09-15
|
|
8
47
|
|
|
9
48
|
### Changed — deploy job šablony aplikuje migrace DB mezi `pull` a `up` (d.421)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/conn-orch-validator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Validation orchestrator for OA Drive microservices - coordinates validation across all layers (base, infra, orch, business)",
|
|
5
5
|
"oa": {
|
|
6
6
|
"category": "orchestration"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"author": "OnlineApps",
|
|
29
29
|
"license": "PROPRIETARY",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@onlineapps/logger-contract": "
|
|
32
|
-
"@onlineapps/service-validator-core": "2.0.
|
|
31
|
+
"@onlineapps/logger-contract": "2.0.0",
|
|
32
|
+
"@onlineapps/service-validator-core": "2.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"jest": "^29.5.0"
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
# Written by @onlineapps/conn-orch-validator (row G-CI of
|
|
3
3
|
# manifests/biz-service.manifest.json). The PLATFORM half of this pipeline: which
|
|
4
4
|
# pipelines run at all, how a service is built, how its image is identified (R5),
|
|
5
|
-
# how the digest reaches the deploy (R1/R2),
|
|
6
|
-
# the
|
|
7
|
-
# (confirmation
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
5
|
+
# how the digest reaches the deploy (R1/R2), the uniform gate that runs before
|
|
6
|
+
# the SSH step (confirmation biz-service-manifest 008) and the post-deploy gate
|
|
7
|
+
# that runs after it (confirmation deploy-gate-targets 003). The installation
|
|
8
|
+
# contract is checked by that uniform gate, in the manifest rows G-SETUP,
|
|
9
|
+
# D-DB-PACKAGE and D-DB-HEADERS, and no longer by a job of its own (d.470).
|
|
10
|
+
# npx oa-sync-template .gitlab-ci.yml --target . rewrites everything between
|
|
11
|
+
# these two markers and nothing outside them.
|
|
11
12
|
#
|
|
12
13
|
# Outside them is this repository's own: its test job - which database, which
|
|
13
14
|
# ci:gate:* steps and which artefacts its integration needs is a fact about the
|
|
@@ -32,16 +33,6 @@ variables:
|
|
|
32
33
|
IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
|
33
34
|
IMAGE_LATEST: $CI_REGISTRY_IMAGE:latest
|
|
34
35
|
|
|
35
|
-
verify-installation-contract:
|
|
36
|
-
stage: test
|
|
37
|
-
image: alpine:latest
|
|
38
|
-
script:
|
|
39
|
-
- sh scripts/verify-installation-docs-sql-contract.sh
|
|
40
|
-
rules:
|
|
41
|
-
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
42
|
-
- if: $CI_COMMIT_BRANCH == "main"
|
|
43
|
-
- if: $CI_COMMIT_BRANCH == "production"
|
|
44
|
-
|
|
45
36
|
build:
|
|
46
37
|
stage: build
|
|
47
38
|
image: docker:24
|
|
@@ -357,9 +348,20 @@ deploy-production:
|
|
|
357
348
|
# format the runbook writes in phase 1, so a schema already carried
|
|
358
349
|
# forward is skipped rather than applied twice (confirmation 001:
|
|
359
350
|
# "fáze 2 nesmí změnit sémantiku trackeru").
|
|
360
|
-
|
|
351
|
+
#
|
|
352
|
+
# Its EXISTENCE is the precondition, and the step never creates it.
|
|
353
|
+
# Confirmation 001 splits the work in two: phase 1 - schema, account and
|
|
354
|
+
# the first run of this same runner - is an operator's step in the
|
|
355
|
+
# runbook, and phase 2 is this job carrying that state forward. On a box
|
|
356
|
+
# phase 1 never touched there is no tracker, and a job that created one
|
|
357
|
+
# would apply the WHOLE series unattended on the first deploy, which is
|
|
358
|
+
# precisely the phase the owner kept manual. So a missing tracker stops
|
|
359
|
+
# the deploy and names the runbook, exactly as a missing schema does.
|
|
361
360
|
TRACKER="config/runtime/applied-migrations-${DB_SCHEMA}.txt"
|
|
362
|
-
|
|
361
|
+
if [ ! -f "$TRACKER" ]; then
|
|
362
|
+
echo "[deploy] Migrations tracker $DEPLOY_PATH/$TRACKER missing - phase 1 (the migrations of $DB_SCHEMA applied by hand with the same runner) has not run on this box. Expected: the flat tracker phase 1 leaves behind, carried forward by this deploy. Fix: run the business-schema migrations step of api/docs/setup/INSTALL.md for $DB_SCHEMA, then re-run this deploy. This step never creates the tracker: a deploy that did would apply the whole series unattended on a box nobody had provisioned." >&2
|
|
363
|
+
exit 1
|
|
364
|
+
fi
|
|
363
365
|
apply_mariadb_migrations_over_tcp "$DB_MIGRATIONS_DIR" "$TRACKER" "$DB_HOST" "$DB_PORT" "$DB_SCHEMA"
|
|
364
366
|
# The runner logs each file it applies; what this line adds is the state
|
|
365
367
|
# that outlives the deploy. The runner's own counter of files it passed
|
|
@@ -398,7 +400,6 @@ test:
|
|
|
398
400
|
image: node:24-alpine
|
|
399
401
|
variables:
|
|
400
402
|
RABBITMQ_URL: "amqp://localhost:5672"
|
|
401
|
-
REGISTRY_URL: "http://localhost:33100"
|
|
402
403
|
NODE_ENV: "test"
|
|
403
404
|
script:
|
|
404
405
|
- npm ci
|
|
@@ -99,7 +99,7 @@ if it is missing, so onboarding a new service needs no manual step there.
|
|
|
99
99
|
Between that `pull` and that `up` the deploy job applies this service's pending
|
|
100
100
|
MariaDB migrations — the ordering is the safety: the new image is already on the
|
|
101
101
|
box, the previous container is still serving, and a migration that fails stops
|
|
102
|
-
the deploy before the switch.
|
|
102
|
+
the deploy before the switch. Three facts decide what happens:
|
|
103
103
|
|
|
104
104
|
- `config/service/integration-contract.json` → `database`. This scaffold declares
|
|
105
105
|
no such block, so the step prints `NOT APPLICABLE (no database block)` and the
|
|
@@ -109,11 +109,18 @@ the deploy before the switch. Two facts decide what happens:
|
|
|
109
109
|
`MARIADB_MIGRATION_PASSWORD`, the service's own account. The step creates
|
|
110
110
|
neither the schema nor the account and refuses the deploy when that account
|
|
111
111
|
cannot open the schema, naming the runbook instead.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
- `config/runtime/applied-migrations-<schema>.txt` on the box — the tracker.
|
|
113
|
+
**It must already be there**, and this job never creates it. The file is what
|
|
114
|
+
phase 1 leaves behind: the operator who created the schema and the account also
|
|
115
|
+
ran the first pass of the same runner by hand, from the runbook. A deploy onto a
|
|
116
|
+
box phase 1 never touched therefore stops with `Migrations tracker … missing`
|
|
117
|
+
rather than applying the whole series unattended.
|
|
118
|
+
|
|
119
|
+
Who creates the schema, the account and that first tracker — with which grants and
|
|
120
|
+
which collation — is the runbook's step and is not repeated here:
|
|
121
|
+
`api/docs/setup/INSTALL.md`, the business-schema step. The decision behind both
|
|
122
|
+
halves — two phases, the service account as the isolation guard, one runner and
|
|
123
|
+
one tracker across them — is owner confirmation
|
|
117
124
|
`api/docs/governance/confirmations/db-migrations-first-deploy.md` 001.
|
|
118
125
|
|
|
119
126
|
## Status
|