@checkstack/healthcheck-backend 1.13.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +128 -0
- package/package.json +33 -32
- package/src/ai/healthcheck-propose.ts +9 -0
- package/src/ai/healthcheck-update.ts +5 -1
- package/src/collector-assertions.test.ts +276 -0
- package/src/collector-assertions.ts +169 -0
- package/src/config-secrets-backfill.test.ts +142 -0
- package/src/config-secrets-backfill.ts +129 -0
- package/src/config-secrets.test.ts +771 -0
- package/src/config-secrets.ts +361 -0
- package/src/healthcheck-gitops-kinds.ts +42 -31
- package/src/index.ts +47 -1
- package/src/queue-executor.ts +60 -18
- package/src/router-config-secrets.test.ts +165 -0
- package/src/router-create-and-assign.test.ts +5 -1
- package/src/router.ts +39 -7
- package/src/service-config-secrets.test.ts +680 -0
- package/src/service.ts +443 -47
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {
|
|
2
|
+
evaluateAssertions,
|
|
3
|
+
evaluateJsonPathAssertions,
|
|
4
|
+
} from "@checkstack/backend-api";
|
|
5
|
+
import type { CollectorAssertion } from "@checkstack/healthcheck-common";
|
|
6
|
+
import { extractErrorMessage } from "@checkstack/common";
|
|
7
|
+
import { JSONPath } from "jsonpath-plus";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Suffix the AssertionBuilder appends to a JSONPath field's path: an
|
|
11
|
+
* `x-jsonpath` result field `body` is offered as the assertable field
|
|
12
|
+
* `body.$`, with the actual expression stored in `assertion.jsonPath`.
|
|
13
|
+
*/
|
|
14
|
+
const JSONPATH_FIELD_SUFFIX = ".$";
|
|
15
|
+
|
|
16
|
+
/** Whether an assertion targets a JSONPath into a field, not the field itself. */
|
|
17
|
+
function isJsonPathAssertion(assertion: CollectorAssertion): boolean {
|
|
18
|
+
return (
|
|
19
|
+
assertion.field.endsWith(JSONPATH_FIELD_SUFFIX) ||
|
|
20
|
+
(typeof assertion.jsonPath === "string" && assertion.jsonPath.trim() !== "")
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Extract a JSONPath from a parsed JSON value. `wrap: false` returns the
|
|
26
|
+
* single matched value directly (or `undefined` for no match), so `exists` /
|
|
27
|
+
* `isEmpty` operate on the value itself, not on a match array. `eval: false`
|
|
28
|
+
* rejects script/filter expressions outright - assertion paths are authored
|
|
29
|
+
* by users and must never evaluate code on the core.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Narrow an `unknown` to the input type `JSONPath` accepts. Parsed JSON is
|
|
33
|
+
* always one of these by construction; the guard exists because the shared
|
|
34
|
+
* `evaluateJsonPathAssertions` signature hands the json through as `unknown`.
|
|
35
|
+
*/
|
|
36
|
+
function isJsonPathInput(
|
|
37
|
+
value: unknown,
|
|
38
|
+
): value is string | number | boolean | object | null {
|
|
39
|
+
return (
|
|
40
|
+
value === null ||
|
|
41
|
+
typeof value === "string" ||
|
|
42
|
+
typeof value === "number" ||
|
|
43
|
+
typeof value === "boolean" ||
|
|
44
|
+
typeof value === "object"
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function extractJsonPath(path: string, json: unknown): unknown {
|
|
49
|
+
if (!isJsonPathInput(json)) return undefined;
|
|
50
|
+
return JSONPath({ path, json, wrap: false, eval: false });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Human-readable failure string, stored on the run as `_assertionFailed`. */
|
|
54
|
+
function formatFailure({
|
|
55
|
+
assertion,
|
|
56
|
+
detail,
|
|
57
|
+
}: {
|
|
58
|
+
assertion: CollectorAssertion;
|
|
59
|
+
detail?: string;
|
|
60
|
+
}): string {
|
|
61
|
+
const path = assertion.jsonPath?.trim();
|
|
62
|
+
const parts = [
|
|
63
|
+
assertion.field,
|
|
64
|
+
...(isJsonPathAssertion(assertion) && path ? [path] : []),
|
|
65
|
+
assertion.operator,
|
|
66
|
+
...(assertion.value === undefined ? [] : [String(assertion.value)]),
|
|
67
|
+
];
|
|
68
|
+
const base = parts.join(" ");
|
|
69
|
+
return detail ? `${base} (${detail})` : base;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Evaluate a collector's assertions - plain field assertions AND JSONPath
|
|
74
|
+
* assertions - against its result, in the order they were configured.
|
|
75
|
+
*
|
|
76
|
+
* Plain assertions compare `result[field]` directly (unchanged behaviour).
|
|
77
|
+
* JSONPath assertions parse the SOURCE field (e.g. `body` for the field
|
|
78
|
+
* `body.$`) as JSON when it is a string, extract `assertion.jsonPath`, and
|
|
79
|
+
* apply the operator to the extracted value. Fail-closed: a missing
|
|
80
|
+
* expression, a non-JSON source value, or an invalid/eval-blocked path fails
|
|
81
|
+
* the assertion (with a diagnostic suffix) - it never fails the collector.
|
|
82
|
+
*
|
|
83
|
+
* Returns the failure message of the FIRST failing assertion, or `undefined`
|
|
84
|
+
* when all pass.
|
|
85
|
+
*/
|
|
86
|
+
export function evaluateCollectorAssertions({
|
|
87
|
+
assertions,
|
|
88
|
+
result,
|
|
89
|
+
}: {
|
|
90
|
+
assertions: CollectorAssertion[] | undefined;
|
|
91
|
+
result: Record<string, unknown>;
|
|
92
|
+
}): string | undefined {
|
|
93
|
+
if (!assertions?.length) return undefined;
|
|
94
|
+
|
|
95
|
+
// Parse each JSON source field at most once, not once per assertion.
|
|
96
|
+
const parsedSources = new Map<string, { json?: unknown; error?: string }>();
|
|
97
|
+
const parseSource = (sourceField: string) => {
|
|
98
|
+
const cached = parsedSources.get(sourceField);
|
|
99
|
+
if (cached) return cached;
|
|
100
|
+
|
|
101
|
+
const raw = result[sourceField];
|
|
102
|
+
let entry: { json?: unknown; error?: string };
|
|
103
|
+
if (raw === undefined || raw === null) {
|
|
104
|
+
entry = { error: `field "${sourceField}" has no value` };
|
|
105
|
+
} else if (typeof raw === "string") {
|
|
106
|
+
try {
|
|
107
|
+
entry = { json: JSON.parse(raw) };
|
|
108
|
+
} catch {
|
|
109
|
+
entry = { error: `field "${sourceField}" is not valid JSON` };
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
// Already-structured value (object/array/number) - use as-is.
|
|
113
|
+
entry = { json: raw };
|
|
114
|
+
}
|
|
115
|
+
parsedSources.set(sourceField, entry);
|
|
116
|
+
return entry;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
for (const assertion of assertions) {
|
|
120
|
+
if (!isJsonPathAssertion(assertion)) {
|
|
121
|
+
const failed = evaluateAssertions([assertion], result);
|
|
122
|
+
if (failed) return formatFailure({ assertion: failed });
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const path = assertion.jsonPath?.trim();
|
|
127
|
+
if (!path) {
|
|
128
|
+
return formatFailure({
|
|
129
|
+
assertion,
|
|
130
|
+
detail: "missing JSONPath expression",
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const sourceField = assertion.field.endsWith(JSONPATH_FIELD_SUFFIX)
|
|
135
|
+
? assertion.field.slice(0, -JSONPATH_FIELD_SUFFIX.length)
|
|
136
|
+
: assertion.field;
|
|
137
|
+
const source = parseSource(sourceField);
|
|
138
|
+
if (source.error) {
|
|
139
|
+
return formatFailure({ assertion, detail: source.error });
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
try {
|
|
143
|
+
const failed = evaluateJsonPathAssertions(
|
|
144
|
+
[
|
|
145
|
+
{
|
|
146
|
+
path,
|
|
147
|
+
operator: assertion.operator,
|
|
148
|
+
value:
|
|
149
|
+
assertion.value === undefined
|
|
150
|
+
? undefined
|
|
151
|
+
: String(assertion.value),
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
source.json,
|
|
155
|
+
extractJsonPath,
|
|
156
|
+
);
|
|
157
|
+
if (failed) return formatFailure({ assertion });
|
|
158
|
+
} catch (error) {
|
|
159
|
+
// jsonpath-plus rejects malformed paths and (with eval disabled)
|
|
160
|
+
// filter/script expressions by throwing.
|
|
161
|
+
return formatFailure({
|
|
162
|
+
assertion,
|
|
163
|
+
detail: `invalid JSONPath: ${extractErrorMessage(error)}`,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { describe, it, expect, mock } from "bun:test";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { configSecret, Versioned } from "@checkstack/backend-api";
|
|
4
|
+
import type { InternalSecretsService } from "@checkstack/secrets-backend";
|
|
5
|
+
import { internalSecretName } from "@checkstack/secrets-common";
|
|
6
|
+
import { backfillConfigSecrets } from "./config-secrets-backfill";
|
|
7
|
+
import {
|
|
8
|
+
healthcheckConfigLockKey,
|
|
9
|
+
isHealthcheckSecretMarker,
|
|
10
|
+
} from "./config-secrets";
|
|
11
|
+
|
|
12
|
+
const collectorSchema = z.object({
|
|
13
|
+
url: z.string(),
|
|
14
|
+
password: configSecret({ id: "password" }).optional(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
function fakeInternalSecrets(): InternalSecretsService & {
|
|
18
|
+
store: Map<string, string>;
|
|
19
|
+
} {
|
|
20
|
+
const store = new Map<string, string>();
|
|
21
|
+
return {
|
|
22
|
+
store,
|
|
23
|
+
async set({ parts, value }) {
|
|
24
|
+
store.set(internalSecretName(...parts), value);
|
|
25
|
+
},
|
|
26
|
+
async get({ parts }) {
|
|
27
|
+
return store.get(internalSecretName(...parts));
|
|
28
|
+
},
|
|
29
|
+
async delete({ parts }) {
|
|
30
|
+
store.delete(internalSecretName(...parts));
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const noopLogger = {
|
|
36
|
+
debug: mock(() => {}),
|
|
37
|
+
info: mock(() => {}),
|
|
38
|
+
warn: mock(() => {}),
|
|
39
|
+
error: mock(() => {}),
|
|
40
|
+
} as never;
|
|
41
|
+
|
|
42
|
+
describe("backfillConfigSecrets", () => {
|
|
43
|
+
it("migrates a registered collector's inline secret even under an UNREGISTERED strategy, per config lock", async () => {
|
|
44
|
+
// One legacy row: strategy plugin is gone, but the collector plugin is
|
|
45
|
+
// present and its config carries an inline plaintext secret.
|
|
46
|
+
let row: Record<string, unknown> = {
|
|
47
|
+
id: "cfg-bf",
|
|
48
|
+
strategyId: "gone.strategy",
|
|
49
|
+
config: { url: "https://x", password: "strategy-plain" }, // no schema -> left as-is
|
|
50
|
+
collectors: [
|
|
51
|
+
{
|
|
52
|
+
id: "c1",
|
|
53
|
+
collectorId: "reg.collector",
|
|
54
|
+
config: { url: "https://y", password: "collector-plain" },
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
const updates: Record<string, unknown>[] = [];
|
|
59
|
+
const db = {
|
|
60
|
+
// Initial scan: `db.select().from(table)` awaited directly.
|
|
61
|
+
// Per-row re-read: `db.select().from(table).where(eq(...))`.
|
|
62
|
+
select: () => ({
|
|
63
|
+
from: () =>
|
|
64
|
+
Object.assign(Promise.resolve([row]), {
|
|
65
|
+
where: () => Promise.resolve([row]),
|
|
66
|
+
}),
|
|
67
|
+
}),
|
|
68
|
+
update: () => ({
|
|
69
|
+
set: (set: Record<string, unknown>) => {
|
|
70
|
+
updates.push(set);
|
|
71
|
+
row = { ...row, ...set };
|
|
72
|
+
return { where: () => Promise.resolve(undefined) };
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const registry = { getStrategy: mock(() => undefined) };
|
|
78
|
+
const collectorRegistry = {
|
|
79
|
+
getCollector: mock((id: string) =>
|
|
80
|
+
id === "reg.collector"
|
|
81
|
+
? { collector: { config: new Versioned({ version: 1, schema: collectorSchema }) } }
|
|
82
|
+
: undefined,
|
|
83
|
+
),
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const lockKeys: string[] = [];
|
|
87
|
+
const advisoryLock = {
|
|
88
|
+
tryAcquire: mock(async () => ({ release: mock(async () => {}) })),
|
|
89
|
+
withXactLock: async ({ key, fn }: { key: string; fn: () => Promise<unknown> }) => {
|
|
90
|
+
lockKeys.push(key);
|
|
91
|
+
return fn();
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const internalSecrets = fakeInternalSecrets();
|
|
96
|
+
|
|
97
|
+
await backfillConfigSecrets({
|
|
98
|
+
db: db as never,
|
|
99
|
+
registry: registry as never,
|
|
100
|
+
collectorRegistry: collectorRegistry as never,
|
|
101
|
+
internalSecrets,
|
|
102
|
+
advisoryLock: advisoryLock as never,
|
|
103
|
+
logger: noopLogger,
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Per-config lock was taken for the row.
|
|
107
|
+
expect(lockKeys).toEqual([healthcheckConfigLockKey("cfg-bf")]);
|
|
108
|
+
|
|
109
|
+
// The collector's inline secret was migrated to a marker + the store.
|
|
110
|
+
const persistedCollectors = updates.at(-1)?.collectors as Array<{
|
|
111
|
+
config: Record<string, unknown>;
|
|
112
|
+
}>;
|
|
113
|
+
expect(
|
|
114
|
+
isHealthcheckSecretMarker(persistedCollectors[0].config.password as string),
|
|
115
|
+
).toBe(true);
|
|
116
|
+
expect([...internalSecrets.store.values()]).toContain("collector-plain");
|
|
117
|
+
|
|
118
|
+
// The strategy config (no schema to walk) is left untouched - never wiped,
|
|
119
|
+
// and its legacy plaintext is NOT migrated (nothing else we can do).
|
|
120
|
+
const persistedConfig = updates.at(-1)?.config as Record<string, unknown>;
|
|
121
|
+
expect(persistedConfig.password).toBe("strategy-plain");
|
|
122
|
+
expect([...internalSecrets.store.values()]).not.toContain("strategy-plain");
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it("skips the scan entirely when another pod holds the backfill lock", async () => {
|
|
126
|
+
const advisoryLock = {
|
|
127
|
+
tryAcquire: mock(async () => undefined), // lock not acquired
|
|
128
|
+
withXactLock: mock(async () => {
|
|
129
|
+
throw new Error("must not run when the global lock is unavailable");
|
|
130
|
+
}),
|
|
131
|
+
};
|
|
132
|
+
await backfillConfigSecrets({
|
|
133
|
+
db: {} as never,
|
|
134
|
+
registry: {} as never,
|
|
135
|
+
collectorRegistry: {} as never,
|
|
136
|
+
internalSecrets: fakeInternalSecrets(),
|
|
137
|
+
advisoryLock: advisoryLock as never,
|
|
138
|
+
logger: noopLogger,
|
|
139
|
+
});
|
|
140
|
+
expect(advisoryLock.withXactLock).not.toHaveBeenCalled();
|
|
141
|
+
});
|
|
142
|
+
});
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import type {
|
|
3
|
+
AdvisoryLockService,
|
|
4
|
+
HealthCheckRegistry,
|
|
5
|
+
CollectorRegistry,
|
|
6
|
+
Logger,
|
|
7
|
+
SafeDatabase,
|
|
8
|
+
} from "@checkstack/backend-api";
|
|
9
|
+
import type { InternalSecretsService } from "@checkstack/secrets-backend";
|
|
10
|
+
import type { CollectorConfigEntry } from "@checkstack/healthcheck-common";
|
|
11
|
+
import { healthCheckConfigurations } from "./schema";
|
|
12
|
+
import * as schema from "./schema";
|
|
13
|
+
import {
|
|
14
|
+
extractConfigurationSecrets,
|
|
15
|
+
healthcheckConfigLockKey,
|
|
16
|
+
} from "./config-secrets";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* One-time (idempotent) boot backfill: move inline `x-secret` values that
|
|
20
|
+
* pre-date the config-secrets channel out of stored health-check
|
|
21
|
+
* configurations and into internal secrets.
|
|
22
|
+
*
|
|
23
|
+
* Rows written after the channel shipped hold only markers / `${{ secrets.* }}`
|
|
24
|
+
* references, which the extraction walk skips - so re-running is a no-op and
|
|
25
|
+
* the job is safe to run on EVERY boot. A cross-pod advisory lock ensures a
|
|
26
|
+
* single pod performs the scan; the others skip (the winner's result is in
|
|
27
|
+
* the shared DB either way).
|
|
28
|
+
*
|
|
29
|
+
* Fail-open per row: one row with an unregistered strategy (plugin removed)
|
|
30
|
+
* or a broken shape must not wedge boot - it is logged and left as-is; the
|
|
31
|
+
* executor treats its bare literal exactly as before (legacy pass-through).
|
|
32
|
+
*/
|
|
33
|
+
export async function backfillConfigSecrets({
|
|
34
|
+
db,
|
|
35
|
+
registry,
|
|
36
|
+
collectorRegistry,
|
|
37
|
+
internalSecrets,
|
|
38
|
+
advisoryLock,
|
|
39
|
+
logger,
|
|
40
|
+
}: {
|
|
41
|
+
db: SafeDatabase<typeof schema>;
|
|
42
|
+
registry: HealthCheckRegistry;
|
|
43
|
+
collectorRegistry: CollectorRegistry;
|
|
44
|
+
internalSecrets: InternalSecretsService;
|
|
45
|
+
advisoryLock: AdvisoryLockService;
|
|
46
|
+
logger: Logger;
|
|
47
|
+
}): Promise<void> {
|
|
48
|
+
const lock = await advisoryLock.tryAcquire("healthcheck:config-secrets-backfill");
|
|
49
|
+
if (!lock) {
|
|
50
|
+
logger.debug("Config-secrets backfill already running on another pod, skipping");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
try {
|
|
55
|
+
const rows = await db.select().from(healthCheckConfigurations);
|
|
56
|
+
let migratedRows = 0;
|
|
57
|
+
let movedValues = 0;
|
|
58
|
+
|
|
59
|
+
for (const { id: rowId } of rows) {
|
|
60
|
+
// Serialize each row's read-modify-write under the SAME per-config lock
|
|
61
|
+
// updateConfiguration uses, and re-read the row INSIDE the lock. Without
|
|
62
|
+
// this the backfill could write back a pre-lock snapshot over a concurrent
|
|
63
|
+
// edit - resurrecting a just-rotated secret and reverting the edit.
|
|
64
|
+
await advisoryLock.withXactLock({
|
|
65
|
+
key: healthcheckConfigLockKey(rowId),
|
|
66
|
+
fn: async () => {
|
|
67
|
+
const [row] = await db
|
|
68
|
+
.select()
|
|
69
|
+
.from(healthCheckConfigurations)
|
|
70
|
+
.where(eq(healthCheckConfigurations.id, rowId));
|
|
71
|
+
if (!row) return; // deleted between the scan and the lock
|
|
72
|
+
|
|
73
|
+
// An unregistered strategy has no schema: its own strategy-level
|
|
74
|
+
// legacy secrets stay as-is (pass-through, as before), but we still
|
|
75
|
+
// migrate every REGISTERED collector's inline secrets rather than
|
|
76
|
+
// skipping the whole row - leaving those plaintext would defeat the
|
|
77
|
+
// backfill. extractConfigurationSecrets handles the undefined schema.
|
|
78
|
+
const strategySchema =
|
|
79
|
+
registry.getStrategy(row.strategyId)?.config.schema;
|
|
80
|
+
if (!strategySchema) {
|
|
81
|
+
logger.warn(
|
|
82
|
+
`Config-secrets backfill: strategy ${row.strategyId} not registered; leaving its strategy config as-is and migrating collector secrets for configuration ${row.id}`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
const collectors: CollectorConfigEntry[] | undefined =
|
|
88
|
+
row.collectors ?? undefined;
|
|
89
|
+
const extracted = await extractConfigurationSecrets({
|
|
90
|
+
configurationId: row.id,
|
|
91
|
+
strategySchema,
|
|
92
|
+
config: row.config as Record<string, unknown>,
|
|
93
|
+
collectors,
|
|
94
|
+
getCollectorSchema: (collectorId) =>
|
|
95
|
+
collectorRegistry.getCollector(collectorId)?.collector.config
|
|
96
|
+
.schema,
|
|
97
|
+
internalSecrets,
|
|
98
|
+
});
|
|
99
|
+
if (extracted.extracted === 0) return;
|
|
100
|
+
|
|
101
|
+
await db
|
|
102
|
+
.update(healthCheckConfigurations)
|
|
103
|
+
.set({
|
|
104
|
+
config: extracted.config,
|
|
105
|
+
collectors: extracted.collectors,
|
|
106
|
+
updatedAt: new Date(),
|
|
107
|
+
})
|
|
108
|
+
.where(eq(healthCheckConfigurations.id, row.id));
|
|
109
|
+
migratedRows++;
|
|
110
|
+
movedValues += extracted.extracted;
|
|
111
|
+
} catch (error) {
|
|
112
|
+
logger.warn(
|
|
113
|
+
`Config-secrets backfill: failed for configuration ${row.id}, leaving as-is`,
|
|
114
|
+
error,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (migratedRows > 0) {
|
|
122
|
+
logger.info(
|
|
123
|
+
`Config-secrets backfill: moved ${movedValues} inline secret value(s) from ${migratedRows} configuration(s) into the internal secret store`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
} finally {
|
|
127
|
+
await lock.release();
|
|
128
|
+
}
|
|
129
|
+
}
|