@checkstack/catalog-backend 0.5.3 → 0.6.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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # @checkstack/catalog-backend
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 298bf42: ### Notification System Optimizations
8
+
9
+ **System context in notifications**: All notification senders (healthcheck, incident, maintenance, dependency) now include the affected system name in the notification title and body. Users can immediately identify which system is affected without clicking through to the detail page.
10
+
11
+ **Upstream notification deduplication**: When an upstream dependency goes down affecting multiple downstream systems, the dependency notification sidecar now sends **one personalized notification per user** instead of one notification per affected system. Each user's notification lists only the systems they are subscribed to, with a link to the upstream root cause system. This prevents notification floods for users subscribed to groups containing many dependent systems.
12
+
13
+ **New catalog endpoint**: Added `getSystemGroupIds` S2S RPC endpoint on the catalog to resolve which catalog groups contain a given system, used by the dependency plugin for efficient subscriber resolution during batched notification dispatch.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [298bf42]
18
+ - @checkstack/catalog-common@1.5.0
19
+
20
+ ## 0.5.4
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [adc89a8]
25
+ - @checkstack/gitops-backend@0.2.3
26
+
3
27
  ## 0.5.3
4
28
 
5
29
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/catalog-backend",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -18,7 +18,7 @@
18
18
  "@checkstack/catalog-common": "1.4.1",
19
19
  "@checkstack/command-backend": "0.1.19",
20
20
  "@checkstack/auth-backend": "0.4.19",
21
- "@checkstack/gitops-backend": "0.2.0",
21
+ "@checkstack/gitops-backend": "0.2.3",
22
22
  "@checkstack/gitops-common": "0.2.0",
23
23
  "@checkstack/notification-common": "0.2.8",
24
24
  "@orpc/server": "^1.13.2",
package/src/router.ts CHANGED
@@ -415,6 +415,21 @@ export const createCatalogRouter = ({
415
415
  },
416
416
  );
417
417
 
418
+ /**
419
+ * Get the catalog group IDs that contain a specific system.
420
+ * Used by the dependency plugin for batched notification deduplication.
421
+ */
422
+ const getSystemGroupIds = os.getSystemGroupIds.handler(
423
+ async ({ input }) => {
424
+ const systemGroups = await database
425
+ .select({ groupId: schema.systemsGroups.groupId })
426
+ .from(schema.systemsGroups)
427
+ .where(eq(schema.systemsGroups.systemId, input.systemId));
428
+
429
+ return { groupIds: systemGroups.map((sg) => sg.groupId) };
430
+ },
431
+ );
432
+
418
433
  // Build and return the router
419
434
  return os.router({
420
435
  getEntities,
@@ -435,7 +450,9 @@ export const createCatalogRouter = ({
435
450
  getViews,
436
451
  createView,
437
452
  notifySystemSubscribers,
453
+ getSystemGroupIds,
438
454
  });
439
455
  };
440
456
 
457
+
441
458
  export type CatalogRouter = ReturnType<typeof createCatalogRouter>;