Commit Graph

5 Commits

Author SHA1 Message Date
tigerenwork 0b7dc0e86e fix: stop orphan reconciliation from killing healthy in-flight runs
Runs now record owner_pid (the Node process that started them) at creation
time. reconcileOrphanRuns skips runs whose owner process is still alive —
previously a newly loaded worker (dev compile / instrumentation) would see a
running run with pid not yet written (during the atlas stage), mark it failed
mid-flight, and disable the stop button, while sling kept running in the
background. Legacy rows with null owner_pid are still reconciled as before.
2026-08-09 23:07:24 +08:00
tigerenwork 088925cee4 feat: stop/cancel running migrations and orphan cleanup on startup
- new run status 'cancelled'; stop button on pipeline detail and run detail
  pages (SIGTERM, SIGKILL after 5s, stage-boundary cancel checks)
- POST /api/runs/[id]/stop; works for in-process runs and orphans (by pid)
- startup reconciliation via instrumentation.ts register(): SIGTERM live
  orphan sling/atlas processes (mark cancelled), mark dead-pid stale runs
  failed; appends a note to the run log
- previously: exiting the server left sling running orphaned and the run
  stuck at 'running' forever
2026-08-09 22:31:25 +08:00
tigerenwork 8779ad4867 feat: per-connection URL params and per-pipeline env vars
- connections: params (JSON) merged into connection URL query string, applied
  to both sling env.yaml and atlas URLs; user's foreign_key_checks overrides
  the default =0
- pipelines: env map written to replication yaml top-level env:
- UI: key=value textarea in connection dialog and pipeline form (new/edit)
- docs: TiDB Error 8048 (SERIALIZABLE) troubleshooting — set
  tidb_skip_isolation_level_check=1 as a connection param
2026-08-09 18:28:20 +08:00
tigerenwork 884eaa1ed8 feat: table-scoped schema sync, optional FK migration, pipeline edit UI
- pipelines: new schema_scope ('selected'|'all') and include_fk fields with
  lightweight ALTER TABLE migration for existing DBs
- atlas: computeSchemaExcludes() limits diff/apply to selected tables via
  repeated --exclude (bare-name globs); avoids unsupported-type failures on
  unrelated tables (e.g. TiDB VECTOR) and prevents DROP of target-only tables
- fk toggle off appends --exclude '*[type=foreign-key]'; FKs referencing
  excluded parent tables are skipped by Atlas automatically
- pipeline form extracted to shared component; new /pipelines/[id]/edit page
  with full prefill; edit entries in list and detail pages
2026-08-09 17:35:55 +08:00
tigerenwork fcb0f2e299 feat: local web UI for DB migration via Atlas (schema) + sling (data)
- Connections CRUD with test (sling conns test) and table discovery (sling conns discover)
- Pipelines: source/target, mode, schema_sync toggle, per-table PK/UK for incremental
- Run engine: atlas schema apply then sling run -r, JSON log parsing, SSE live logs
- Runs history with log replay; dashboard with binary health check
- Atlas dev schema on target server (sling_ui_atlas_dev) instead of docker dev-url
- full-refresh translated to truncate when schema_sync is on to preserve Atlas-built DDL
2026-08-09 17:10:17 +08:00