@checkstack/healthcheck-backend 0.16.2 → 0.16.3
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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @checkstack/healthcheck-backend
|
|
2
2
|
|
|
3
|
+
## 0.16.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b53a40e: Fix GitOps entity update failures due to pending error records
|
|
8
|
+
|
|
9
|
+
- Ensured the `existingEntityId` parameter in the Reconciler engine is set to `undefined` instead of a `"pending-UUID"` when handling entities that failed to sync initially.
|
|
10
|
+
- Hardened the `Healthcheck` GitOps kind logic to explicitly ignore `"pending-"` IDs, preventing SQL update errors on synthetic provenance IDs.
|
|
11
|
+
- Fixed a bug where resolving YAML syntax errors would cause the subsequent sync to fail with `failed query: update [...]` because it attempted to update the nonexistent `"pending-"` entity instead of creating a new one.
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [b53a40e]
|
|
14
|
+
- @checkstack/gitops-backend@0.2.2
|
|
15
|
+
- @checkstack/catalog-backend@0.5.3
|
|
16
|
+
- @checkstack/satellite-backend@0.2.11
|
|
17
|
+
|
|
3
18
|
## 0.16.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/healthcheck-backend",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"checkstack": {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@checkstack/backend-api": "0.12.0",
|
|
17
|
-
"@checkstack/catalog-backend": "0.5.
|
|
18
|
-
"@checkstack/catalog-common": "1.4.
|
|
17
|
+
"@checkstack/catalog-backend": "0.5.1",
|
|
18
|
+
"@checkstack/catalog-common": "1.4.1",
|
|
19
19
|
"@checkstack/command-backend": "0.1.19",
|
|
20
20
|
"@checkstack/common": "0.6.5",
|
|
21
21
|
"@checkstack/gitops-backend": "0.2.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@checkstack/integration-backend": "0.1.19",
|
|
26
26
|
"@checkstack/maintenance-common": "0.4.9",
|
|
27
27
|
"@checkstack/queue-api": "0.2.13",
|
|
28
|
-
"@checkstack/satellite-backend": "0.2.
|
|
28
|
+
"@checkstack/satellite-backend": "0.2.9",
|
|
29
29
|
"@checkstack/signal-common": "0.1.9",
|
|
30
30
|
"@hono/zod-validator": "^0.7.6",
|
|
31
31
|
"drizzle-orm": "^0.45.0",
|
|
@@ -259,6 +259,36 @@ describe("Healthcheck GitOps Kind: Healthcheck", () => {
|
|
|
259
259
|
expect(mockService.configs[0].strategyId).toBe("postgres");
|
|
260
260
|
});
|
|
261
261
|
|
|
262
|
+
it("creates a new configuration when existingEntityId is a pending error record", async () => {
|
|
263
|
+
const kind = buildKind();
|
|
264
|
+
|
|
265
|
+
const result = await kind.reconcile({
|
|
266
|
+
entity: {
|
|
267
|
+
apiVersion: CHECKSTACK_API_VERSION,
|
|
268
|
+
kind: "Healthcheck",
|
|
269
|
+
metadata: { name: "payment-db-check" },
|
|
270
|
+
spec: {
|
|
271
|
+
strategy: "postgres",
|
|
272
|
+
intervalSeconds: 30,
|
|
273
|
+
config: {
|
|
274
|
+
host: "db.internal",
|
|
275
|
+
port: 5432,
|
|
276
|
+
database: "payments",
|
|
277
|
+
user: "monitor",
|
|
278
|
+
password: "secret",
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
existingEntityId: "pending-12345",
|
|
283
|
+
context: mockContext,
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
expect(result.entityId).toBe("hc-1");
|
|
287
|
+
expect(mockService.createConfiguration).toHaveBeenCalledTimes(1);
|
|
288
|
+
expect(mockService.updateConfiguration).not.toHaveBeenCalled();
|
|
289
|
+
expect(mockService.configs).toHaveLength(1);
|
|
290
|
+
});
|
|
291
|
+
|
|
262
292
|
it("updates an existing configuration using existingEntityId", async () => {
|
|
263
293
|
const kind = buildKind();
|
|
264
294
|
|
|
@@ -196,7 +196,7 @@ export function buildHealthcheckKind(
|
|
|
196
196
|
// Create or update configuration
|
|
197
197
|
const displayName = entity.metadata.title ?? entity.metadata.name;
|
|
198
198
|
|
|
199
|
-
if (existingEntityId) {
|
|
199
|
+
if (existingEntityId && !existingEntityId.startsWith("pending-")) {
|
|
200
200
|
await service.updateConfiguration(existingEntityId, {
|
|
201
201
|
name: displayName,
|
|
202
202
|
strategyId: spec.strategy,
|