From b756b55d68c0cf74f18df27a1e7934a1c62fae22 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Tue, 9 Jan 2024 19:55:46 +0530 Subject: [PATCH 1/5] remove force-dynamic --- ui/app/mirrors/edit/[mirrorId]/page.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/app/mirrors/edit/[mirrorId]/page.tsx b/ui/app/mirrors/edit/[mirrorId]/page.tsx index 7e5de948f9..57a8cf9d09 100644 --- a/ui/app/mirrors/edit/[mirrorId]/page.tsx +++ b/ui/app/mirrors/edit/[mirrorId]/page.tsx @@ -8,8 +8,6 @@ import { CDCMirror } from './cdc'; import NoMirror from './nomirror'; import SyncStatus from './syncStatus'; -export const dynamic = 'force-dynamic'; - type EditMirrorProps = { params: { mirrorId: string }; }; From 1d51fd6b4f69c25a05c9f9fc8973bed86654581f Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Tue, 9 Jan 2024 20:28:44 +0530 Subject: [PATCH 2/5] remove more force-dynamic --- ui/app/mirrors/status/qrep/[mirrorId]/page.tsx | 2 -- ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx | 2 -- ui/app/peers/[peerName]/page.tsx | 1 - 3 files changed, 5 deletions(-) diff --git a/ui/app/mirrors/status/qrep/[mirrorId]/page.tsx b/ui/app/mirrors/status/qrep/[mirrorId]/page.tsx index c0a40085b3..eeaec8cb77 100644 --- a/ui/app/mirrors/status/qrep/[mirrorId]/page.tsx +++ b/ui/app/mirrors/status/qrep/[mirrorId]/page.tsx @@ -5,8 +5,6 @@ import QRepConfigViewer from './qrepConfigViewer'; import QrepGraph from './qrepGraph'; import QRepStatusTable, { QRepPartitionStatus } from './qrepStatusTable'; -export const dynamic = 'force-dynamic'; - type QRepMirrorStatusProps = { params: { mirrorId: string }; }; diff --git a/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx b/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx index ac070d744d..b822fe29e7 100644 --- a/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx +++ b/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx @@ -5,8 +5,6 @@ import { Icon } from '@/lib/Icon'; import { Label } from '@/lib/Label'; import { ProgressCircle } from '@/lib/ProgressCircle'; -export const dynamic = 'force-dynamic'; - type QRepConfigViewerProps = { mirrorId: string; }; diff --git a/ui/app/peers/[peerName]/page.tsx b/ui/app/peers/[peerName]/page.tsx index 78bd430bf3..45ddb41e61 100644 --- a/ui/app/peers/[peerName]/page.tsx +++ b/ui/app/peers/[peerName]/page.tsx @@ -5,7 +5,6 @@ import { GetFlowHttpAddressFromEnv } from '@/rpc/http'; import Link from 'next/link'; import SlotTable from './slottable'; import StatTable from './stattable'; -export const dynamic = 'force-dynamic'; type DataConfigProps = { params: { peerName: string }; From 28843e14fa2711440c77941c867fab6b11b72ef4 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Tue, 9 Jan 2024 20:29:20 +0530 Subject: [PATCH 3/5] log mirror status endpoint call --- flow/cmd/mirror_status.go | 1 + 1 file changed, 1 insertion(+) diff --git a/flow/cmd/mirror_status.go b/flow/cmd/mirror_status.go index 45c2a134e3..60505089c6 100644 --- a/flow/cmd/mirror_status.go +++ b/flow/cmd/mirror_status.go @@ -17,6 +17,7 @@ func (h *FlowRequestHandler) MirrorStatus( ctx context.Context, req *protos.MirrorStatusRequest, ) (*protos.MirrorStatusResponse, error) { + slog.Info("Mirror status endpoint called") cdcFlow, err := h.isCDCFlow(ctx, req.FlowJobName) if err != nil { return &protos.MirrorStatusResponse{ From 5df5cb128bda215d2d2b61b4804505e91cc8dced Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Tue, 9 Jan 2024 20:44:27 +0530 Subject: [PATCH 4/5] more logs --- flow/cmd/mirror_status.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow/cmd/mirror_status.go b/flow/cmd/mirror_status.go index 60505089c6..546fad1791 100644 --- a/flow/cmd/mirror_status.go +++ b/flow/cmd/mirror_status.go @@ -17,7 +17,7 @@ func (h *FlowRequestHandler) MirrorStatus( ctx context.Context, req *protos.MirrorStatusRequest, ) (*protos.MirrorStatusResponse, error) { - slog.Info("Mirror status endpoint called") + slog.Info("Mirror status endpoint called", slog.String(string(shared.FlowNameKey), req.FlowJobName)) cdcFlow, err := h.isCDCFlow(ctx, req.FlowJobName) if err != nil { return &protos.MirrorStatusResponse{ @@ -74,6 +74,7 @@ func (h *FlowRequestHandler) CDCFlowStatus( ctx context.Context, req *protos.MirrorStatusRequest, ) (*protos.CDCMirrorStatus, error) { + slog.Info("CDC mirror status endpoint called", slog.String(string(shared.FlowNameKey), req.FlowJobName)) config, err := h.getFlowConfigFromCatalog(req.FlowJobName) if err != nil { return nil, err @@ -173,6 +174,7 @@ func (h *FlowRequestHandler) QRepFlowStatus( ctx context.Context, req *protos.MirrorStatusRequest, ) (*protos.QRepMirrorStatus, error) { + slog.Info("QRep Flow status endpoint called", slog.String(string(shared.FlowNameKey), req.FlowJobName)) partitionStatuses, err := h.getPartitionStatuses(ctx, req.FlowJobName) if err != nil { slog.Error(fmt.Sprintf("unable to query qrep partition - %s: %s", req.FlowJobName, err.Error())) From c3794ae36a0651b8f9fd936a2ec22991597a705a Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Tue, 9 Jan 2024 21:06:04 +0530 Subject: [PATCH 5/5] remove more force dynamic --- ui/app/api/alert-config/route.ts | 2 -- ui/app/api/mirrors/alerts/route.ts | 2 -- ui/app/mirrors/page.tsx | 2 -- 3 files changed, 6 deletions(-) diff --git a/ui/app/api/alert-config/route.ts b/ui/app/api/alert-config/route.ts index 64d5a24f06..816ef4db46 100644 --- a/ui/app/api/alert-config/route.ts +++ b/ui/app/api/alert-config/route.ts @@ -1,8 +1,6 @@ import { alertConfigType } from '@/app/alert-config/validation'; import prisma from '@/app/utils/prisma'; -export const dynamic = 'force-dynamic'; - export async function GET() { const configs = await prisma.alerting_config.findMany(); const serializedConfigs = configs.map((config) => ({ diff --git a/ui/app/api/mirrors/alerts/route.ts b/ui/app/api/mirrors/alerts/route.ts index 13cc612503..3596c4a294 100644 --- a/ui/app/api/mirrors/alerts/route.ts +++ b/ui/app/api/mirrors/alerts/route.ts @@ -1,7 +1,5 @@ import prisma from '@/app/utils/prisma'; -export const dynamic = 'force-dynamic'; - export async function POST(request: Request) { const { flowName } = await request.json(); const errCount = await prisma.flow_errors.count({ diff --git a/ui/app/mirrors/page.tsx b/ui/app/mirrors/page.tsx index 59bee320d3..0fe7012806 100644 --- a/ui/app/mirrors/page.tsx +++ b/ui/app/mirrors/page.tsx @@ -13,8 +13,6 @@ import useSWR from 'swr'; import { fetcher } from '../utils/swr'; import { CDCFlows, QRepFlows } from './tables'; -export const dynamic = 'force-dynamic'; - export default function Mirrors() { const { data: flows,