Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: upgrade clickhouse node client (#6806)

Max Deichmann76aaf2a3d054
diff --git a/packages/shared/package.json b/packages/shared/package.json
index ad35a9a8ce..65b155abcd 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -60,7 +60,7 @@
"@aws-sdk/lib-storage": "^3.675.0",
"@aws-sdk/s3-request-presigner": "^3.679.0",
"@azure/storage-blob": "^12.26.0",
- "@clickhouse/client": "^1.4.0",
+ "@clickhouse/client": "^1.11.1",
"@google-cloud/storage": "^7.15.2",
"@langchain/anthropic": "^0.3.12",
"@langchain/aws": "^0.1.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 122948375b..d680d0ce6a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,7 +58,7 @@ importers:
next-auth:
specifier: ^4.24.11
zod:
specifier: ^3.24.4
version: 3.24.4
@@ -150,8 +150,8 @@ importers:
specifier: ^12.26.0
version: 12.26.0
'@clickhouse/client':
- specifier: ^1.4.0
- version: 1.4.0
+ specifier: ^1.11.1
+ version: 1.11.1
'@google-cloud/storage':
specifier: ^7.15.2
version: 7.15.2
@@ -232,7 +232,7 @@ importers:
version: 4.0.2
next-auth:
specifier: ^4.24.11
nodemailer:
specifier: ^6.9.15
version: 6.9.15
@@ -635,7 +635,7 @@ importers:
next-auth:
specifier: ^4.24.11
next-query-params:
specifier: ^5.0.1
@@ -865,9 +865,6 @@ importers:
'@appsignal/opentelemetry-instrumentation-bullmq':
specifier: ^0.7.3
version: 0.7.3([email protected])
- '@clickhouse/client':
- specifier: ^1.4.0
- version: 1.4.0
'@langfuse/shared':
specifier: workspace:*
version: link:../packages/shared
@@ -1736,11 +1733,11 @@ packages:
'@chevrotain/[email protected]':
resolution: {integrity: sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==}
- '@clickhouse/[email protected]':
- resolution: {integrity: sha512-kglG8YyWnR1K24RckUf5ZdNTN0U0s+a1j/bpCO4ZjzjO87ICgWlXFVD22pZqSACW7/2IIi1IkzbwtxKI2s/MOw==}
+ '@clickhouse/[email protected]':
+ resolution: {integrity: sha512-bme0le2yhDSAh13d2fxhSW5ZrNoVqZ3LTyac8jK6hNH0qkksXnjYkLS6KQalPU6NMpffxHmpI4+/Gi2MnX0NCA==}
- '@clickhouse/[email protected]':
- resolution: {integrity: sha512-O4mbFPM/wQtFck01ghYI2mnNHv9jSFEiQBsTCH4t6MKeGHNAPkJGaFGv+KycLTv6zjnQNjiUGdXDMVRema5SyA==}
+ '@clickhouse/[email protected]':
+ resolution: {integrity: sha512-u9h++h72SmWystijNqfNvMkfA+5+Y1LNfmLL/odCL3VgI3oyAPP9ubSw/Yrt2zRZkLKehMMD1kuOej0QHbSoBA==}
engines: {node: '>=16'}
'@codemirror/[email protected]':
@@ -13703,11 +13700,11 @@ snapshots:
'@chevrotain/[email protected]': {}
- '@clickhouse/[email protected]': {}
+ '@clickhouse/[email protected]': {}
- '@clickhouse/[email protected]':
+ '@clickhouse/[email protected]':
dependencies:
- '@clickhouse/client-common': 1.4.0
+ '@clickhouse/client-common': 1.11.1
'@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])':
dependencies:
@@ -14703,7 +14700,7 @@ snapshots:
'@aws-sdk/client-bedrock-agent-runtime': 3.668.0
'@aws-sdk/client-bedrock-runtime': 3.668.0
'@aws-sdk/client-kendra': 3.668.0
- '@aws-sdk/credential-provider-node': 3.675.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
+ '@aws-sdk/credential-provider-node': 3.675.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
'@langchain/core': 0.3.18([email protected]([email protected]))
zod: 3.24.4
zod-to-json-schema: 3.23.5([email protected])
@@ -15081,7 +15078,7 @@ snapshots:
dependencies:
'@next/[email protected]': {}
@@ -18129,7 +18126,7 @@ snapshots:
'@typescript-eslint/eslint-plugin': 7.3.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
'@typescript-eslint/parser': 7.12.0([email protected])([email protected])
eslint-config-prettier: 9.1.0([email protected])
- eslint-import-resolver-alias: 1.1.2([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected]))
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
eslint-plugin-eslint-comments: 3.2.0([email protected])
@@ -20133,7 +20130,7 @@ snapshots:
eslint: 8.57.0
eslint-plugin-turbo: 1.13.4([email protected])
dependencies:
@@ -20224,7 +20221,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
hasown: 2.0.2
is-core-module: 2.15.1
is-glob: 4.0.3
@@ -20251,7 +20248,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
hasown: 2.0.2
is-core-module: 2.15.1
is-glob: 4.0.3
@@ -23120,7 +23117,7 @@ snapshots:
dependencies:
type-fest: 2.19.0
dependencies:
'@babel/runtime': 7.26.0
'@panva/hkdf': 1.1.1
diff --git a/worker/package.json b/worker/package.json
index 6d628a9bb4..c0daaf7477 100644
--- a/worker/package.json
+++ b/worker/package.json
@@ -22,7 +22,6 @@
"dependencies": {
"@anthropic-ai/tokenizer": "^0.0.4",
"@appsignal/opentelemetry-instrumentation-bullmq": "^0.7.3",
- "@clickhouse/client": "^1.4.0",
"@langfuse/shared": "workspace:*",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-trace-otlp-proto": "^0.53.0",
diff --git a/worker/src/services/IngestionService/tests/IngestionService.integration.test.ts b/worker/src/services/IngestionService/tests/IngestionService.integration.test.ts
index 1555c99df5..af524f8084 100644
--- a/worker/src/services/IngestionService/tests/IngestionService.integration.test.ts
+++ b/worker/src/services/IngestionService/tests/IngestionService.integration.test.ts
@@ -15,9 +15,10 @@ import {
traceRecordReadSchema,
TraceRecordReadType,
ingestionEvent,
+ logger,
} from "@langfuse/shared/src/server";
import { pruneDatabase } from "../../../__tests__/utils";
-
+import waitForExpect from "wait-for-expect";
import { ClickhouseWriter, TableName } from "../../ClickhouseWriter";
import { IngestionService } from "../../IngestionService";
import { ModelUsageUnit, ScoreSource } from "@langfuse/shared";
@@ -1152,19 +1153,17 @@ describe("Ingestion end-to-end tests", () => {
await clickhouseWriter.flushAll(true);
- vi.useRealTimers();
- await new Promise((resolve) => setTimeout(resolve, 1000));
- vi.useFakeTimers();
-
- const trace = await getClickhouseRecord(TableName.Traces, traceId);
+ await waitForExpect(async () => {
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
- expect(trace.name).toBe("trace-name");
- expect(trace.user_id).toBe("user-2");
- expect(trace.release).toBe("1.0.0");
- expect(trace.version).toBe("2.0.0");
- expect(trace.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
- expect(trace.tags).toEqual(["tag-1", "tag-2", "tag-3", "tag-4"]);
- expect(trace.tags.length).toBe(4);
+ expect(trace.name).toBe("trace-name");
+ expect(trace.user_id).toBe("user-2");
+ expect(trace.release).toBe("1.0.0");
+ expect(trace.version).toBe("2.0.0");
+ expect(trace.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
+ expect(trace.tags).toEqual(["tag-1", "tag-2", "tag-3", "tag-4"]);
+ expect(trace.tags.length).toBe(4);
+ });
});
it("should upsert traces in the right order", async () => {