From 0285302ecc822908952fdcb256dc086972ac663b Mon Sep 17 00:00:00 2001 From: CodeShell <122738806+CodeShellDev@users.noreply.github.com> Date: Fri, 9 Jan 2026 10:36:46 +0000 Subject: [PATCH 1/3] bump mongo image version for arm arch to `.30` --- docker/dist-arm/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/dist-arm/docker-compose.yaml b/docker/dist-arm/docker-compose.yaml index 0a5825b3e..9a87aa59b 100644 --- a/docker/dist-arm/docker-compose.yaml +++ b/docker/dist-arm/docker-compose.yaml @@ -15,7 +15,7 @@ services: depends_on: - mongodb mongodb: - image: mongo:4.4.18 + image: mongo:4.4.30 restart: always command: ["mongod", "--quiet", "--bind_ip_all"] ports: From e79bf28bdc8b58ff5bdf5180fbc52f89e9acbd0f Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 13 Jan 2026 20:20:29 +0000 Subject: [PATCH 2/3] server format --- .../0002_convertChecksToTimeSeries.ts | 22 ++++++++++--------- server/src/db/migration/index.ts | 6 +---- server/src/db/models/Check.ts | 10 ++------- .../service/infrastructure/statusService.js | 2 +- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/server/src/db/migration/0002_convertChecksToTimeSeries.ts b/server/src/db/migration/0002_convertChecksToTimeSeries.ts index 46e6fbc97..a6c503804 100644 --- a/server/src/db/migration/0002_convertChecksToTimeSeries.ts +++ b/server/src/db/migration/0002_convertChecksToTimeSeries.ts @@ -19,10 +19,10 @@ const backupAndDropExistingCollection = async () => { return false; } - await db.collection(CHECKS_COLLECTION).aggregate([ - { $match: {} }, - { $out: BACKUP_COLLECTION }, - ]).toArray(); + await db + .collection(CHECKS_COLLECTION) + .aggregate([{ $match: {} }, { $out: BACKUP_COLLECTION }]) + .toArray(); await db.collection(CHECKS_COLLECTION).drop(); return true; }; @@ -40,12 +40,14 @@ const createTimeSeriesCollection = async () => { }); } - await db.collection(CHECKS_COLLECTION).createIndexes([ - { key: { updatedAt: 1 } }, - { key: { "metadata.monitorId": 1, updatedAt: 1 } }, - { key: { "metadata.monitorId": 1, updatedAt: -1 } }, - { key: { "metadata.teamId": 1, updatedAt: -1 } }, - ]); + await db + .collection(CHECKS_COLLECTION) + .createIndexes([ + { key: { updatedAt: 1 } }, + { key: { "metadata.monitorId": 1, updatedAt: 1 } }, + { key: { "metadata.monitorId": 1, updatedAt: -1 } }, + { key: { "metadata.teamId": 1, updatedAt: -1 } }, + ]); }; const migrateBackupData = async () => { diff --git a/server/src/db/migration/index.ts b/server/src/db/migration/index.ts index de2a1dee7..c8e9e7c75 100644 --- a/server/src/db/migration/index.ts +++ b/server/src/db/migration/index.ts @@ -32,11 +32,7 @@ const runMigrations = async (logger?: { info: Function; error: Function }) => { logger?.info({ message: `Completed ${migration.name}`, service: "Migrations" }); } catch (error) { const err = error as Error; - await MigrationModel.findOneAndUpdate( - { name: migration.name }, - { status: "failed", error: err?.message }, - { upsert: true } - ); + await MigrationModel.findOneAndUpdate({ name: migration.name }, { status: "failed", error: err?.message }, { upsert: true }); throw error; } } diff --git a/server/src/db/models/Check.ts b/server/src/db/models/Check.ts index 3ebacd3f6..fe6f16836 100644 --- a/server/src/db/models/Check.ts +++ b/server/src/db/models/Check.ts @@ -1,8 +1,5 @@ import { Schema, model, Types } from "mongoose"; -import { - MonitorTypes, - type MonitorType, -} from "@/types/monitor.js"; +import { MonitorTypes, type MonitorType } from "@/types/monitor.js"; import type { Check, CheckAudits, @@ -25,10 +22,7 @@ type CheckMetadataDocument = Omit & { type: MonitorType; }; -type CheckDocumentBase = Omit< - Check, - "id" | "metadata" | "expiry" | "ackAt" | "createdAt" | "updatedAt" -> & { +type CheckDocumentBase = Omit & { metadata: CheckMetadataDocument; expiry: Date; ackAt?: Date | null; diff --git a/server/src/service/infrastructure/statusService.js b/server/src/service/infrastructure/statusService.js index 5b64c7419..3aa1ced52 100755 --- a/server/src/service/infrastructure/statusService.js +++ b/server/src/service/infrastructure/statusService.js @@ -374,7 +374,7 @@ class StatusService { return { id: audit.id, title: audit.title, - score: typeof audit.score === "number" ? audit.score : audit.score ?? null, + score: typeof audit.score === "number" ? audit.score : (audit.score ?? null), displayValue: audit.displayValue, numericValue: typeof audit.numericValue === "number" ? audit.numericValue : undefined, numericUnit: audit.numericUnit, From f763126b38daad0977b20383e2b4add98a8585ee Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 13 Jan 2026 20:20:50 +0000 Subject: [PATCH 3/3] format' --- .../src/Pages/Incidents/Components/IncidentTable/index.jsx | 6 +++++- client/src/Pages/Incidents/index.jsx | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/src/Pages/Incidents/Components/IncidentTable/index.jsx b/client/src/Pages/Incidents/Components/IncidentTable/index.jsx index 78d6d26be..e066049e6 100644 --- a/client/src/Pages/Incidents/Components/IncidentTable/index.jsx +++ b/client/src/Pages/Incidents/Components/IncidentTable/index.jsx @@ -18,7 +18,11 @@ import { useSelector } from "react-redux"; import { useState } from "react"; import PropTypes from "prop-types"; import { useTranslation } from "react-i18next"; -import { useFetchChecksTeam, useFetchChecksByMonitor, useResolveIncident } from "@/Hooks/checkHooks.js"; +import { + useFetchChecksTeam, + useFetchChecksByMonitor, + useResolveIncident, +} from "@/Hooks/checkHooks.js"; import { Button, Typography, useTheme } from "@mui/material"; import { lighten } from "@mui/material/styles"; diff --git a/client/src/Pages/Incidents/index.jsx b/client/src/Pages/Incidents/index.jsx index c8462f649..698fc4a2f 100644 --- a/client/src/Pages/Incidents/index.jsx +++ b/client/src/Pages/Incidents/index.jsx @@ -10,7 +10,10 @@ import { Box, Button } from "@mui/material"; //Utils import { useTheme } from "@emotion/react"; import { useFetchMonitorsByTeamId } from "@/Hooks/monitorHooks.js"; -import { useFetchChecksSummaryByTeamId, useAcknowledgeChecks } from "@/Hooks/checkHooks.js"; +import { + useFetchChecksSummaryByTeamId, + useAcknowledgeChecks, +} from "@/Hooks/checkHooks.js"; import { useState, useEffect } from "react"; import NetworkError from "@/Components/v1/GenericFallback/NetworkError.jsx"; import { useTranslation } from "react-i18next";