Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apps/cli/src/server/local-schema-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,19 @@ export const LOCAL_SCHEMA_HISTORY: ReadonlyArray<LocalSchemaHistoryEntry> = Obje
manifestDigest: "7fe927d0537e697ee7e9ad0c565c3294efee9e958d9894292afed234fbe560ab",
projectRevision: "ed74788ef292834069e0ea6ee3b22d68fc604fb66cb54d2d551db67ce8d20b3a",
}),
Object.freeze({
// TODO(v31): what changed, whether any part is rewritten or any row
// moves, and what this edge does NOT backfill.
//
// projectRevision is carried forward deliberately: it is a hardcoded
// constant that no longer tracks the generator's header, and the identity
// this gate compares is the fingerprint/digest pair.
version: 31,
fingerprint: "ea8d1656ca6f4b4f",
digest: "ea8d1656ca6f4b4f7cfda050291fb26fca73cc7d4ce21d50fff04cff5276b079",
manifestDigest: "020f17fa907a00c3c44ab7a05cc4306933a4d8f4542ea99d441728b47b7eaca6",
projectRevision: "ed74788ef292834069e0ea6ee3b22d68fc604fb66cb54d2d551db67ce8d20b3a",
}),
] as const)

/** Immutable SQLite control DDL identities, checked by clickhouse:schema:check. */
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/server/local-schema-version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Increment this value for every structural change to the generated local
// schema. The compatibility manifest and migration registry must be updated in
// the same change before a new value can ship.
export const LOCAL_SCHEMA_VERSION = 30 as const
export const LOCAL_SCHEMA_VERSION = 31 as const

/** SQLite eventing state has its own independent version sequence. */
export const LOCAL_CONTROL_SCHEMA_VERSION = 1 as const
27 changes: 27 additions & 0 deletions apps/cli/src/server/local-store-migrations/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1253,5 +1253,32 @@ export const LOCAL_STORE_STEPS: ReadonlyArray<StepSpec> = [
{ ...ERROR_EVENTS_BY_TIME_FORWARD_ONLY, disposition: "preserve-exact" },
],
},
{
id: "local-0030-to-0031-error-fingerprint-span-name-frames",
from: 30,
to: 31,
description: "Drop location-less Effect span frames from the error fingerprint",
clonedBefore: "the views are replaced",
beforeBootstrap: [dropTables("error_events_mv", "error_events_by_time_mv")],
plan: [
[
"rebuild-error-events-views",
"Drop and recreate the error-events views so a location-less span frame no longer enters the hash",
],
],
verifies: "Verify the v31 physical schema and retained raw telemetry counts",
dispositions: [
TRACES_UNDER_REPLACED_VIEWS,
{
name: "error_events",
classification: "derived",
disposition: "preserve-exact",
guarantee:
"Existing rows keep their FingerprintHash untouched; only occurrences whose stack carries a location-less span frame hash differently after the migration.",
...ERROR_RETENTION,
},
{ ...ERROR_EVENTS_BY_TIME_FORWARD_ONLY, disposition: "preserve-exact" },
],
},
// local-schema:bump appends the next step above this line.
]
3 changes: 3 additions & 0 deletions apps/cli/src/server/schema-identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import schemaV27Sql from "./schema/local-schema-v27.sql" with { type: "text" }
import schemaV28Sql from "./schema/local-schema-v28.sql" with { type: "text" }
import schemaV29Sql from "./schema/local-schema-v29.sql" with { type: "text" }
import schemaV30Sql from "./schema/local-schema-v30.sql" with { type: "text" }
import schemaV31Sql from "./schema/local-schema-v31.sql" with { type: "text" }
import { schemaDigest as digestSchema, schemaFingerprint as fingerprintSchema } from "./store-version"
import { buildLocalSchemaManifest, type LocalSchemaManifest } from "./schema-manifest"
import { LOCAL_SCHEMA_VERSION } from "./local-schema-version"
Expand Down Expand Up @@ -103,6 +104,7 @@ const SNAPSHOT_SQL: ReadonlyArray<string> = [
schemaV28Sql,
schemaV29Sql,
schemaV30Sql,
schemaV31Sql,
]

export interface LocalSchemaSnapshot {
Expand Down Expand Up @@ -190,6 +192,7 @@ export const LOCAL_SCHEMA_V27 = localSchemaIdentity(27)
export const LOCAL_SCHEMA_V28 = localSchemaIdentity(28)
export const LOCAL_SCHEMA_V29 = localSchemaIdentity(29)
export const LOCAL_SCHEMA_V30 = localSchemaIdentity(30)
export const LOCAL_SCHEMA_V31 = localSchemaIdentity(31)

export const CURRENT_LOCAL_SCHEMA: LocalSchemaIdentity = Object.freeze({
version: LOCAL_SCHEMA_VERSION,
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/server/schema/local-inserts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"projectRevision": "a9e17246b1cf0b92e8af1cb6a16606c9de70698233d82bb295231da6e22da702",
"projectRevision": "64b7ae1279269efadefe2cb5773eaf28967c16da7af3d0659c297770532bbc97",
"orgPlaceholder": "__ORG__",
"datasources": {
"traces": {
Expand Down
Loading
Loading