Complete the low-risk half of the Sentry -> Cairn OBS rebrand
Sweeps the references that carry no runtime coupling, and fixes one that
turned out to be a real bug rather than stale branding.
Docker network: sentry_default -> cairnobs_default across 23 runbook and
test-header `docker run` commands. Compose derives the network from the
directory name, so this lands together with renaming the working copy to
cairnobs/ -- the two are only correct as one change.
Stale references corrected: four Dockerfile "repo root (sentry/)"
headers; .env pointing at the long-renamed deploy/helm/sentry/ chart;
five Helm comments describing the topic as sentry.logs.raw when all four
code paths have defaulted to cairnobs.logs.raw for some time; an
absolute /home/john/Projects/sentry/ path in the operator's package doc,
now repo-relative; the hand-written Tenant CRD description in both of
its identical copies, whose Go source already said Cairn OBS.
Migration 0043 repoints the default tenant's data source. 0026 seeded it
with ('sentry', '/var/lib/sentry-search') to match what
api/internal/config then defaulted to; the rebrand later moved those
defaults to "cairnobs" and /var/lib/cairnobs-search without moving the
already-applied row, leaving the default tenant naming a ClickHouse
database nothing writes to. Scoped to the exact stale values so it is a
no-op on any deployment that set them deliberately. 0026's comment is
annotated as superseded; its applied SQL is untouched.
Deliberately not included: the gRPC wire packages (sentry.logs.v1,
sentry.agent.v1) and proto/sentry/ import paths, which cannot change
without a lockstep agent/server upgrade; the Helm chart's
sentry_metadata database and sentry role, which need a real Postgres
migration on existing deployments; and the compliance audit records in
docs/compliance/, which are a dated historical record.
go build, go vet, and go test pass for ingest and deploy/operator.
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
-- The 'default' tenant's single data source, pointing at the one
|
||||
-- ClickHouse database ("sentry") and Tantivy index every Phase 0-3
|
||||
-- deployment already uses -- see api/internal/config's CLICKHOUSE_DATABASE
|
||||
-- default and search's index path default.
|
||||
-- deployment already used at the time this was written -- then matching
|
||||
-- api/internal/config's CLICKHOUSE_DATABASE default and search's index
|
||||
-- path default.
|
||||
--
|
||||
-- SUPERSEDED: the Sentry -> Cairn OBS rebrand moved both of those
|
||||
-- defaults ("cairnobs" and /var/lib/cairnobs-search) without updating
|
||||
-- this already-applied seed. 0043 repoints the row. The SQL below is
|
||||
-- left exactly as applied -- do not edit it; fix forward instead.
|
||||
INSERT INTO data_sources (id, tenant_id, name, clickhouse_database_name, tantivy_index_path)
|
||||
SELECT '00000000-0000-0000-0000-000000000001', 'default', 'default', 'sentry', '/var/lib/sentry-search'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM data_sources WHERE tenant_id = 'default')
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
-- Repoint the 'default' tenant's data source at the post-rebrand
|
||||
-- ClickHouse database and Tantivy index path.
|
||||
--
|
||||
-- 0026 seeded this row with ('sentry', '/var/lib/sentry-search'),
|
||||
-- correct at the time: it deliberately mirrored what api/internal/config
|
||||
-- then defaulted CLICKHOUSE_DATABASE to, and search's index path
|
||||
-- default. The Sentry -> Cairn OBS rebrand later moved both defaults --
|
||||
-- api/internal/config and ingest/internal/config now default to
|
||||
-- "cairnobs", and every index path in the tree is
|
||||
-- /var/lib/cairnobs-search (docker-compose's search-index-data mount,
|
||||
-- the Helm chart's search.yaml, and the per-tenant paths
|
||||
-- enterprise/cmd/enterprise-api builds) -- but the already-applied
|
||||
-- 0026 row did not move with them.
|
||||
--
|
||||
-- The result on any database where 0026 ran: the default tenant's data
|
||||
-- source names a ClickHouse database nothing writes to, and an index
|
||||
-- path nothing maintains. Editing 0026 in place would not fix those
|
||||
-- deployments, since it has already been recorded as applied -- hence a
|
||||
-- forward migration.
|
||||
--
|
||||
-- Scoped by the exact stale values rather than by tenant_id alone, so
|
||||
-- this is a no-op on:
|
||||
-- - fresh databases, where 0026's seed already reflects current
|
||||
-- defaults if it is ever re-run,
|
||||
-- - deployments that set CLICKHOUSE_DATABASE explicitly and corrected
|
||||
-- this row by hand.
|
||||
-- It will not clobber a deliberately-chosen database name.
|
||||
UPDATE data_sources
|
||||
SET clickhouse_database_name = 'cairnobs'
|
||||
WHERE tenant_id = 'default'
|
||||
AND name = 'default'
|
||||
AND clickhouse_database_name = 'sentry';
|
||||
|
||||
UPDATE data_sources
|
||||
SET tantivy_index_path = '/var/lib/cairnobs-search'
|
||||
WHERE tenant_id = 'default'
|
||||
AND name = 'default'
|
||||
AND tantivy_index_path = '/var/lib/sentry-search';
|
||||
Reference in New Issue
Block a user