diff --git a/go.mod b/go.mod index a36d4571..03b3cbaa 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/AlecAivazis/survey/v2 v2.3.7 github.com/Doist/unfurlist v0.0.0-20250409100812-515f2735f8e5 github.com/OpenAudio/go-openaudio v1.8.2-0.20260727214803-1d9f69772e87 - github.com/OpenAudio/go-openaudio/pkg/etl v1.6.3-0.20260727214803-1d9f69772e87 + github.com/OpenAudio/go-openaudio/pkg/etl v1.6.3 github.com/aquasecurity/esquery v0.2.0 github.com/axiomhq/axiom-go v0.23.0 github.com/axiomhq/hyperloglog v0.2.5 @@ -45,6 +45,7 @@ require ( github.com/urfave/cli/v3 v3.5.0 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.48.0 + golang.org/x/net v0.50.0 golang.org/x/sync v0.19.0 google.golang.org/grpc v1.71.1 google.golang.org/protobuf v1.36.11 @@ -219,7 +220,6 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect - golang.org/x/net v0.50.0 // indirect golang.org/x/sys v0.41.0 // indirect golang.org/x/term v0.40.0 // indirect golang.org/x/text v0.34.0 // indirect diff --git a/go.sum b/go.sum index 14f5f9bf..0d534bc2 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,8 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OpenAudio/go-openaudio v1.8.2-0.20260727214803-1d9f69772e87 h1:HiLw4qrUkVWRADJjGsdHLlFMdJjhU5WCVNAfeKfww4s= github.com/OpenAudio/go-openaudio v1.8.2-0.20260727214803-1d9f69772e87/go.mod h1:lLRvUF5oWkxOyZx8rp/ecqxuMo3yzPvuvJbLSfvxguQ= -github.com/OpenAudio/go-openaudio/pkg/etl v1.6.3-0.20260727214803-1d9f69772e87 h1:E3HoYAxTNrZ0x1H+PJ+sijy1yh3jMtnO6JTyZqWHJ9U= -github.com/OpenAudio/go-openaudio/pkg/etl v1.6.3-0.20260727214803-1d9f69772e87/go.mod h1:6MIJhF06djJvPl6sfv3Vqp0f4IsyBsWPB4F+BsIamTc= +github.com/OpenAudio/go-openaudio/pkg/etl v1.6.3 h1:s18nVxVRM1QW8mDmey7HKWI3/e7OrmnQrtd3o1OJLfs= +github.com/OpenAudio/go-openaudio/pkg/etl v1.6.3/go.mod h1:iSy5fh/o7m7F/tUQ26ezbKTBJ8HjZz37eJrV+A2362U= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= diff --git a/indexer/indexer.go b/indexer/indexer.go index 4e458296..bc0ea605 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -53,12 +53,19 @@ func NewIndexer(cfg config.Config) *CoreIndexer { aggregatesCalculator := NewAggregatesCalculator(cfg) // ETL needs the Connect/gRPC Core client (for block fetching) and a DB URL. - // SkipMigrations stays false (default): ETL's migrations are idempotent - // against api/'s schema — every migration uses CREATE TABLE IF NOT EXISTS / - // ADD COLUMN IF NOT EXISTS, and tracks state in its own `etl_db_migrations` - // table separate from api/'s `schema_version`. Verified by applying all 21 - // current ETL migrations to a fresh DB seeded with api/'s schema: zero - // errors, only NOTICE messages for already-existing relations. + // SkipMigrations stays false (default), so bumping the pkg/etl module runs + // whatever migrations it brought with it against api/'s database, on the + // next indexer start. They track state in their own `etl_db_migrations` + // table, separate from api/'s `schema_version`, and only up-migrations run + // (RunDownMigrations is left false). + // + // That was originally justified by the migrations being purely additive — + // CREATE TABLE IF NOT EXISTS / ADD COLUMN IF NOT EXISTS, verified against a + // fresh DB seeded with api/'s schema. 0035 is the first one that is not: it + // deletes duplicate is_current rows from users before adding a unique index + // over them. Still idempotent, and intended to run here — but a pkg/etl bump + // is now a thing that can modify production data, so read the migrations a + // version brings before bumping. // // Two optional ETL components are disabled here because they don't fit // api/'s deployment: