|
|
@@ -0,0 +1,107 @@
|
|
|
+# Data Factory Kestra / n8n Navigation Separation Design
|
|
|
+
|
|
|
+## Status
|
|
|
+
|
|
|
+Approved for implementation on 2026-08-18.
|
|
|
+
|
|
|
+## Problem
|
|
|
+
|
|
|
+The Data Factory navigation currently mixes two orchestration generations:
|
|
|
+
|
|
|
+- `生产线管理` opens the external n8n console.
|
|
|
+- `工作流管理` is an n8n-oriented page, but its second tab hosts the governed Kestra production-line deployment console.
|
|
|
+
|
|
|
+This coupling makes the eventual n8n retirement risky because removing the n8n navigation or page can also remove the Kestra production deployment surface.
|
|
|
+
|
|
|
+## Decision
|
|
|
+
|
|
|
+Create three independent Data Factory navigation entries, in this order:
|
|
|
+
|
|
|
+1. `数据生产线投产` — DataOps-governed Kestra deployment page.
|
|
|
+2. `n8n 生产线管理(待下线)` — current external n8n console link.
|
|
|
+3. `n8n 工作流管理(待下线)` — current internal n8n workflow list, execution records, and health page.
|
|
|
+4. Existing entries such as `数据可观测与事故` continue after them.
|
|
|
+
|
|
|
+The Kestra page will use a new internal route, `/dataFactory/production-line-deployment`, and a dedicated page component. The existing `/dataFactory/workflow` route remains the legacy n8n page and no longer imports or renders the Kestra deployment component.
|
|
|
+
|
|
|
+## Alternatives Considered
|
|
|
+
|
|
|
+### A. Separate routes and pages — selected
|
|
|
+
|
|
|
+This gives Kestra and n8n independent lifecycle boundaries. Removing n8n later requires deleting only the two legacy menu entries and legacy page/API adapters.
|
|
|
+
|
|
|
+### B. Keep a combined tab page
|
|
|
+
|
|
|
+Rejected because it preserves the current coupling and makes n8n retirement depend on editing the Kestra entry page.
|
|
|
+
|
|
|
+### C. Link only to the native Kestra console
|
|
|
+
|
|
|
+Rejected because the native console does not replace DataOps-owned RBAC, release readiness, canary evidence, activation gates, rollback, and audit presentation.
|
|
|
+
|
|
|
+## Components
|
|
|
+
|
|
|
+### Kestra production-line page
|
|
|
+
|
|
|
+- New route: `/dataFactory/production-line-deployment`.
|
|
|
+- New navigation label: `数据生产线投产`.
|
|
|
+- Renders the existing `ProductionLineDeployment` component without an n8n wrapper.
|
|
|
+- Keeps the existing DataOps deployment APIs and permissions (`dataflows:deploy`, `dataflows:canary`, `dataflows:activate`, and `dataflows:rollback`).
|
|
|
+- Does not embed or redirect to the native Kestra console.
|
|
|
+
|
|
|
+### Legacy n8n workflow page
|
|
|
+
|
|
|
+- Existing route: `/dataFactory/workflow`.
|
|
|
+- Renamed navigation label: `n8n 工作流管理(待下线)`.
|
|
|
+- Keeps only `工作流列表`, `执行记录`, and `健康检查` tabs.
|
|
|
+- Continues to use the existing n8n adapter APIs until retirement.
|
|
|
+
|
|
|
+### Legacy n8n production-line link
|
|
|
+
|
|
|
+- Existing external `VUE_APP_N8N_URL` behavior remains unchanged.
|
|
|
+- Renamed navigation label: `n8n 生产线管理(待下线)`.
|
|
|
+- Remains independently removable.
|
|
|
+
|
|
|
+## Data Flow
|
|
|
+
|
|
|
+The new Kestra menu page preserves the existing governed path:
|
|
|
+
|
|
|
+`released DataFlow -> DataOps deployment API -> Kestra compiler -> disabled deployment -> canary -> activation/rollback -> evidence`
|
|
|
+
|
|
|
+The n8n pages continue to use their existing n8n-specific adapters. No shared page component will own both orchestration engines.
|
|
|
+
|
|
|
+## Error and Gate Behaviour
|
|
|
+
|
|
|
+- Missing Kestra configuration continues to show the current fail-closed readiness warning.
|
|
|
+- Empty deployments continue to explain that a production line must first be released.
|
|
|
+- UAT activation remains disabled when the server-owned activation gate is closed.
|
|
|
+- n8n availability errors remain confined to the legacy n8n page and link.
|
|
|
+
|
|
|
+## Compatibility
|
|
|
+
|
|
|
+- Existing backend APIs and database schema do not change.
|
|
|
+- Existing Kestra deployment component behavior does not change.
|
|
|
+- Existing deep link `/dataFactory/workflow` remains valid for n8n users.
|
|
|
+- A new deep link is added for Kestra production deployment.
|
|
|
+- Browser refresh and permission filtering must continue to work for both internal routes.
|
|
|
+
|
|
|
+## Test Plan
|
|
|
+
|
|
|
+Tests will first fail against the current coupled structure, then verify:
|
|
|
+
|
|
|
+1. The router exposes the three independent navigation entries with unambiguous labels.
|
|
|
+2. The Kestra route renders only the production deployment component.
|
|
|
+3. The n8n workflow page no longer imports or renders `ProductionLineDeployment`.
|
|
|
+4. The n8n workflow page retains its three legacy tabs.
|
|
|
+5. Existing data-rule frontend contracts continue to validate the Kestra deployment UI.
|
|
|
+6. Source and deployment frontend copies remain byte-identical where the release contract requires mirrors.
|
|
|
+7. Frontend lint/build and focused Python contract suites pass.
|
|
|
+
|
|
|
+## Retirement Boundary
|
|
|
+
|
|
|
+When n8n retirement is approved, removal is limited to:
|
|
|
+
|
|
|
+- the two navigation entries marked `(待下线)`;
|
|
|
+- `/dataFactory/workflow` and its n8n-only components;
|
|
|
+- the n8n frontend/backend adapters after migration evidence confirms no consumers.
|
|
|
+
|
|
|
+The Kestra route, page, deployment APIs, and governed release data remain unaffected.
|