feat(workflow): add workflow snapshot diff and job execution diff suite (Phase 3)
This commit is contained in:
1 parent
d37ebb7fcd
commit
2f94768184
8 files changed
+947
-2
No files matched your search
@@ -220,4 +220,275 @@ describe("CLI - workflow job 执行详情与异常精准透视", () => {
|
||||
expect(notFoundRes.exitCode).toBe(1);
|
||||
expect(notFoundRes.stderr).toContain("未在 Job [job_single] 的执行树中找到匹配 \"不存在的节点\" 的节点");
|
||||
});
|
||||
|
||||
it("handles workflow diff <snapshot1> <snapshot2> comparing code and node changes", async () => {
|
||||
const snap1 = {
|
||||
id: "snap_v1",
|
||||
pipelineId: "pipe_1",
|
||||
version: "1.0.1",
|
||||
updateTime: "2026-10-13 14:00:00",
|
||||
staffName: "张三",
|
||||
tasks: [
|
||||
{
|
||||
name: "fetch_contract",
|
||||
type: "ekuaibao-datalink-filter",
|
||||
displayName: "获取合同台账",
|
||||
groupName: "action",
|
||||
orderIndex: 0,
|
||||
levelIndex: [0],
|
||||
status: "ENABLE",
|
||||
combineFilters: { condition: "AND", filters: [{ key: "state", compare: "EQUAL", value: "OPEN" }] },
|
||||
},
|
||||
{
|
||||
name: "mvel_calc",
|
||||
type: "code",
|
||||
displayName: "MVEL计算节点",
|
||||
groupName: "action",
|
||||
orderIndex: 1,
|
||||
levelIndex: [1],
|
||||
status: "ENABLE",
|
||||
code: "double dailyRate = 0.05;\nreturn pvTotal * dailyRate;",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const snap2 = {
|
||||
id: "snap_v2",
|
||||
pipelineId: "pipe_1",
|
||||
version: "1.0.2",
|
||||
updateTime: "2026-10-14 09:30:00",
|
||||
staffName: "李四",
|
||||
tasks: [
|
||||
{
|
||||
name: "fetch_contract",
|
||||
type: "ekuaibao-datalink-filter",
|
||||
displayName: "获取合同台账",
|
||||
groupName: "action",
|
||||
orderIndex: 0,
|
||||
levelIndex: [0],
|
||||
status: "ENABLE",
|
||||
combineFilters: { condition: "AND", filters: [{ key: "state", compare: "EQUAL", value: "APPROVING" }] },
|
||||
},
|
||||
{
|
||||
name: "mvel_calc",
|
||||
type: "code",
|
||||
displayName: "MVEL计算节点",
|
||||
groupName: "action",
|
||||
orderIndex: 1,
|
||||
levelIndex: [1],
|
||||
status: "ENABLE",
|
||||
code: "double dailyRate = 0.05;\nif (pvTotal <= 0) throw new RuntimeException('金额非法');\nreturn pvTotal * dailyRate;",
|
||||
},
|
||||
{
|
||||
name: "notify_audit",
|
||||
type: "webhook",
|
||||
displayName: "审计通知",
|
||||
groupName: "action",
|
||||
orderIndex: 2,
|
||||
levelIndex: [2],
|
||||
status: "ENABLE",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const mockPiperClient = {
|
||||
get: (url: string) => {
|
||||
let payload: any = {};
|
||||
if (url.includes("snap_v1")) payload = snap1;
|
||||
else if (url.includes("snap_v2")) payload = snap2;
|
||||
return new Response(JSON.stringify({ code: 200, data: payload }), {
|
||||
status: 200,
|
||||
headers: { "content-type": "application/json" },
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
spies.push(
|
||||
spyOn(helpers, "createClientsForCorp").mockResolvedValue({
|
||||
ekbClient: { get: () => ({ json: async () => [{ id: "plat_1", active: true }] }) },
|
||||
easoClient: mockPiperClient,
|
||||
} as any)
|
||||
);
|
||||
spies.push(spyOn(helpers, "createPiperClientForCorp").mockResolvedValue(mockPiperClient as any));
|
||||
|
||||
// 1. 文本输出模式
|
||||
const res = await handleWorkflowCommand(
|
||||
{
|
||||
area: "workflow",
|
||||
action: "diff",
|
||||
args: ["snap_v1", "snap_v2"],
|
||||
options: {},
|
||||
raw: ["workflow", "diff", "snap_v1", "snap_v2"],
|
||||
},
|
||||
mockRuntime
|
||||
);
|
||||
|
||||
expect(res.exitCode).toBe(0);
|
||||
expect(res.stdout).toContain("工作流快照比对 [1.0.1 -> 1.0.2]");
|
||||
expect(res.stdout).toContain("新增节点 (1 个)");
|
||||
expect(res.stdout).toContain("notify_audit");
|
||||
expect(res.stdout).toContain("mvel_calc");
|
||||
expect(res.stdout).toContain("金额非法");
|
||||
expect(res.stdout).toContain("过滤/触发条件变动");
|
||||
|
||||
// 2. JSON 模式
|
||||
const jsonRes = await handleWorkflowCommand(
|
||||
{
|
||||
area: "workflow",
|
||||
action: "diff",
|
||||
args: ["snap_v1", "snap_v2"],
|
||||
options: { json: true },
|
||||
raw: ["workflow", "diff", "snap_v1", "snap_v2", "--json"],
|
||||
},
|
||||
{ ...mockRuntime, jsonMode: true }
|
||||
);
|
||||
|
||||
expect(jsonRes.exitCode).toBe(0);
|
||||
const parsed = JSON.parse(jsonRes.stdout);
|
||||
expect(parsed.addedTasks).toContain("notify_audit");
|
||||
expect(parsed.modifiedTasks.find((t: any) => t.taskName === "mvel_calc")).toBeDefined();
|
||||
|
||||
// 3. 缺少参数
|
||||
const errRes = await handleWorkflowCommand(
|
||||
{
|
||||
area: "workflow",
|
||||
action: "diff",
|
||||
args: ["snap_v1"],
|
||||
options: {},
|
||||
raw: ["workflow", "diff", "snap_v1"],
|
||||
},
|
||||
mockRuntime
|
||||
);
|
||||
expect(errRes.exitCode).toBe(1);
|
||||
expect(errRes.stderr).toContain("用法: hose-use workflow diff");
|
||||
});
|
||||
|
||||
it("handles workflow diff-job <job1> <job2> comparing execution branch and error divergence", async () => {
|
||||
const jobA = {
|
||||
id: "job_success",
|
||||
pipelineId: "pipe_1",
|
||||
state: "COMPLETED",
|
||||
startTime: "2026-10-14 10:00:00",
|
||||
durationTime: 450,
|
||||
hasError: false,
|
||||
errorTaskCount: 0,
|
||||
};
|
||||
|
||||
const treeA = [
|
||||
{
|
||||
id: "ex_1",
|
||||
name: "get_bill",
|
||||
displayName: "获取单据",
|
||||
type: "flow-detail",
|
||||
status: "COMPLETED",
|
||||
executionTime: 120,
|
||||
inputs: { billCode: "ZJ-20261014-001" },
|
||||
outputs: { state: "APPROVING" },
|
||||
},
|
||||
{
|
||||
id: "ex_2",
|
||||
name: "auto_approve",
|
||||
displayName: "自动审批",
|
||||
type: "flow-approval",
|
||||
status: "COMPLETED",
|
||||
executionTime: 330,
|
||||
inputs: { action: "agree" },
|
||||
outputs: { code: 200, success: true },
|
||||
},
|
||||
];
|
||||
|
||||
const jobB = {
|
||||
id: "job_failed",
|
||||
pipelineId: "pipe_1",
|
||||
state: "FAILED",
|
||||
startTime: "2026-10-14 11:00:00",
|
||||
durationTime: 320,
|
||||
hasError: true,
|
||||
errorTaskCount: 1,
|
||||
};
|
||||
|
||||
const treeB = [
|
||||
{
|
||||
id: "ex_1b",
|
||||
name: "get_bill",
|
||||
displayName: "获取单据",
|
||||
type: "flow-detail",
|
||||
status: "COMPLETED",
|
||||
executionTime: 100,
|
||||
inputs: { billCode: "ZJ-20261014-002" },
|
||||
outputs: { state: "PAYING" },
|
||||
},
|
||||
{
|
||||
id: "ex_2b",
|
||||
name: "auto_approve",
|
||||
displayName: "自动审批",
|
||||
type: "flow-approval",
|
||||
status: "FAILED",
|
||||
executionTime: 220,
|
||||
error: { message: "400: 无待办审批事项" },
|
||||
inputs: { action: "agree" },
|
||||
outputs: { code: 400, message: "无待办审批事项" },
|
||||
},
|
||||
];
|
||||
|
||||
const mockPiperClient = {
|
||||
get: (url: string) => {
|
||||
let payload: any = {};
|
||||
if (url.includes("job_success/execution")) payload = treeA;
|
||||
else if (url.includes("job_failed/execution")) payload = treeB;
|
||||
else if (url.includes("job_success")) payload = jobA;
|
||||
else if (url.includes("job_failed")) payload = jobB;
|
||||
return new Response(JSON.stringify({ code: 200, data: payload }), {
|
||||
status: 200,
|
||||
headers: { "content-type": "application/json" },
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
spies.push(
|
||||
spyOn(helpers, "createClientsForCorp").mockResolvedValue({
|
||||
ekbClient: { get: () => ({ json: async () => [{ id: "plat_1", active: true }] }) },
|
||||
easoClient: mockPiperClient,
|
||||
} as any)
|
||||
);
|
||||
spies.push(spyOn(helpers, "createPiperClientForCorp").mockResolvedValue(mockPiperClient as any));
|
||||
|
||||
// 1. 文本输出模式
|
||||
const res = await handleWorkflowCommand(
|
||||
{
|
||||
area: "workflow",
|
||||
action: "diff-job",
|
||||
args: ["job_success", "job_failed"],
|
||||
options: {},
|
||||
raw: ["workflow", "diff-job", "job_success", "job_failed"],
|
||||
},
|
||||
mockRuntime
|
||||
);
|
||||
|
||||
expect(res.exitCode).toBe(0);
|
||||
expect(res.stdout).toContain("工作流 Job 执行比对 [job_success vs job_failed]");
|
||||
expect(res.stdout).toContain("auto_approve");
|
||||
expect(res.stdout).toContain("400: 无待办审批事项");
|
||||
expect(res.stdout).toContain("ZJ-20261014-001");
|
||||
expect(res.stdout).toContain("ZJ-20261014-002");
|
||||
|
||||
// 2. JSON 模式
|
||||
const jsonRes = await handleWorkflowCommand(
|
||||
{
|
||||
area: "workflow",
|
||||
action: "diff-job",
|
||||
args: ["job_success", "job_failed"],
|
||||
options: { json: true },
|
||||
raw: ["workflow", "diff-job", "job_success", "job_failed", "--json"],
|
||||
},
|
||||
{ ...mockRuntime, jsonMode: true }
|
||||
);
|
||||
|
||||
expect(jsonRes.exitCode).toBe(0);
|
||||
const parsed = JSON.parse(jsonRes.stdout);
|
||||
expect(parsed.jobA.id).toBe("job_success");
|
||||
expect(parsed.jobB.id).toBe("job_failed");
|
||||
expect(parsed.summary.statusDiffCount).toBe(1);
|
||||
expect(parsed.nodes.find((n: any) => n.taskName === "auto_approve").statusB).toBe("FAILED");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,197 @@
|
||||
import {
|
||||
diffWorkflowJobs,
|
||||
diffWorkflowSnapshots,
|
||||
getJob,
|
||||
getJobExecutionTree,
|
||||
getWorkflowSnapshot,
|
||||
} from "../../../domains/platform/services.js";
|
||||
import { stringOption } from "../../parser.js";
|
||||
import { printJson, printTable } from "../../printer.js";
|
||||
import type { CliParsedArgs, CliResult, CliRuntime } from "../../types.js";
|
||||
import { createJobPiperClient } from "./shared.js";
|
||||
|
||||
export async function handleWorkflowDiff(
|
||||
parsed: CliParsedArgs,
|
||||
runtime: CliRuntime
|
||||
): Promise<CliResult> {
|
||||
const snapIdA = parsed.args[0] || stringOption(parsed.options, ["from", "a", "snapshot1", "snapshotA"]);
|
||||
const snapIdB = parsed.args[1] || stringOption(parsed.options, ["to", "b", "snapshot2", "snapshotB"]);
|
||||
|
||||
if (!snapIdA || !snapIdB) {
|
||||
return {
|
||||
stdout: "",
|
||||
stderr: "用法: hose-use workflow diff <snapshotId1> <snapshotId2> [--pipelineId=<id>]\n",
|
||||
exitCode: 1,
|
||||
};
|
||||
}
|
||||
|
||||
const client = await createJobPiperClient(parsed, runtime);
|
||||
const pipelineId = stringOption(parsed.options, ["pipelineId", "pipeline", "id"]);
|
||||
|
||||
const [snapA, snapB] = await Promise.all([
|
||||
getWorkflowSnapshot(client, snapIdA, pipelineId),
|
||||
getWorkflowSnapshot(client, snapIdB, pipelineId),
|
||||
]);
|
||||
|
||||
const diff = diffWorkflowSnapshots(snapA, snapB);
|
||||
|
||||
if (runtime.jsonMode) {
|
||||
return {
|
||||
stdout: printJson(diff, runtime.outputOptions),
|
||||
stderr: "",
|
||||
exitCode: 0,
|
||||
};
|
||||
}
|
||||
|
||||
const lines: string[] = [
|
||||
`====== 工作流快照比对 [${diff.snapshotA.version || snapIdA} -> ${diff.snapshotB.version || snapIdB}] ======`,
|
||||
` 快照 A : ${snapIdA} (版本: ${diff.snapshotA.version || "-"}) 更新人: ${diff.snapshotA.staffName || "-"} 时间: ${diff.snapshotA.updateTime || "-"}`,
|
||||
` 快照 B : ${snapIdB} (版本: ${diff.snapshotB.version || "-"}) 更新人: ${diff.snapshotB.staffName || "-"} 时间: ${diff.snapshotB.updateTime || "-"}`,
|
||||
` 变更统计: ${diff.summary.changedCount} 个节点有变动 (节点总数: A=${diff.summary.totalA}, B=${diff.summary.totalB})`,
|
||||
"",
|
||||
];
|
||||
|
||||
if (diff.addedTasks.length > 0) {
|
||||
lines.push(`── ➕ 新增节点 (${diff.addedTasks.length} 个) ──`);
|
||||
lines.push(` ${diff.addedTasks.join(", ")}`);
|
||||
lines.push("");
|
||||
}
|
||||
|
||||
if (diff.removedTasks.length > 0) {
|
||||
lines.push(`── ➖ 删除节点 (${diff.removedTasks.length} 个) ──`);
|
||||
lines.push(` ${diff.removedTasks.join(", ")}`);
|
||||
lines.push("");
|
||||
}
|
||||
|
||||
if (diff.modifiedTasks.length === 0) {
|
||||
lines.push("✅ 两个快照间未检测到任何节点或代码变更。");
|
||||
} else {
|
||||
lines.push(`── 📝 节点变更明细 (${diff.modifiedTasks.length} 个) ──`);
|
||||
for (const task of diff.modifiedTasks) {
|
||||
lines.push(`\n• 节点 [${task.taskName}] (${task.displayName || task.type}) [${task.changeType}]:`);
|
||||
if (task.codeDiff?.unifiedDiff) {
|
||||
lines.push(` --- 脚本代码变动 ---`);
|
||||
lines.push(task.codeDiff.unifiedDiff.split("\n").map((l) => ` ${l}`).join("\n"));
|
||||
}
|
||||
if (task.filterDiff) {
|
||||
lines.push(` --- 过滤/触发条件变动 ---`);
|
||||
lines.push(` 原条件: ${JSON.stringify(task.filterDiff.from) || "(空)"}`);
|
||||
lines.push(` 现条件: ${JSON.stringify(task.filterDiff.to) || "(空)"}`);
|
||||
}
|
||||
if (task.configChanges.length > 0) {
|
||||
lines.push(` --- 属性配置变动 ---`);
|
||||
for (const c of task.configChanges) {
|
||||
lines.push(` • ${c.field}: ${JSON.stringify(c.from)} -> ${JSON.stringify(c.to)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
stdout: lines.join("\n") + "\n",
|
||||
stderr: "",
|
||||
exitCode: 0,
|
||||
};
|
||||
}
|
||||
|
||||
export async function handleWorkflowDiffJob(
|
||||
parsed: CliParsedArgs,
|
||||
runtime: CliRuntime
|
||||
): Promise<CliResult> {
|
||||
const jobIdA = parsed.args[0] || stringOption(parsed.options, ["from", "a", "job1", "jobA"]);
|
||||
const jobIdB = parsed.args[1] || stringOption(parsed.options, ["to", "b", "job2", "jobB"]);
|
||||
|
||||
if (!jobIdA || !jobIdB) {
|
||||
return {
|
||||
stdout: "",
|
||||
stderr: "用法: hose-use workflow diff-job <jobId1> <jobId2>\n",
|
||||
exitCode: 1,
|
||||
};
|
||||
}
|
||||
|
||||
const client = await createJobPiperClient(parsed, runtime);
|
||||
|
||||
const [jobA, treeA, jobB, treeB] = await Promise.all([
|
||||
getJob(client, jobIdA),
|
||||
getJobExecutionTree(client, jobIdA),
|
||||
getJob(client, jobIdB),
|
||||
getJobExecutionTree(client, jobIdB),
|
||||
]);
|
||||
|
||||
const diff = diffWorkflowJobs(jobA, treeA, jobB, treeB);
|
||||
|
||||
if (runtime.jsonMode) {
|
||||
return {
|
||||
stdout: printJson(diff, runtime.outputOptions),
|
||||
stderr: "",
|
||||
exitCode: 0,
|
||||
};
|
||||
}
|
||||
|
||||
const summaryRows = [
|
||||
["Job ID", diff.jobA.id, diff.jobB.id],
|
||||
["运行状态", String(diff.jobA.state ?? "-"), String(diff.jobB.state ?? "-")],
|
||||
["开始时间", diff.jobA.startTime || "-", diff.jobB.startTime || "-"],
|
||||
["执行耗时(ms)", String(diff.jobA.durationTime ?? "-"), String(diff.jobB.durationTime ?? "-")],
|
||||
["执行节点数", String(diff.summary.totalNodesA), String(diff.summary.totalNodesB)],
|
||||
["错误标记 (hasError)", diff.jobA.hasError ? "⚠️ 包含错误" : "正常", diff.jobB.hasError ? "⚠️ 包含错误" : "正常"],
|
||||
];
|
||||
|
||||
const lines: string[] = [
|
||||
`====== 工作流 Job 执行比对 [${jobIdA} vs ${jobIdB}] ======`,
|
||||
printTable(["指标项", `Job A (${jobIdA})`, `Job B (${jobIdB})`], summaryRows),
|
||||
"",
|
||||
`── 🔀 分支走向与节点执行状态比对 (差异节点: ${diff.summary.divergedNodesCount} 个) ──`,
|
||||
];
|
||||
|
||||
if (diff.summary.divergedNodesCount === 0) {
|
||||
lines.push(" ✅ 两个 Job 执行链路完全一致,各节点状态与入参相同。");
|
||||
} else {
|
||||
const divergedNodes = diff.nodes.filter((n) => n.diverged);
|
||||
const nodeRows = divergedNodes.map((n) => [
|
||||
n.taskName,
|
||||
n.displayName || "-",
|
||||
n.type || "-",
|
||||
n.statusA || "(未执行)",
|
||||
n.statusB || "(未执行)",
|
||||
n.statusA !== n.statusB ? "⚠️ 状态不一致" : "一致",
|
||||
n.errorB ? "❌ B报错" : n.errorA ? "⚠️ A报错" : "-",
|
||||
]);
|
||||
lines.push(
|
||||
printTable(
|
||||
["节点名称", "显示名称", "类型", "Job A 状态", "Job B 状态", "状态差异", "错误差异"],
|
||||
nodeRows
|
||||
)
|
||||
);
|
||||
|
||||
lines.push("\n── 🔍 差异节点入参/出参与报错透视 ──");
|
||||
for (const n of divergedNodes) {
|
||||
lines.push(`\n• 节点 [${n.taskName}] (${n.displayName || n.type || "-"}):`);
|
||||
if (n.statusA !== n.statusB) {
|
||||
lines.push(` 状态对比: ${n.statusA || "(未执行)"} -> ${n.statusB || "(未执行)"}`);
|
||||
}
|
||||
if (n.errorB || n.errorA) {
|
||||
if (n.errorA) lines.push(` Job A 报错: ${JSON.stringify(n.errorA)}`);
|
||||
if (n.errorB) lines.push(` Job B 报错: ${JSON.stringify(n.errorB)}`);
|
||||
}
|
||||
if (n.inputsDiff && n.inputsDiff.length > 0) {
|
||||
lines.push(` 入参差异 (inputs):`);
|
||||
for (const diffItem of n.inputsDiff) {
|
||||
lines.push(` ~ ${diffItem.field}: ${JSON.stringify(diffItem.from)} -> ${JSON.stringify(diffItem.to)}`);
|
||||
}
|
||||
}
|
||||
if (n.outputsDiff && n.outputsDiff.length > 0) {
|
||||
lines.push(` 出参差异 (outputs):`);
|
||||
for (const diffItem of n.outputsDiff) {
|
||||
lines.push(` ~ ${diffItem.field}: ${JSON.stringify(diffItem.from)} -> ${JSON.stringify(diffItem.to)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
stdout: lines.join("\n") + "\n",
|
||||
stderr: "",
|
||||
exitCode: 0,
|
||||
};
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { handleHistory, handleLogs } from "./history.js";
|
||||
import { handleJob } from "./job.js";
|
||||
import { handleCheck } from "./check.js";
|
||||
import { handleAnalyze } from "./analyze.js";
|
||||
import { handleWorkflowDiff, handleWorkflowDiffJob } from "./diff.js";
|
||||
|
||||
export async function handleWorkflowCommand(
|
||||
parsed: CliParsedArgs,
|
||||
@@ -59,10 +60,19 @@ export async function handleWorkflowCommand(
|
||||
case "analyze":
|
||||
case "analyse":
|
||||
return handleAnalyze(parsed, runtime);
|
||||
case "diff":
|
||||
case "diff-snapshot":
|
||||
case "diff-snapshots":
|
||||
case "compare":
|
||||
return handleWorkflowDiff(parsed, runtime);
|
||||
case "diff-job":
|
||||
case "diff-jobs":
|
||||
case "compare-job":
|
||||
return handleWorkflowDiffJob(parsed, runtime);
|
||||
default:
|
||||
return {
|
||||
stdout: "",
|
||||
stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, history, logs, job, check\n`,
|
||||
stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, history, logs, job, diff, diff-job, check\n`,
|
||||
exitCode: 1,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,3 +25,27 @@ export async function createWorkflowDetailClient(
|
||||
clients,
|
||||
};
|
||||
}
|
||||
|
||||
export async function createJobPiperClient(
|
||||
parsed: CliParsedArgs,
|
||||
runtime: CliRuntime
|
||||
): Promise<Awaited<ReturnType<typeof createPiperClientForCorp>>> {
|
||||
const corp = runtime.selectedCorp!;
|
||||
const explicit = stringOption(parsed.options, PLATFORM_ID_OPTION_KEYS);
|
||||
if (explicit) {
|
||||
return createPiperClientForCorp(corp, explicit);
|
||||
}
|
||||
const clients = await createClientsForCorp(corp);
|
||||
try {
|
||||
const corpId = corp.corpId || corp.id;
|
||||
const { listPlatforms } = await import("../../../domains/platform/services.js");
|
||||
const platforms = await listPlatforms(clients.ekbClient, corpId);
|
||||
const firstActive = platforms.find((p) => p.active) ?? platforms[0];
|
||||
if (firstActive?.id) {
|
||||
return await createPiperClientForCorp(corp, firstActive.id);
|
||||
}
|
||||
} catch {
|
||||
// Fall back to default easoClient
|
||||
}
|
||||
return clients.easoClient;
|
||||
}
|
||||
Reference in new issue
Block a user