FN-6208: sync workflow settings across nodes
Synchronize workflow setting values through node settings sync. - Include workflow settings in settings payloads, diffs, status responses, and API types. - Apply inbound and pulled workflow settings through the TaskStore while ignoring rejected setting ids. - Add core, route, hook, API, and Nodes view coverage for workflow settings sync behavior. - Add a patch changeset for the published Fusion package. Files changed: .changeset/loud-nodes-sync.md | 5 + packages/core/src/__tests__/central-core.test.ts | 37 ++++ packages/core/src/central-core.ts | 13 +- packages/core/src/types.ts | 4 + packages/dashboard/app/__tests__/api-node.test.ts | 4 +- packages/dashboard/app/api-node.ts | 3 + .../app/components/__tests__/NodesView.test.tsx | 8 +- .../hooks/__tests__/useNodeSettingsSync.test.ts | 33 +++- .../dashboard/app/hooks/useNodeSettingsSync.ts | 4 +- .../__tests__/routes-nodes-sync-contract.test.ts | 18 +- .../src/__tests__/routes-nodes-sync.test.ts | 191 ++++++++++++++++++++- .../src/routes/register-settings-memory-routes.ts | 7 +- .../register-settings-sync-inbound-routes.ts | 73 +++++++- .../src/routes/register-settings-sync-routes.ts | 128 ++++++++++++-- 14 files changed, 488 insertions(+), 40 deletions(-) Fusion-Task-Id: FN-6208 Fusion-Task-Lineage: 9b5e7e56-6287-4bc5-966a-2bcc2ba292a7
This commit is contained in:
@@ -58,6 +58,7 @@ export async function fetchRemoteNodeProjectHealth(
|
||||
export interface NodeSettingsScopes {
|
||||
global: Record<string, unknown>;
|
||||
project: Record<string, unknown>;
|
||||
workflowSettings?: Record<string, Record<string, unknown>>;
|
||||
}
|
||||
|
||||
/** Result from settings push/pull operations */
|
||||
@@ -66,6 +67,7 @@ export interface NodeSettingsSyncResult {
|
||||
syncedFields?: string[];
|
||||
appliedFields?: string[];
|
||||
skippedFields?: string[];
|
||||
workflowSettingsCount?: number;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
@@ -78,6 +80,7 @@ export interface NodeSettingsSyncStatus {
|
||||
diff: {
|
||||
global: string[];
|
||||
project: string[];
|
||||
workflowSettings: Record<string, string[]>;
|
||||
};
|
||||
/** Overall auth credential sync state: "match" if credentials match between local and remote,
|
||||
* "differs" if they differ, "not-synced" if auth sync has never been performed. */
|
||||
|
||||
Reference in New Issue
Block a user