feat(migration): migrate legacy owner data and update config reference handling

- Implemented a migration process to move resources from the legacy owner "default" to the new default owner "local", ensuring no data loss during the transition.
- Updated configuration reference handling to replace legacy `$VAR_`, `$SECRET_`, and `$CONTEXT_` prefixes with mustache-style `{{ vars.name }}`, `{{ secrets.name }}`, and `{{ context.name }}`.
- Enhanced YAML configuration files and scripts to reflect the new mustache syntax, improving consistency across the application.
- Added tests to validate the migration process and ensure proper handling of legacy references.
- Updated documentation to guide users on the new configuration reference format.
This commit is contained in:
2026-08-30 05:32:48 +07:00
parent e2e70a5aad
commit 5615d989fa
24 changed files with 775 additions and 208 deletions
+7
View File
@@ -32,6 +32,7 @@ import {
} from "./workflow-queue.js";
import { purgeExpiredTrash } from "./workflow-trash.js";
import { migrateLegacyWorkflowsIfNeeded } from "./workflow-migrate.js";
import { migrateDefaultOwnerIfNeeded } from "./owner-migrate.js";
import {
getConfigGeneration,
startHeartbeatLoop,
@@ -135,6 +136,12 @@ export async function startApp(opts = {}) {
log.warn({ err }, "legacy workflow migrate failed");
}
try {
await migrateDefaultOwnerIfNeeded();
} catch (err) {
log.warn({ err }, "owner default→local migrate failed");
}
const registry = createRegistry(server, {
queue: workflowQueue,
// Cron + HTTP triggers enqueue jobs; only the API process may own them.