Skip to content

Commit

Permalink
Merge branch 'main' into alerting-v1-evervigil
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal authored Dec 9, 2023
2 parents 0ad9858 + ed5792a commit 78c46e5
Show file tree
Hide file tree
Showing 17 changed files with 147 additions and 155 deletions.
239 changes: 123 additions & 116 deletions nexus/Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nexus/parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ anyhow = "1"
async-trait = "0.1"
catalog = { path = "../catalog" }
futures = { version = "0.3.28", features = ["executor"] }
pgwire = "0.16"
pgwire = "0.17"
pt = { path = "../pt" }
rand = "0.8"
sqlparser = { path = "../sqlparser-rs" }
Expand Down
2 changes: 1 addition & 1 deletion nexus/peer-bigquery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ futures = { version = "0.3.28", features = ["executor"] }
peer-cursor = { path = "../peer-cursor" }
peer-connections = { path = "../peer-connections" }
pgerror = { path = "../pgerror" }
pgwire = "0.16"
pgwire = "0.17"
pt = { path = "../pt" }
rust_decimal = { version = "1.30.0", features = [ "tokio-pg" ] }
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion nexus/peer-cursor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ anyhow = "1.0"
async-trait = "0.1"
futures = "0.3"
pgerror = { path = "../pgerror" }
pgwire = "0.16"
pgwire = "0.17"
sqlparser = { path = "../sqlparser-rs" }
tokio = { version = "1.0", features = ["full"] }
value = { path = "../value" }
2 changes: 1 addition & 1 deletion nexus/peer-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ futures = "0.3"
peer-cursor = { path = "../peer-cursor" }
peer-connections = { path = "../peer-connections" }
pgerror = { path = "../pgerror" }
pgwire = "0.16"
pgwire = "0.17"
postgres-connection = { path = "../postgres-connection" }
pt = { path = "../pt" }
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion nexus/peer-snowflake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async-trait = "0.1.57"
jsonwebtoken = { version = "9.0", features = ["use_pem"] }
base64 = "0.21"
dashmap = "5.0"
pgwire = "0.16"
pgwire = "0.17"
sha2 = "0.10"
pt = { path = "../pt" }
pkcs8 = { version = "0.10.2", features = ["std", "pem", "encryption"] }
Expand Down
2 changes: 1 addition & 1 deletion nexus/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ peer-cursor = { path = "../peer-cursor" }
peer-postgres = { path = "../peer-postgres" }
peer-snowflake = { path = "../peer-snowflake" }
peerdb-parser = { path = "../parser" }
pgwire = "0.16"
pgwire = "0.17"
prost = "0.12"
pt = { path = "../pt" }
sqlparser = { path = "../sqlparser-rs", features = ["visitor"] }
Expand Down
2 changes: 1 addition & 1 deletion nexus/server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ impl NexusBackend {

#[async_trait]
impl SimpleQueryHandler for NexusBackend {
async fn do_query<'a, C>(&self, _client: &C, sql: &'a str) -> PgWireResult<Vec<Response<'a>>>
async fn do_query<'a, C>(&self, _client: &mut C, sql: &'a str) -> PgWireResult<Vec<Response<'a>>>
where
C: ClientInfo + Unpin + Send + Sync,
{
Expand Down
2 changes: 1 addition & 1 deletion nexus/value/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde_json = "1.0"
postgres-inet = "0.19.0"
chrono = { version = "0.4", features = ["serde"] }
hex = "0.4"
pgwire = "0.16"
pgwire = "0.17"
postgres = { version = "0.19", features = ["with-chrono-0_4"] }
postgres-types = { version = "0.2.5", features = ["array-impls"] }
uuid = { version = "1.0", features = ["serde", "v4"] }
7 changes: 7 additions & 0 deletions ui/app/dto/MirrorsDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ export type TableMapRow = {
exclude: string[];
selected: boolean;
};

export type SyncStatusRow = {
batchId: bigint;
startTime: Date;
endTime: Date | null;
numRows: number;
};
8 changes: 1 addition & 7 deletions ui/app/mirrors/edit/[mirrorId]/cdc.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import { SyncStatusRow } from '@/app/dto/MirrorsDTO';
import TimeLabel from '@/components/TimeComponent';
import {
CDCMirrorStatus,
Expand Down Expand Up @@ -272,13 +273,6 @@ const Trigger = styled(
}
`;

type SyncStatusRow = {
batchId: number;
startTime: Date;
endTime: Date | null;
numRows: number;
};

type CDCMirrorStatusProps = {
cdc: CDCMirrorStatus;
rows: SyncStatusRow[];
Expand Down
8 changes: 1 addition & 7 deletions ui/app/mirrors/edit/[mirrorId]/cdcDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client';
import { SyncStatusRow } from '@/app/dto/MirrorsDTO';
import MirrorInfo from '@/components/MirrorInfo';
import PeerButton from '@/components/PeerComponent';
import TimeLabel from '@/components/TimeComponent';
Expand All @@ -11,13 +12,6 @@ import moment from 'moment';
import MirrorValues from './configValues';
import TablePairs from './tablePairs';

type SyncStatusRow = {
batchId: number;
startTime: Date;
endTime: Date | null;
numRows: number;
};

type props = {
syncs: SyncStatusRow[];
mirrorConfig: FlowConnectionConfigs | undefined;
Expand Down
8 changes: 1 addition & 7 deletions ui/app/mirrors/edit/[mirrorId]/cdcGraph.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
'use client';
import { SyncStatusRow } from '@/app/dto/MirrorsDTO';
import { formatGraphLabel, timeOptions } from '@/app/utils/graph';
import { Label } from '@/lib/Label';
import { BarChart } from '@tremor/react';
import { useEffect, useState } from 'react';
import ReactSelect from 'react-select';
import aggregateCountsByInterval from './aggregatedCountsByInterval';

type SyncStatusRow = {
batchId: number;
startTime: Date;
endTime: Date | null;
numRows: number;
};

function CdcGraph({ syncs }: { syncs: SyncStatusRow[] }) {
let [aggregateType, setAggregateType] = useState('hour');
const initialCount: [string, number][] = [];
Expand Down
2 changes: 1 addition & 1 deletion ui/app/mirrors/edit/[mirrorId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default async function EditMirror({
}

const rows = syncs.map((sync) => ({
batchId: sync.id,
batchId: sync.batch_id,
startTime: sync.start_time,
endTime: sync.end_time,
numRows: sync.rows_in_batch,
Expand Down
2 changes: 1 addition & 1 deletion ui/app/mirrors/edit/[mirrorId]/syncStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default async function SyncStatus({
});

const rows = syncs.map((sync) => ({
batchId: sync.id,
batchId: sync.batch_id,
startTime: sync.start_time,
endTime: sync.end_time,
numRows: sync.rows_in_batch,
Expand Down
7 changes: 1 addition & 6 deletions ui/app/mirrors/edit/[mirrorId]/syncStatusTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import { SyncStatusRow } from '@/app/dto/MirrorsDTO';
import TimeLabel from '@/components/TimeComponent';
import { Button } from '@/lib/Button';
import { Icon } from '@/lib/Icon';
Expand All @@ -10,12 +11,6 @@ import { Table, TableCell, TableRow } from '@/lib/Table';
import moment from 'moment';
import { useMemo, useState } from 'react';
import ReactSelect from 'react-select';
type SyncStatusRow = {
batchId: number;
startTime: Date;
endTime: Date | null;
numRows: number;
};

type SyncStatusTableProps = {
rows: SyncStatusRow[];
Expand Down
5 changes: 3 additions & 2 deletions ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import prisma from '@/app/utils/prisma';
import { QRepConfig } from '@/grpc_generated/flow';
import { Badge } from '@/lib/Badge';
import { Icon } from '@/lib/Icon';
import { Label } from '@/lib/Label';
import { ProgressCircle } from '@/lib/ProgressCircle';

export const dynamic = 'force-dynamic';
Expand All @@ -27,9 +28,9 @@ export default async function QRepConfigViewer({

if (!configBuffer?.config_proto) {
return (
<div>
<div className='m-4' style={{ display: 'flex', alignItems: 'center' }}>
<ProgressCircle variant='determinate_progress_circle' />
Waiting for mirror to start...
<Label>Waiting for mirror to start...</Label>
</div>
);
}
Expand Down

0 comments on commit 78c46e5

Please sign in to comment.