@checkstack/gitops-backend 0.2.0 → 0.2.1

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,17 @@
1
1
  # @checkstack/gitops-backend
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 57d54de: Fix GitOps Healthcheck reconciliation engine and Kind Registry UI
8
+
9
+ - Mandated fully qualified IDs for all healthcheck strategies and collector definitions.
10
+ - Refactored the Kind Registry UI to display schema documentation in beautifully formatted, interactive YAML examples.
11
+ - Entity Envelope Fields and Base Spec Schema are now displayed in collapsed accordions.
12
+ - Fixed condition logic that broke the collector documentation display.
13
+ - Enhanced UX by dynamically injecting fully-qualified strategy variants directly into the YAML examples.
14
+
3
15
  ## 0.2.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/gitops-backend",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@checkstack/backend-api": "0.12.0",
17
- "@checkstack/gitops-common": "0.1.1",
17
+ "@checkstack/gitops-common": "0.2.0",
18
18
  "@checkstack/common": "0.6.5",
19
19
  "@checkstack/command-backend": "0.1.19",
20
20
  "@checkstack/queue-api": "0.2.13",
@@ -381,7 +381,8 @@ async function detectOrphans(params: {
381
381
  kind: prov.kind,
382
382
  });
383
383
 
384
- if (kindDef?.delete) {
384
+ // Do not call delete reconciler if it's a pending error record
385
+ if (kindDef?.delete && !prov.entityId.startsWith("pending-")) {
385
386
  try {
386
387
  await kindDef.delete({
387
388
  entityName: prov.entityName,
@@ -484,18 +485,17 @@ async function upsertProvenance(params: {
484
485
  return;
485
486
  }
486
487
 
487
- // First-time error: no entityId available yet, skip provenance creation.
488
- // The entity will be retried on the next sync cycle.
489
- if (!entityId) {
490
- return;
491
- }
488
+ // First-time error: no entityId available yet because the entity failed to create.
489
+ // We MUST create a provenance record anyway so the error shows in the UI.
490
+ // We use a "pending-" prefix so the orphan detector knows not to call the delete reconciler.
491
+ const resolvedEntityId = entityId ?? `pending-${uuidv4()}`;
492
492
 
493
493
  await db.insert(schema.provenance).values({
494
494
  id: uuidv4(),
495
495
  apiVersion: entity.apiVersion,
496
496
  kind: entity.kind,
497
497
  entityName: entity.metadata.name,
498
- entityId,
498
+ entityId: resolvedEntityId,
499
499
  providerId,
500
500
  repository: file.repository,
501
501
  filePath: file.filePath,