naeel
539cfd7b1a
fix: дубликаты RUNNING/OK в истории — UPSERT по op_uid (v1.2.37)
...
Причина: save_run всегда делал INSERT, сценарий вызывал его дважды
(до поллинга RUNNING, после OK) → две строки в БД.
Исправление:
- init_db.py: частичный уникальный индекс idx_runs_op_uid
- save_run.py: INSERT ... ON CONFLICT (op_uid) DO UPDATE
(статус, длительность, ошибка, этапы, meta — обновляются)
2026-08-03 10:00:29 +04:00
naeel
06eb463088
v1.2.21: fix broken advisory lock (→ partial unique index), escName add " escape, lock_check fallback False
2026-07-31 18:17:09 +04:00
naeel
0783319fd1
Рефакторинг API-слоя, операций и БД
2026-07-31 17:13:54 +04:00
naeel
82a3be2067
v1.2.16: save full instance metadata (instance_meta JSONB)
...
init_db.py: ALTER TABLE runs ADD instance_meta JSONB
save_run.py: +instance_meta parameter → JSONB insert
api_test.py: _finish_op fetches GET /instances/{uid} after poll, saves all fields
scenario.py: run_scenario same — per-step instance metadata
Excludes: instanceUid, displayName, svc, serviceId, explainedStatus (already in other columns)
2026-07-31 14:19:29 +04:00
naeel
91e97f6f75
v1.2.0: unified executor + flexible instance refs + params-render.js
...
Phase 1 — New modules:
- api/utils.py: find_uid(), uid_from_location() (replaces 2 duplicates)
- operations/poll.py: poll_until_done() (shared sync/async polling)
- operations/executor.py: execute_operation() (single CREATE/non-CREATE flow)
Phase 2 — Format + validation:
- routes/api_scenario_defs.py: _validate_steps with output/instance_ref/instance_uid
- operations/scenario.py: resolve instance_uid > instance_ref > service_id,
use executor + poll_until_done, persist instance_bindings
Phase 3 — Migration:
- routes/api_test.py: create/non-create through executor, _finish_op through poll_until_done
- db/init_db.py: startup cleanup of stuck scenario_runs (>1h)
Phase 4 — UI shared module:
- static/js/params-render.js: renderParamRow, renderMapFixedRow, collectParams
- static/js/operations.js: use params-render.js (remove duplicates)
- templates/index.html: include params-render.js
- app.py: bump 1.1.57 → 1.2.0
2026-07-31 08:55:06 +04:00
naeel
983b387708
v1.1.50: scenario_definitions DB+CRUD, seed, runner from DB, 409 lock, UI definitions, drop config.yaml scenarios
2026-07-30 15:06:05 +04:00
naeel
7eeb1131b3
v1.1.46: phase2 — scenario runner MVP (YAML config, DB schema, API endpoints, UI section)
2026-07-30 13:48:34 +04:00
naeel
99b0a79cbd
v1.0.95: full test data — op_uid, user_email, app_version, params saved to runs
2026-07-28 10:12:16 +04:00
naeel
5e120db0d6
v1.0.93: separate DB_* env vars (DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD, DB_SSLMODE) + TEST endpoint default
2026-07-28 09:50:00 +04:00
naeel
7fc17ab3cd
v1.0.92: back to DATABASE_URL — JSON format for jsonEnv
2026-07-28 09:37:14 +04:00
naeel
d239458d97
v1.0.92: separate DB_* env vars instead of DATABASE_URL
2026-07-28 09:35:40 +04:00
naeel
d95afc60e3
v1.0.92: Steps 5-9 — dynamic services, PostgreSQL history, /api/history
2026-07-27 22:59:52 +04:00