From 79532459119783a577241201cf40dedae0151af1 Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Fri, 29 Aug 2025 00:03:57 +0200 Subject: [PATCH 01/11] Add Trino database support in CLI build configuration This commit introduces a new file `build_trino.go` that sets up the build constraints for the Trino database. It imports the necessary Trino database driver from the `github.com/golang-migrate/migrate/v4` package, enabling migration support for Trino within the CLI. --- .../001_create_users_table.down.sql | 1 + .../migrations/001_create_users_table.up.sql | 6 + .../002_add_index_to_users.down.sql | 1 + .../migrations/002_add_index_to_users.up.sql | 5 + database/trino/trino.go | 592 ++++++++++++++++++ database/trino/trino_test.go | 372 +++++++++++ go.mod | 41 +- go.sum | 127 +++- internal/cli/build_trino.go | 8 + 9 files changed, 1110 insertions(+), 43 deletions(-) create mode 100644 database/trino/examples/migrations/001_create_users_table.down.sql create mode 100644 database/trino/examples/migrations/001_create_users_table.up.sql create mode 100644 database/trino/examples/migrations/002_add_index_to_users.down.sql create mode 100644 database/trino/examples/migrations/002_add_index_to_users.up.sql create mode 100644 database/trino/trino.go create mode 100644 database/trino/trino_test.go create mode 100644 internal/cli/build_trino.go diff --git a/database/trino/examples/migrations/001_create_users_table.down.sql b/database/trino/examples/migrations/001_create_users_table.down.sql new file mode 100644 index 000000000..365a21075 --- /dev/null +++ b/database/trino/examples/migrations/001_create_users_table.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS users; \ No newline at end of file diff --git a/database/trino/examples/migrations/001_create_users_table.up.sql b/database/trino/examples/migrations/001_create_users_table.up.sql new file mode 100644 index 000000000..2fe693e9b --- /dev/null +++ b/database/trino/examples/migrations/001_create_users_table.up.sql @@ -0,0 +1,6 @@ +CREATE TABLE users ( + id BIGINT, + name VARCHAR(255), + email VARCHAR(255), + created_at TIMESTAMP +); \ No newline at end of file diff --git a/database/trino/examples/migrations/002_add_index_to_users.down.sql b/database/trino/examples/migrations/002_add_index_to_users.down.sql new file mode 100644 index 000000000..ca4880f8e --- /dev/null +++ b/database/trino/examples/migrations/002_add_index_to_users.down.sql @@ -0,0 +1 @@ +DROP VIEW IF EXISTS user_by_email; \ No newline at end of file diff --git a/database/trino/examples/migrations/002_add_index_to_users.up.sql b/database/trino/examples/migrations/002_add_index_to_users.up.sql new file mode 100644 index 000000000..8adcf8bc1 --- /dev/null +++ b/database/trino/examples/migrations/002_add_index_to_users.up.sql @@ -0,0 +1,5 @@ +-- Trino doesn't support traditional indexes, but we can create a view for common queries +CREATE VIEW user_by_email AS +SELECT id, name, email, created_at +FROM users +WHERE email IS NOT NULL; \ No newline at end of file diff --git a/database/trino/trino.go b/database/trino/trino.go new file mode 100644 index 000000000..afa205caf --- /dev/null +++ b/database/trino/trino.go @@ -0,0 +1,592 @@ +package trino + +import ( + "context" + "database/sql" + "fmt" + "io" + "net/url" + "os" + "path/filepath" + "strconv" + "strings" + "sync/atomic" + "time" + + "github.com/golang-migrate/migrate/v4/database" + "github.com/hashicorp/go-multierror" + _ "github.com/trinodb/trino-go-client/trino" // Trino driver +) + +func init() { + database.Register("trino", &Trino{}) +} + +var ( + DefaultMigrationsTable = "schema_migrations" + DefaultLockMethod = "file" + DefaultLockTimeout = 15 * time.Minute +) + +var ( + ErrNilConfig = fmt.Errorf("no config") + ErrNoCatalog = fmt.Errorf("no catalog specified") + ErrNoSchema = fmt.Errorf("no schema specified") + ErrInvalidLockMethod = fmt.Errorf("invalid lock method, must be 'file', 'table', or 'none'") + ErrLockTimeout = fmt.Errorf("lock timeout exceeded") +) + +// Config holds the configuration for the Trino driver +type Config struct { + MigrationsTable string + MigrationsSchema string + MigrationsCatalog string + User string + Source string // Application identifier for Trino + StatementTimeout time.Duration + ConnectionTimeout time.Duration + LockMethod string // "file", "table", "none" + LockFilePath string + LockTimeout time.Duration +} + +// Trino implements the database.Driver interface for Trino +type Trino struct { + conn *sql.Conn + db *sql.DB + isLocked atomic.Bool + config *Config + lockFile *os.File +} + +// WithInstance creates a new Trino driver instance with an existing database connection +func WithInstance(instance *sql.DB, config *Config) (database.Driver, error) { + if config == nil { + return nil, ErrNilConfig + } + + if err := instance.Ping(); err != nil { + return nil, err + } + + ctx := context.Background() + conn, err := instance.Conn(ctx) + if err != nil { + return nil, err + } + + t, err := WithConnection(ctx, conn, config) + if err != nil { + return nil, err + } + t.db = instance + return t, nil +} + +// WithConnection creates a new Trino driver instance with an existing connection +func WithConnection(ctx context.Context, conn *sql.Conn, config *Config) (*Trino, error) { + if config == nil { + return nil, ErrNilConfig + } + + if err := conn.PingContext(ctx); err != nil { + return nil, err + } + + // Set defaults + if config.MigrationsTable == "" { + config.MigrationsTable = DefaultMigrationsTable + } + if config.LockMethod == "" { + config.LockMethod = DefaultLockMethod + } + if config.LockTimeout == 0 { + config.LockTimeout = DefaultLockTimeout + } + if config.Source == "" { + config.Source = "golang-migrate" + } + + // Validate lock method + if config.LockMethod != "file" && config.LockMethod != "table" && config.LockMethod != "none" { + return nil, ErrInvalidLockMethod + } + + // Get current catalog and schema if not specified + if config.MigrationsCatalog == "" { + var catalog sql.NullString + query := "SELECT current_catalog" + if err := conn.QueryRowContext(ctx, query).Scan(&catalog); err != nil { + return nil, &database.Error{OrigErr: err, Query: []byte(query)} + } + if !catalog.Valid || catalog.String == "" { + return nil, ErrNoCatalog + } + config.MigrationsCatalog = catalog.String + } + + if config.MigrationsSchema == "" { + var schema sql.NullString + query := "SELECT current_schema" + if err := conn.QueryRowContext(ctx, query).Scan(&schema); err != nil { + return nil, &database.Error{OrigErr: err, Query: []byte(query)} + } + if !schema.Valid || schema.String == "" { + return nil, ErrNoSchema + } + config.MigrationsSchema = schema.String + } + + t := &Trino{ + conn: conn, + config: config, + } + + if err := t.ensureVersionTable(); err != nil { + return nil, err + } + + return t, nil +} + +// Open creates a new Trino driver instance from a URL +func (t *Trino) Open(dsn string) (database.Driver, error) { + purl, err := url.Parse(dsn) + if err != nil { + return nil, err + } + + // Build Trino DSN from our custom URL format + // Convert from: trino://user@host:port/catalog/schema?params + // To Trino format: http://user@host:port?catalog=catalog&schema=schema¶ms + + trinoURL := &url.URL{ + Scheme: "http", + Host: purl.Host, + User: purl.User, + } + + // Parse catalog and schema from path + var catalog, schema string + pathParts := strings.Split(strings.Trim(purl.Path, "/"), "/") + if len(pathParts) >= 1 && pathParts[0] != "" { + catalog = pathParts[0] + } + if len(pathParts) >= 2 && pathParts[1] != "" { + schema = pathParts[1] + } + + // Parse query parameters + qv := purl.Query() + + // Build new query parameters for Trino driver + trinoQuery := url.Values{} + + // Set catalog and schema + if catalog != "" { + trinoQuery.Set("catalog", catalog) + } + if schema != "" { + trinoQuery.Set("schema", schema) + } + + // Set source (required by Trino) + if source := qv.Get("source"); source != "" { + trinoQuery.Set("source", source) + } else { + trinoQuery.Set("source", "golang-migrate") + } + + // Copy non-migration specific parameters to Trino driver + for key, values := range qv { + if !strings.HasPrefix(key, "x-") && key != "source" { + for _, value := range values { + trinoQuery.Add(key, value) + } + } + } + + trinoURL.RawQuery = trinoQuery.Encode() + + // Handle custom migration parameters + migrationConfig := &Config{ + MigrationsTable: qv.Get("x-migrations-table"), + MigrationsSchema: qv.Get("x-migrations-schema"), + MigrationsCatalog: qv.Get("x-migrations-catalog"), + LockMethod: qv.Get("x-lock-method"), + LockFilePath: qv.Get("x-lock-file-path"), + } + + if purl.User != nil { + migrationConfig.User = purl.User.Username() + } + + migrationConfig.Source = trinoQuery.Get("source") + + // Parse timeouts + if timeoutStr := qv.Get("x-statement-timeout"); timeoutStr != "" { + if timeoutMs, err := strconv.Atoi(timeoutStr); err == nil { + migrationConfig.StatementTimeout = time.Duration(timeoutMs) * time.Millisecond + } + } + + if timeoutStr := qv.Get("x-connection-timeout"); timeoutStr != "" { + if timeoutMs, err := strconv.Atoi(timeoutStr); err == nil { + migrationConfig.ConnectionTimeout = time.Duration(timeoutMs) * time.Millisecond + } + } + + if timeoutStr := qv.Get("x-lock-timeout"); timeoutStr != "" { + if timeoutMs, err := strconv.Atoi(timeoutStr); err == nil { + migrationConfig.LockTimeout = time.Duration(timeoutMs) * time.Millisecond + } + } + + // Use defaults from catalog/schema if not specified in query + if migrationConfig.MigrationsCatalog == "" { + migrationConfig.MigrationsCatalog = catalog + } + if migrationConfig.MigrationsSchema == "" { + migrationConfig.MigrationsSchema = schema + } + + // Open database connection using Trino driver + db, err := sql.Open("trino", trinoURL.String()) + if err != nil { + return nil, err + } + + if err := db.Ping(); err != nil { + return nil, err + } + + return WithInstance(db, migrationConfig) +} + +// Close closes the database connection +func (t *Trino) Close() error { + connErr := t.conn.Close() + var dbErr error + if t.db != nil { + dbErr = t.db.Close() + } + + // Clean up any lock files + if t.lockFile != nil { + t.lockFile.Close() + os.Remove(t.lockFile.Name()) + t.lockFile = nil + } + + if connErr != nil || dbErr != nil { + return fmt.Errorf("conn: %v, db: %v", connErr, dbErr) + } + return nil +} + +// Lock acquires a migration lock +func (t *Trino) Lock() error { + return database.CasRestoreOnErr(&t.isLocked, false, true, database.ErrLocked, func() error { + switch t.config.LockMethod { + case "file": + return t.lockWithFile() + case "table": + return t.lockWithTable() + case "none": + return nil + default: + return ErrInvalidLockMethod + } + }) +} + +// Unlock releases the migration lock +func (t *Trino) Unlock() error { + return database.CasRestoreOnErr(&t.isLocked, true, false, database.ErrNotLocked, func() error { + switch t.config.LockMethod { + case "file": + return t.unlockFile() + case "table": + return t.unlockTable() + case "none": + return nil + default: + return ErrInvalidLockMethod + } + }) +} + +// lockWithFile implements file-based locking +func (t *Trino) lockWithFile() error { + lockPath := t.config.LockFilePath + if lockPath == "" { + lockPath = filepath.Join(os.TempDir(), fmt.Sprintf("trino-migrate-%s-%s-%s.lock", + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable)) + } + + // Try to create the lock file exclusively + lockFile, err := os.OpenFile(lockPath, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0600) + if err != nil { + if os.IsExist(err) { + return database.ErrLocked + } + return err + } + + // Write lock information + lockInfo := fmt.Sprintf("pid=%d\ntime=%s\nuser=%s\nsource=%s\n", + os.Getpid(), time.Now().Format(time.RFC3339), t.config.User, t.config.Source) + + if _, err := lockFile.WriteString(lockInfo); err != nil { + lockFile.Close() + os.Remove(lockPath) + return err + } + + t.lockFile = lockFile + return nil +} + +// unlockFile removes the file-based lock +func (t *Trino) unlockFile() error { + if t.lockFile != nil { + lockPath := t.lockFile.Name() + t.lockFile.Close() + t.lockFile = nil + return os.Remove(lockPath) + } + return nil +} + +// lockWithTable implements table-based locking +func (t *Trino) lockWithTable() error { + lockTable := fmt.Sprintf("%s.%s.%s_lock", + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) + + // Create lock table if it doesn't exist + createQuery := fmt.Sprintf(` + CREATE TABLE IF NOT EXISTS %s ( + id VARCHAR(255) PRIMARY KEY, + locked_at TIMESTAMP, + locked_by VARCHAR(255) + )`, lockTable) + + if _, err := t.conn.ExecContext(context.Background(), createQuery); err != nil { + return &database.Error{OrigErr: err, Query: []byte(createQuery)} + } + + // Try to acquire lock + lockId := fmt.Sprintf("%s-%s", t.config.User, t.config.Source) + insertQuery := fmt.Sprintf(` + INSERT INTO %s (id, locked_at, locked_by) + VALUES (?, CURRENT_TIMESTAMP, ?)`, lockTable) + + if _, err := t.conn.ExecContext(context.Background(), insertQuery, "migration", lockId); err != nil { + // Check if it's a constraint violation (lock already exists) + if strings.Contains(strings.ToLower(err.Error()), "duplicate") || + strings.Contains(strings.ToLower(err.Error()), "constraint") { + return database.ErrLocked + } + return &database.Error{OrigErr: err, Query: []byte(insertQuery)} + } + + return nil +} + +// unlockTable removes the table-based lock +func (t *Trino) unlockTable() error { + lockTable := fmt.Sprintf("%s.%s.%s_lock", + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) + + deleteQuery := fmt.Sprintf(`DELETE FROM %s WHERE id = ?`, lockTable) + if _, err := t.conn.ExecContext(context.Background(), deleteQuery, "migration"); err != nil { + return &database.Error{OrigErr: err, Query: []byte(deleteQuery)} + } + + return nil +} + +// Run executes a migration +func (t *Trino) Run(migration io.Reader) error { + migr, err := io.ReadAll(migration) + if err != nil { + return err + } + + ctx := context.Background() + if t.config.StatementTimeout != 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, t.config.StatementTimeout) + defer cancel() + } + + query := string(migr) + if strings.TrimSpace(query) == "" { + return nil + } + + if _, err := t.conn.ExecContext(ctx, query); err != nil { + return &database.Error{OrigErr: err, Err: "migration failed", Query: migr} + } + + return nil +} + +// SetVersion sets the current migration version +func (t *Trino) SetVersion(version int, dirty bool) error { + tx, err := t.conn.BeginTx(context.Background(), &sql.TxOptions{}) + if err != nil { + return &database.Error{OrigErr: err, Err: "transaction start failed"} + } + + migrationsTable := fmt.Sprintf("%s.%s.%s", + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) + + // Clear existing version + deleteQuery := fmt.Sprintf("DELETE FROM %s", migrationsTable) + if _, err := tx.Exec(deleteQuery); err != nil { + if errRollback := tx.Rollback(); errRollback != nil { + err = multierror.Append(err, errRollback) + } + return &database.Error{OrigErr: err, Query: []byte(deleteQuery)} + } + + // Insert new version if needed + if version >= 0 || (version == database.NilVersion && dirty) { + insertQuery := fmt.Sprintf("INSERT INTO %s (version, dirty) VALUES (?, ?)", migrationsTable) + if _, err := tx.Exec(insertQuery, version, dirty); err != nil { + if errRollback := tx.Rollback(); errRollback != nil { + err = multierror.Append(err, errRollback) + } + return &database.Error{OrigErr: err, Query: []byte(insertQuery)} + } + } + + if err := tx.Commit(); err != nil { + return &database.Error{OrigErr: err, Err: "transaction commit failed"} + } + + return nil +} + +// Version returns the current migration version +func (t *Trino) Version() (version int, dirty bool, err error) { + migrationsTable := fmt.Sprintf("%s.%s.%s", + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) + + query := fmt.Sprintf("SELECT version, dirty FROM %s LIMIT 1", migrationsTable) + err = t.conn.QueryRowContext(context.Background(), query).Scan(&version, &dirty) + + switch { + case err == sql.ErrNoRows: + return database.NilVersion, false, nil + case err != nil: + // Check if table doesn't exist + if strings.Contains(strings.ToLower(err.Error()), "not exist") || + strings.Contains(strings.ToLower(err.Error()), "not found") { + return database.NilVersion, false, nil + } + return 0, false, &database.Error{OrigErr: err, Query: []byte(query)} + default: + return version, dirty, nil + } +} + +// Drop removes all tables from the current schema +func (t *Trino) Drop() (err error) { + // Get all tables in the current schema + query := fmt.Sprintf(` + SELECT table_name + FROM information_schema.tables + WHERE table_catalog = '%s' + AND table_schema = '%s' + AND table_type = 'BASE TABLE'`, + t.config.MigrationsCatalog, t.config.MigrationsSchema) + + tables, err := t.conn.QueryContext(context.Background(), query) + if err != nil { + return &database.Error{OrigErr: err, Query: []byte(query)} + } + defer func() { + if errClose := tables.Close(); errClose != nil { + err = multierror.Append(err, errClose) + } + }() + + // Collect table names + tableNames := make([]string, 0) + for tables.Next() { + var tableName string + if err := tables.Scan(&tableName); err != nil { + return err + } + if len(tableName) > 0 { + tableNames = append(tableNames, tableName) + } + } + if err := tables.Err(); err != nil { + return &database.Error{OrigErr: err, Query: []byte(query)} + } + + // Drop tables one by one + for _, tableName := range tableNames { + dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS %s.%s.%s", + t.config.MigrationsCatalog, t.config.MigrationsSchema, tableName) + if _, err := t.conn.ExecContext(context.Background(), dropQuery); err != nil { + return &database.Error{OrigErr: err, Query: []byte(dropQuery)} + } + } + + return nil +} + +// ensureVersionTable creates the migrations table if it doesn't exist +func (t *Trino) ensureVersionTable() (err error) { + if err = t.Lock(); err != nil { + return err + } + + defer func() { + if e := t.Unlock(); e != nil { + if err == nil { + err = e + } else { + err = multierror.Append(err, e) + } + } + }() + + migrationsTable := fmt.Sprintf("%s.%s.%s", + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) + + // Check if table exists + checkQuery := fmt.Sprintf(` + SELECT COUNT(*) + FROM information_schema.tables + WHERE table_catalog = '%s' + AND table_schema = '%s' + AND table_name = '%s'`, + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) + + var count int + if err := t.conn.QueryRowContext(context.Background(), checkQuery).Scan(&count); err != nil { + return &database.Error{OrigErr: err, Query: []byte(checkQuery)} + } + + if count > 0 { + return nil // Table already exists + } + + // Create the migrations table + createQuery := fmt.Sprintf(` + CREATE TABLE %s ( + version BIGINT NOT NULL, + dirty BOOLEAN NOT NULL + )`, migrationsTable) + + if _, err := t.conn.ExecContext(context.Background(), createQuery); err != nil { + return &database.Error{OrigErr: err, Query: []byte(createQuery)} + } + + return nil +} diff --git a/database/trino/trino_test.go b/database/trino/trino_test.go new file mode 100644 index 000000000..9665f0231 --- /dev/null +++ b/database/trino/trino_test.go @@ -0,0 +1,372 @@ +package trino + +import ( + "context" + "database/sql" + sqldriver "database/sql/driver" + "fmt" + "io" + "log" + "strings" + "testing" + + "github.com/dhui/dktest" + "github.com/golang-migrate/migrate/v4" + "github.com/golang-migrate/migrate/v4/database" + dt "github.com/golang-migrate/migrate/v4/database/testing" + "github.com/golang-migrate/migrate/v4/dktesting" + _ "github.com/golang-migrate/migrate/v4/source/file" +) + +const ( + trinoUser = "testuser" + trinoCatalog = "memory" + trinoSchema = "default" +) + +var ( + opts = dktest.Options{ + Env: map[string]string{ + "TRINO_ENVIRONMENT": "test", + }, + PortRequired: true, + ReadyFunc: isReady, + } + // Using the official Trino Docker image + specs = []dktesting.ContainerSpec{ + {ImageName: "trinodb/trino:latest", Options: opts}, + } +) + +func trinoConnectionString(host, port string, options ...string) string { + baseURL := fmt.Sprintf("trino://%s@%s:%s/%s/%s", trinoUser, host, port, trinoCatalog, trinoSchema) + if len(options) > 0 { + baseURL += "?" + strings.Join(options, "&") + } + return baseURL +} + +func isReady(ctx context.Context, c dktest.ContainerInfo) bool { + ip, port, err := c.FirstPort() + if err != nil { + return false + } + + // Build the direct Trino HTTP URL for sql.Open + trinoURL := fmt.Sprintf("http://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", + trinoUser, ip, port, trinoCatalog, trinoSchema) + + db, err := sql.Open("trino", trinoURL) + if err != nil { + log.Printf("trino open error: %v", err) + return false + } + defer func() { + if err := db.Close(); err != nil { + log.Println("close error:", err) + } + }() + + if err = db.PingContext(ctx); err != nil { + switch err { + case sqldriver.ErrBadConn, io.EOF: + return false + default: + log.Printf("trino ping error: %v", err) + } + return false + } + + return true +} + +func mustRun(t *testing.T, d database.Driver, statements []string) { + for _, statement := range statements { + if err := d.Run(strings.NewReader(statement)); err != nil { + t.Fatal(err) + } + } +} + +func Test(t *testing.T) { + t.Run("test", test) + t.Run("testMigrate", testMigrate) + t.Run("testLockingMethods", testLockingMethods) + t.Run("testWithInstance", testWithInstance) + t.Run("testOpen", testOpen) + + t.Cleanup(func() { + for _, spec := range specs { + t.Log("Cleaning up ", spec.ImageName) + if err := spec.Cleanup(); err != nil { + t.Error("Error removing ", spec.ImageName, "error:", err) + } + } + }) +} + +func test(t *testing.T) { + dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { + ip, port, err := c.FirstPort() + if err != nil { + t.Fatal(err) + } + + addr := trinoConnectionString(ip, port) + tr := &Trino{} + d, err := tr.Open(addr) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := d.Close(); err != nil { + t.Error(err) + } + }() + dt.Test(t, d, []byte("SELECT 1")) + }) +} + +func testMigrate(t *testing.T) { + dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { + ip, port, err := c.FirstPort() + if err != nil { + t.Fatal(err) + } + + addr := trinoConnectionString(ip, port) + tr := &Trino{} + d, err := tr.Open(addr) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := d.Close(); err != nil { + t.Error(err) + } + }() + m, err := migrate.NewWithDatabaseInstance("file://./examples/migrations", "trino", d) + if err != nil { + t.Fatal(err) + } + dt.TestMigrate(t, m) + }) +} + +func testLockingMethods(t *testing.T) { + dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { + ip, port, err := c.FirstPort() + if err != nil { + t.Fatal(err) + } + + // Test file-based locking (default) + addr := trinoConnectionString(ip, port, "x-lock-method=file") + tr := &Trino{} + d, err := tr.Open(addr) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := d.Close(); err != nil { + t.Error(err) + } + }() + + // Test locking functionality + if err := d.Lock(); err != nil { + t.Fatal(err) + } + if err := d.Unlock(); err != nil { + t.Fatal(err) + } + + // Test table-based locking + addr2 := trinoConnectionString(ip, port, "x-lock-method=table") + d2, err := tr.Open(addr2) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := d2.Close(); err != nil { + t.Error(err) + } + }() + + if err := d2.Lock(); err != nil { + t.Fatal(err) + } + if err := d2.Unlock(); err != nil { + t.Fatal(err) + } + + // Test no locking + addr3 := trinoConnectionString(ip, port, "x-lock-method=none") + d3, err := tr.Open(addr3) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := d3.Close(); err != nil { + t.Error(err) + } + }() + + if err := d3.Lock(); err != nil { + t.Fatal(err) + } + if err := d3.Unlock(); err != nil { + t.Fatal(err) + } + }) +} + +func testWithInstance(t *testing.T) { + dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { + ip, port, err := c.FirstPort() + if err != nil { + t.Fatal(err) + } + + // Create direct connection to Trino + trinoURL := fmt.Sprintf("http://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", + trinoUser, ip, port, trinoCatalog, trinoSchema) + + db, err := sql.Open("trino", trinoURL) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := db.Close(); err != nil { + t.Error(err) + } + }() + + config := &Config{ + MigrationsCatalog: trinoCatalog, + MigrationsSchema: trinoSchema, + User: trinoUser, + } + + d, err := WithInstance(db, config) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := d.Close(); err != nil { + t.Error(err) + } + }() + + dt.Test(t, d, []byte("SELECT 1")) + }) +} + +func testOpen(t *testing.T) { + dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { + ip, port, err := c.FirstPort() + if err != nil { + t.Fatal(err) + } + + // Test various URL formats + testCases := []struct { + name string + url string + }{ + { + name: "basic URL", + url: trinoConnectionString(ip, port), + }, + { + name: "URL with custom migrations table", + url: trinoConnectionString(ip, port, "x-migrations-table=custom_migrations"), + }, + { + name: "URL with custom schema", + url: trinoConnectionString(ip, port, "x-migrations-schema=test_schema"), + }, + { + name: "URL with timeouts", + url: trinoConnectionString(ip, port, "x-statement-timeout=5000", "x-connection-timeout=10000"), + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + tr := &Trino{} + d, err := tr.Open(tc.url) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := d.Close(); err != nil { + t.Error(err) + } + }() + + // Test basic functionality + version, dirty, err := d.Version() + if err != nil { + t.Fatal(err) + } + if version != database.NilVersion { + t.Fatalf("Expected NilVersion, got %v", version) + } + if dirty { + t.Fatal("Expected clean state") + } + }) + } + }) +} + +func TestTrinoLockConcurrency(t *testing.T) { + dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { + ip, port, err := c.FirstPort() + if err != nil { + t.Fatal(err) + } + + addr := trinoConnectionString(ip, port, "x-lock-method=file") + tr := &Trino{} + + // First instance + d1, err := tr.Open(addr) + if err != nil { + t.Fatal(err) + } + defer d1.Close() + + // Second instance + d2, err := tr.Open(addr) + if err != nil { + t.Fatal(err) + } + defer d2.Close() + + // First instance acquires lock + if err := d1.Lock(); err != nil { + t.Fatal(err) + } + + // Second instance should fail to acquire lock + if err := d2.Lock(); err != database.ErrLocked { + t.Fatalf("Expected ErrLocked, got %v", err) + } + + // First instance releases lock + if err := d1.Unlock(); err != nil { + t.Fatal(err) + } + + // Second instance should now be able to acquire lock + if err := d2.Lock(); err != nil { + t.Fatal(err) + } + + if err := d2.Unlock(); err != nil { + t.Fatal(err) + } + }) +} \ No newline at end of file diff --git a/go.mod b/go.mod index ef36567a1..c111f5099 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ require ( cloud.google.com/go/storage v1.38.0 github.com/Azure/go-autorest/autorest/adal v0.9.16 github.com/ClickHouse/clickhouse-go v1.4.3 - github.com/aws/aws-sdk-go v1.49.6 - github.com/cenkalti/backoff/v4 v4.1.2 + github.com/aws/aws-sdk-go v1.55.6 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/cockroachdb/cockroach-go/v2 v2.1.1 github.com/dhui/dktest v0.4.6 github.com/docker/docker v28.3.3+incompatible @@ -50,12 +50,20 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/goidentity/v6 v6.0.1 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/sys/sequential v0.6.0 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/stretchr/objx v0.5.2 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect @@ -88,19 +96,19 @@ require ( github.com/andybalholm/brotli v1.0.4 // indirect github.com/apache/arrow/go/v10 v10.0.1 // indirect github.com/apache/thrift v0.16.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.16.16 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.8 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.12.20 // indirect + github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.65 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.14 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.18 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11 // indirect - github.com/aws/smithy-go v1.13.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.79.0 // indirect + github.com/aws/smithy-go v1.22.2 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 // indirect @@ -147,13 +155,13 @@ require ( github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/klauspost/asmfmt v1.3.2 // indirect - github.com/klauspost/compress v1.15.11 // indirect + github.com/klauspost/compress v1.18.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/mattn/go-colorable v0.1.6 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect - github.com/mitchellh/mapstructure v1.1.2 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/mtibben/percent v0.2.1 // indirect @@ -169,6 +177,7 @@ require ( github.com/rqlite/gorqlite v0.0.0-20230708021416-2acd02b70b79 github.com/shopspring/decimal v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/trinodb/trino-go-client v0.328.0 github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.1 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect diff --git a/go.sum b/go.sum index 8de37ad10..fadabc0c7 100644 --- a/go.sum +++ b/go.sum @@ -27,6 +27,8 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= @@ -69,60 +71,82 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/ahmetb/dlog v0.0.0-20170105205344-4fb5f8204f26 h1:3YVZUqkoev4mL+aCwVOSWV4M7pN+NURHL38Z2zq5JKA= +github.com/ahmetb/dlog v0.0.0-20170105205344-4fb5f8204f26/go.mod h1:ymXt5bw5uSNu4jveerFxE0vNYxF8ncqbptntMaFMg3k= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/apache/arrow/go/v10 v10.0.1 h1:n9dERvixoC/1JjDmBcs9FPaEryoANa2sCgVFo6ez9cI= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/aws/aws-sdk-go v1.49.6 h1:yNldzF5kzLBRvKlKz1S0bkvc2+04R1kt13KfBWQBfFA= -github.com/aws/aws-sdk-go v1.49.6/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/aws/aws-sdk-go-v2 v1.16.16 h1:M1fj4FE2lB4NzRb9Y0xdWsn2P0+2UHVxwKyOa4YJNjk= +github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk= +github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.16.16/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.8 h1:tcFliCWne+zOuUfKNRn8JdFBuWPDuISDH08wD2ULkhk= +github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= +github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.8/go.mod h1:JTnlBSot91steJeti4ryyu/tLd4Sk84O5W22L7O2EQU= -github.com/aws/aws-sdk-go-v2/config v1.17.7 h1:odVM52tFHhpqZBKNjVW5h+Zt1tKHbhdTQRb+0WHrNtw= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= github.com/aws/aws-sdk-go-v2/config v1.17.7/go.mod h1:dN2gja/QXxFF15hQreyrqYhLBaQo1d9ZKe/v/uplQoI= -github.com/aws/aws-sdk-go-v2/credentials v1.12.20 h1:9+ZhlDY7N9dPnUmf7CDfW9In4sW5Ff3bh7oy4DzS1IE= +github.com/aws/aws-sdk-go-v2/config v1.29.12 h1:Y/2a+jLPrPbHpFkpAAYkVEtJmxORlXoo5k2g1fa2sUo= +github.com/aws/aws-sdk-go-v2/config v1.29.12/go.mod h1:xse1YTjmORlb/6fhkWi8qJh3cvZi4JoVNhc+NbJt4kI= github.com/aws/aws-sdk-go-v2/credentials v1.12.20/go.mod h1:UKY5HyIux08bbNA7Blv4PcXQ8cTkGh7ghHMFklaviR4= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17 h1:r08j4sbZu/RVi+BNxkBJwPMUYY3P8mgSDuKkZ/ZN1lE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.65 h1:q+nV2yYegofO/SUXruT+pn4KxkxmaQ++1B/QedcKBFM= +github.com/aws/aws-sdk-go-v2/credentials v1.17.65/go.mod h1:4zyjAuGOdikpNYiSGpsGz8hLGmUzlY8pc8r9QQ/RXYQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17/go.mod h1:yIkQcCDYNsZfXpd5UX2Cy+sWA1jPgIhGTw9cOBzfVnQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33 h1:fAoVmNGhir6BR+RU0/EI+6+D7abM+MCwWf8v4ip5jNI= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33/go.mod h1:84XgODVR8uRhmOnUkKGUZKqIMxmjmLOR8Uyp7G/TPwc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23 h1:s4g/wnzMf+qepSNgTvaQQHNxyMLKSawNhKCPNy++2xY= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23/go.mod h1:2DFxAQ9pfIRy0imBCJv+vZ2X6RKxves6fbnEuSry6b4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17 h1:/K482T5A3623WJgWT8w1yRAFK4RzGzEl7y39yhtn9eA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17/go.mod h1:pRwaTYCJemADaqCbUAxltMoHKata7hmB5PjEXeu0kfg= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24 h1:wj5Rwc05hvUSvKuOF29IYb9QrCLjU+rHAy/x/o0DK2c= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24/go.mod h1:jULHjqqjDlbyTa7pfM7WICATnOv+iOhjletM3N0Xbu8= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.14 h1:ZSIPAkAsCCjYrhqfw2+lNzWDzxzHXEckFkTePL5RSWQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.14/go.mod h1:AyGgqiKv9ECM6IZeNQtdT8NnMvUb3/2wokeq2Fgryto= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9 h1:Lh1AShsuIJTwMkoxVCAYPJgNG5H+eN6SmoUn8nOZ5wE= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcuz+RjeziUtNJackkM= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9/go.mod h1:a9j48l6yL5XINLHLcOKInjdvknN+vWqPBxqeIDw7ktw= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.18 h1:BBYoNQt2kUZUUK4bIPsKrCcjVPUMNsgQpNAwhznK/zo= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.18/go.mod h1:NS55eQ4YixUJPTC+INxi2/jCqe1y2Uw3rnh9wEOVJxY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17 h1:Jrd/oMh0PKQc6+BowB+pLEwLIgaQF29eYbe7E1Av9Ug= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 h1:lguz0bmOoGzozP9XfRJR1QIayEYo+2vP/No3OfLF0pU= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17/go.mod h1:4nYOrY41Lrbk2170/BGkcJKBhws9Pfn8MG3aGqjjeFI= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17 h1:HfVVR1vItaG6le+Bpw6P4midjBDMKnjMyZnw9MXYUcE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17/go.mod h1:YqMdV+gEKCQ59NrB7rzrJdALeBIsYiVi8Inj3+KcqHI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11 h1:3/gm/JTX9bX8CpzTgIlrtYpB3EVBDxyg/GY/QdcIEZw= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11/go.mod h1:fmgDANqTUCxciViKl9hb/zD5LFbvPINFRgWhDbR+vZo= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.23 h1:pwvCchFUEnlceKIgPUouBJwK81aCkQ8UDMORfeFtW10= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.0 h1:OIw2nryEApESTYI5deCZGcq4Gvz8DBAt4tJlNyg3v5o= +github.com/aws/aws-sdk-go-v2/service/s3 v1.79.0/go.mod h1:U5SNqwhXB3Xe6F47kXvWihPl/ilGaEDe8HD/50Z9wxc= github.com/aws/aws-sdk-go-v2/service/sso v1.11.23/go.mod h1:/w0eg9IhFGjGyyncHIQrXtU8wvNsTJOP0R6PPj0wf80= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5 h1:GUnZ62TevLqIoDyHeiWj2P7EqaosgakBKVvWriIdLQY= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.2 h1:pdgODsAhGo4dvzC3JAG5Ce0PX8kWXrTZGx+jxADD+5E= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.2/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5/go.mod h1:csZuQY65DAdFBt1oIjO5hhBR49kQqop4+lcuCjf2arA= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.19 h1:9pPi0PsFNAGILFfPCk8Y0iyEBGc6lu6OQ97U7hmdesg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0 h1:90uX0veLKcdHVfvxhkWUQSCi5VabtwMLFutYiRke4oo= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= github.com/aws/aws-sdk-go-v2/service/sts v1.16.19/go.mod h1:h4J3oPZQbxLhzGnk+j9dfYHi5qIOVJ5kczZd658/ydM= -github.com/aws/smithy-go v1.13.3 h1:l7LYxGuzK6/K+NzJ2mC+VvLUbae0sL3bXU//04MkmnA= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 h1:PZV5W8yk4OtH1JAuhV2PXwwO9v5G5Aoj+eMCn4T+1Kc= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.17/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= github.com/aws/smithy-go v1.13.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= +github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bkaradzic/go-lz4 v1.0.0 h1:RXc4wYsyz985CkXXeX04y4VnZFGG8Rd43pRaHsOXAKk= github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= -github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= @@ -138,6 +162,8 @@ github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go/v2 v2.1.1 h1:3XzfSMuUT0wBe1a3o5C0eOTcArhmmFAg2Jzh/7hhKqo= github.com/cockroachdb/cockroach-go/v2 v2.1.1/go.mod h1:7NtUnP6eK+l6k483WSYNrq3Kb23bWV10IRV1TyeSpwM= +github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= +github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= @@ -163,6 +189,8 @@ github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5 github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= +github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI= github.com/docker/docker v28.3.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -187,6 +215,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -222,10 +252,13 @@ github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPh github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= @@ -292,6 +325,8 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -308,7 +343,9 @@ github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= @@ -322,6 +359,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -393,11 +432,19 @@ github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= @@ -424,8 +471,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -476,8 +523,8 @@ github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcs github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= @@ -521,8 +568,13 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= +github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= +github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= +github.com/ory/dockertest/v3 v3.11.0 h1:OiHcxKAvSDUwsEVh2BjxQQc/5EHz9n0va9awCtNGuyA= +github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4SB194iUDnUI= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= +github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.16 h1:kQPfno+wyx6C5572ABwV+Uo3pDFzQ7yhyGchSyRda0c= github.com/pierrec/lz4/v4 v4.1.16/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= @@ -578,6 +630,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/trinodb/trino-go-client v0.328.0 h1:X6hrGGysA3nvyVcz8kJbBS98srLNTNsnNYwRkMC1atA= +github.com/trinodb/trino-go-client v0.328.0/go.mod h1:e/nck9W6hy+9bbyZEpXKFlNsufn3lQGpUgDL1d5f1FI= github.com/xanzy/go-gitlab v0.15.0 h1:rWtwKTgEnXyNUGrOArN7yyc3THRkpYcKXIXia9abywQ= github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -588,10 +642,17 @@ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23n github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= @@ -654,8 +715,10 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -684,6 +747,7 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -714,6 +778,9 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -731,6 +798,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -772,12 +840,15 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -789,6 +860,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -826,6 +898,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/cli/build_trino.go b/internal/cli/build_trino.go new file mode 100644 index 000000000..5410e289c --- /dev/null +++ b/internal/cli/build_trino.go @@ -0,0 +1,8 @@ +//go:build trino +// +build trino + +package cli + +import ( + _ "github.com/golang-migrate/migrate/v4/database/trino" +) \ No newline at end of file From 792556b5dafe713ef5a9969968449f68e4b73ebf Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Fri, 29 Aug 2025 08:44:18 +0200 Subject: [PATCH 02/11] Refactor Trino driver: simplify connection handling, enhance error management, and add unit tests for configuration and driver registration --- .../migrations/001_create_users_table.up.sql | 4 +- database/trino/trino.go | 586 +++++------------- database/trino/trino_test.go | 179 ++---- database/trino/unit_test.go | 57 ++ 4 files changed, 275 insertions(+), 551 deletions(-) create mode 100644 database/trino/unit_test.go diff --git a/database/trino/examples/migrations/001_create_users_table.up.sql b/database/trino/examples/migrations/001_create_users_table.up.sql index 2fe693e9b..e99d538ad 100644 --- a/database/trino/examples/migrations/001_create_users_table.up.sql +++ b/database/trino/examples/migrations/001_create_users_table.up.sql @@ -1,6 +1,6 @@ CREATE TABLE users ( id BIGINT, - name VARCHAR(255), - email VARCHAR(255), + name VARCHAR, + email VARCHAR, created_at TIMESTAMP ); \ No newline at end of file diff --git a/database/trino/trino.go b/database/trino/trino.go index afa205caf..a55a9ab85 100644 --- a/database/trino/trino.go +++ b/database/trino/trino.go @@ -1,498 +1,252 @@ package trino import ( - "context" "database/sql" "fmt" "io" "net/url" - "os" - "path/filepath" "strconv" "strings" "sync/atomic" "time" + "github.com/golang-migrate/migrate/v4" "github.com/golang-migrate/migrate/v4/database" "github.com/hashicorp/go-multierror" - _ "github.com/trinodb/trino-go-client/trino" // Trino driver + _ "github.com/trinodb/trino-go-client/trino" ) -func init() { - database.Register("trino", &Trino{}) -} - var ( DefaultMigrationsTable = "schema_migrations" - DefaultLockMethod = "file" - DefaultLockTimeout = 15 * time.Minute + ErrNilConfig = fmt.Errorf("no config") ) -var ( - ErrNilConfig = fmt.Errorf("no config") - ErrNoCatalog = fmt.Errorf("no catalog specified") - ErrNoSchema = fmt.Errorf("no schema specified") - ErrInvalidLockMethod = fmt.Errorf("invalid lock method, must be 'file', 'table', or 'none'") - ErrLockTimeout = fmt.Errorf("lock timeout exceeded") -) - -// Config holds the configuration for the Trino driver type Config struct { MigrationsTable string MigrationsSchema string MigrationsCatalog string - User string - Source string // Application identifier for Trino StatementTimeout time.Duration - ConnectionTimeout time.Duration - LockMethod string // "file", "table", "none" - LockFilePath string - LockTimeout time.Duration } -// Trino implements the database.Driver interface for Trino -type Trino struct { - conn *sql.Conn - db *sql.DB - isLocked atomic.Bool - config *Config - lockFile *os.File -} - -// WithInstance creates a new Trino driver instance with an existing database connection -func WithInstance(instance *sql.DB, config *Config) (database.Driver, error) { - if config == nil { - return nil, ErrNilConfig - } - - if err := instance.Ping(); err != nil { - return nil, err - } - - ctx := context.Background() - conn, err := instance.Conn(ctx) - if err != nil { - return nil, err - } - - t, err := WithConnection(ctx, conn, config) - if err != nil { - return nil, err - } - t.db = instance - return t, nil +func init() { + database.Register("trino", &Trino{}) } -// WithConnection creates a new Trino driver instance with an existing connection -func WithConnection(ctx context.Context, conn *sql.Conn, config *Config) (*Trino, error) { +func WithInstance(conn *sql.DB, config *Config) (database.Driver, error) { if config == nil { return nil, ErrNilConfig } - if err := conn.PingContext(ctx); err != nil { + if err := conn.Ping(); err != nil { return nil, err } - // Set defaults - if config.MigrationsTable == "" { - config.MigrationsTable = DefaultMigrationsTable - } - if config.LockMethod == "" { - config.LockMethod = DefaultLockMethod - } - if config.LockTimeout == 0 { - config.LockTimeout = DefaultLockTimeout - } - if config.Source == "" { - config.Source = "golang-migrate" - } - - // Validate lock method - if config.LockMethod != "file" && config.LockMethod != "table" && config.LockMethod != "none" { - return nil, ErrInvalidLockMethod - } - - // Get current catalog and schema if not specified - if config.MigrationsCatalog == "" { - var catalog sql.NullString - query := "SELECT current_catalog" - if err := conn.QueryRowContext(ctx, query).Scan(&catalog); err != nil { - return nil, &database.Error{OrigErr: err, Query: []byte(query)} - } - if !catalog.Valid || catalog.String == "" { - return nil, ErrNoCatalog - } - config.MigrationsCatalog = catalog.String - } - - if config.MigrationsSchema == "" { - var schema sql.NullString - query := "SELECT current_schema" - if err := conn.QueryRowContext(ctx, query).Scan(&schema); err != nil { - return nil, &database.Error{OrigErr: err, Query: []byte(query)} - } - if !schema.Valid || schema.String == "" { - return nil, ErrNoSchema - } - config.MigrationsSchema = schema.String - } - t := &Trino{ conn: conn, config: config, } - if err := t.ensureVersionTable(); err != nil { + if err := t.init(); err != nil { return nil, err } return t, nil } -// Open creates a new Trino driver instance from a URL +type Trino struct { + conn *sql.DB + config *Config + isLocked atomic.Bool +} + func (t *Trino) Open(dsn string) (database.Driver, error) { purl, err := url.Parse(dsn) if err != nil { return nil, err } - - // Build Trino DSN from our custom URL format - // Convert from: trino://user@host:port/catalog/schema?params - // To Trino format: http://user@host:port?catalog=catalog&schema=schema¶ms - - trinoURL := &url.URL{ - Scheme: "http", - Host: purl.Host, - User: purl.User, - } - - // Parse catalog and schema from path - var catalog, schema string - pathParts := strings.Split(strings.Trim(purl.Path, "/"), "/") - if len(pathParts) >= 1 && pathParts[0] != "" { - catalog = pathParts[0] - } - if len(pathParts) >= 2 && pathParts[1] != "" { - schema = pathParts[1] - } - - // Parse query parameters - qv := purl.Query() - - // Build new query parameters for Trino driver - trinoQuery := url.Values{} - - // Set catalog and schema - if catalog != "" { - trinoQuery.Set("catalog", catalog) - } - if schema != "" { - trinoQuery.Set("schema", schema) - } - - // Set source (required by Trino) - if source := qv.Get("source"); source != "" { - trinoQuery.Set("source", source) - } else { - trinoQuery.Set("source", "golang-migrate") - } - - // Copy non-migration specific parameters to Trino driver - for key, values := range qv { - if !strings.HasPrefix(key, "x-") && key != "source" { - for _, value := range values { - trinoQuery.Add(key, value) - } - } - } - - trinoURL.RawQuery = trinoQuery.Encode() - - // Handle custom migration parameters - migrationConfig := &Config{ - MigrationsTable: qv.Get("x-migrations-table"), - MigrationsSchema: qv.Get("x-migrations-schema"), - MigrationsCatalog: qv.Get("x-migrations-catalog"), - LockMethod: qv.Get("x-lock-method"), - LockFilePath: qv.Get("x-lock-file-path"), - } - - if purl.User != nil { - migrationConfig.User = purl.User.Username() - } - - migrationConfig.Source = trinoQuery.Get("source") - - // Parse timeouts - if timeoutStr := qv.Get("x-statement-timeout"); timeoutStr != "" { - if timeoutMs, err := strconv.Atoi(timeoutStr); err == nil { - migrationConfig.StatementTimeout = time.Duration(timeoutMs) * time.Millisecond - } - } - - if timeoutStr := qv.Get("x-connection-timeout"); timeoutStr != "" { - if timeoutMs, err := strconv.Atoi(timeoutStr); err == nil { - migrationConfig.ConnectionTimeout = time.Duration(timeoutMs) * time.Millisecond - } + + // Use Trino HTTP URL directly - just filter our custom parameters + q := migrate.FilterCustomQuery(purl) + + // Set source if not provided + query := q.Query() + if query.Get("source") == "" { + query.Set("source", "golang-migrate") + } + q.RawQuery = query.Encode() + + conn, err := sql.Open("trino", q.String()) + if err != nil { + return nil, err } - if timeoutStr := qv.Get("x-lock-timeout"); timeoutStr != "" { + // Parse statement timeout + var statementTimeout time.Duration + if timeoutStr := purl.Query().Get("x-statement-timeout"); timeoutStr != "" { if timeoutMs, err := strconv.Atoi(timeoutStr); err == nil { - migrationConfig.LockTimeout = time.Duration(timeoutMs) * time.Millisecond + statementTimeout = time.Duration(timeoutMs) * time.Millisecond } } - // Use defaults from catalog/schema if not specified in query - if migrationConfig.MigrationsCatalog == "" { - migrationConfig.MigrationsCatalog = catalog - } - if migrationConfig.MigrationsSchema == "" { - migrationConfig.MigrationsSchema = schema - } - - // Open database connection using Trino driver - db, err := sql.Open("trino", trinoURL.String()) - if err != nil { - return nil, err + t = &Trino{ + conn: conn, + config: &Config{ + MigrationsTable: purl.Query().Get("x-migrations-table"), + MigrationsSchema: purl.Query().Get("x-migrations-schema"), + MigrationsCatalog: purl.Query().Get("x-migrations-catalog"), + StatementTimeout: statementTimeout, + }, } - if err := db.Ping(); err != nil { + if err := t.init(); err != nil { return nil, err } - return WithInstance(db, migrationConfig) + return t, nil } -// Close closes the database connection -func (t *Trino) Close() error { - connErr := t.conn.Close() - var dbErr error - if t.db != nil { - dbErr = t.db.Close() - } - - // Clean up any lock files - if t.lockFile != nil { - t.lockFile.Close() - os.Remove(t.lockFile.Name()) - t.lockFile = nil +func (t *Trino) init() error { + // Test basic connectivity first + if err := t.conn.Ping(); err != nil { + return fmt.Errorf("ping failed: %w", err) } - if connErr != nil || dbErr != nil { - return fmt.Errorf("conn: %v, db: %v", connErr, dbErr) - } - return nil -} - -// Lock acquires a migration lock -func (t *Trino) Lock() error { - return database.CasRestoreOnErr(&t.isLocked, false, true, database.ErrLocked, func() error { - switch t.config.LockMethod { - case "file": - return t.lockWithFile() - case "table": - return t.lockWithTable() - case "none": - return nil - default: - return ErrInvalidLockMethod - } - }) -} - -// Unlock releases the migration lock -func (t *Trino) Unlock() error { - return database.CasRestoreOnErr(&t.isLocked, true, false, database.ErrNotLocked, func() error { - switch t.config.LockMethod { - case "file": - return t.unlockFile() - case "table": - return t.unlockTable() - case "none": - return nil - default: - return ErrInvalidLockMethod + // Get current catalog if not specified + if t.config.MigrationsCatalog == "" { + if err := t.conn.QueryRow("SELECT current_catalog").Scan(&t.config.MigrationsCatalog); err != nil { + return fmt.Errorf("failed to get current catalog: %w", err) } - }) -} - -// lockWithFile implements file-based locking -func (t *Trino) lockWithFile() error { - lockPath := t.config.LockFilePath - if lockPath == "" { - lockPath = filepath.Join(os.TempDir(), fmt.Sprintf("trino-migrate-%s-%s-%s.lock", - t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable)) } - // Try to create the lock file exclusively - lockFile, err := os.OpenFile(lockPath, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0600) - if err != nil { - if os.IsExist(err) { - return database.ErrLocked + // Get current schema if not specified + if t.config.MigrationsSchema == "" { + if err := t.conn.QueryRow("SELECT current_schema").Scan(&t.config.MigrationsSchema); err != nil { + return fmt.Errorf("failed to get current schema: %w", err) } - return err } - // Write lock information - lockInfo := fmt.Sprintf("pid=%d\ntime=%s\nuser=%s\nsource=%s\n", - os.Getpid(), time.Now().Format(time.RFC3339), t.config.User, t.config.Source) - - if _, err := lockFile.WriteString(lockInfo); err != nil { - lockFile.Close() - os.Remove(lockPath) - return err + if t.config.MigrationsTable == "" { + t.config.MigrationsTable = DefaultMigrationsTable } - t.lockFile = lockFile - return nil -} - -// unlockFile removes the file-based lock -func (t *Trino) unlockFile() error { - if t.lockFile != nil { - lockPath := t.lockFile.Name() - t.lockFile.Close() - t.lockFile = nil - return os.Remove(lockPath) - } - return nil + return t.ensureVersionTable() } -// lockWithTable implements table-based locking -func (t *Trino) lockWithTable() error { - lockTable := fmt.Sprintf("%s.%s.%s_lock", - t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - - // Create lock table if it doesn't exist - createQuery := fmt.Sprintf(` - CREATE TABLE IF NOT EXISTS %s ( - id VARCHAR(255) PRIMARY KEY, - locked_at TIMESTAMP, - locked_by VARCHAR(255) - )`, lockTable) - - if _, err := t.conn.ExecContext(context.Background(), createQuery); err != nil { - return &database.Error{OrigErr: err, Query: []byte(createQuery)} - } - - // Try to acquire lock - lockId := fmt.Sprintf("%s-%s", t.config.User, t.config.Source) - insertQuery := fmt.Sprintf(` - INSERT INTO %s (id, locked_at, locked_by) - VALUES (?, CURRENT_TIMESTAMP, ?)`, lockTable) - - if _, err := t.conn.ExecContext(context.Background(), insertQuery, "migration", lockId); err != nil { - // Check if it's a constraint violation (lock already exists) - if strings.Contains(strings.ToLower(err.Error()), "duplicate") || - strings.Contains(strings.ToLower(err.Error()), "constraint") { - return database.ErrLocked - } - return &database.Error{OrigErr: err, Query: []byte(insertQuery)} - } - - return nil -} - -// unlockTable removes the table-based lock -func (t *Trino) unlockTable() error { - lockTable := fmt.Sprintf("%s.%s.%s_lock", - t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - - deleteQuery := fmt.Sprintf(`DELETE FROM %s WHERE id = ?`, lockTable) - if _, err := t.conn.ExecContext(context.Background(), deleteQuery, "migration"); err != nil { - return &database.Error{OrigErr: err, Query: []byte(deleteQuery)} - } - - return nil -} - -// Run executes a migration -func (t *Trino) Run(migration io.Reader) error { - migr, err := io.ReadAll(migration) +func (t *Trino) Run(r io.Reader) error { + migration, err := io.ReadAll(r) if err != nil { return err } - ctx := context.Background() - if t.config.StatementTimeout != 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithTimeout(ctx, t.config.StatementTimeout) - defer cancel() - } - - query := string(migr) + query := string(migration) if strings.TrimSpace(query) == "" { return nil } - if _, err := t.conn.ExecContext(ctx, query); err != nil { - return &database.Error{OrigErr: err, Err: "migration failed", Query: migr} + if _, err := t.conn.Exec(query); err != nil { + return database.Error{OrigErr: err, Err: "migration failed", Query: migration} } return nil } -// SetVersion sets the current migration version -func (t *Trino) SetVersion(version int, dirty bool) error { - tx, err := t.conn.BeginTx(context.Background(), &sql.TxOptions{}) +func (t *Trino) Version() (int, bool, error) { + var ( + version int + dirty bool + query = fmt.Sprintf("SELECT version, dirty FROM %s.%s.%s LIMIT 1", + t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) + ) + + err := t.conn.QueryRow(query).Scan(&version, &dirty) if err != nil { - return &database.Error{OrigErr: err, Err: "transaction start failed"} + if err == sql.ErrNoRows { + return database.NilVersion, false, nil + } + // Check if table doesn't exist + if strings.Contains(strings.ToLower(err.Error()), "not exist") || + strings.Contains(strings.ToLower(err.Error()), "not found") { + return database.NilVersion, false, nil + } + return 0, false, &database.Error{OrigErr: err, Query: []byte(query)} } + return version, dirty, nil +} +func (t *Trino) SetVersion(version int, dirty bool) error { migrationsTable := fmt.Sprintf("%s.%s.%s", t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - // Clear existing version - deleteQuery := fmt.Sprintf("DELETE FROM %s", migrationsTable) - if _, err := tx.Exec(deleteQuery); err != nil { - if errRollback := tx.Rollback(); errRollback != nil { - err = multierror.Append(err, errRollback) + // For Memory connector and other append-only systems, use table recreation + // Check if we need to clear existing data by trying to recreate table + dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS %s", migrationsTable) + if _, err := t.conn.Exec(dropQuery); err != nil { + // If DROP fails, try DELETE (for connectors that support it) + deleteQuery := fmt.Sprintf("DELETE FROM %s", migrationsTable) + if _, err := t.conn.Exec(deleteQuery); err != nil { + return &database.Error{OrigErr: err, Query: []byte(deleteQuery)} + } + } else { + // Recreate table after successful drop + createQuery := fmt.Sprintf(` + CREATE TABLE %s ( + version BIGINT NOT NULL, + dirty BOOLEAN NOT NULL + )`, migrationsTable) + if _, err := t.conn.Exec(createQuery); err != nil { + return &database.Error{OrigErr: err, Query: []byte(createQuery)} } - return &database.Error{OrigErr: err, Query: []byte(deleteQuery)} } // Insert new version if needed if version >= 0 || (version == database.NilVersion && dirty) { insertQuery := fmt.Sprintf("INSERT INTO %s (version, dirty) VALUES (?, ?)", migrationsTable) - if _, err := tx.Exec(insertQuery, version, dirty); err != nil { - if errRollback := tx.Rollback(); errRollback != nil { - err = multierror.Append(err, errRollback) - } + if _, err := t.conn.Exec(insertQuery, version, dirty); err != nil { return &database.Error{OrigErr: err, Query: []byte(insertQuery)} } } - if err := tx.Commit(); err != nil { - return &database.Error{OrigErr: err, Err: "transaction commit failed"} - } - return nil } -// Version returns the current migration version -func (t *Trino) Version() (version int, dirty bool, err error) { +// ensureVersionTable creates the migrations table if it doesn't exist +func (t *Trino) ensureVersionTable() (err error) { + if err = t.Lock(); err != nil { + return err + } + + defer func() { + if e := t.Unlock(); e != nil { + if err == nil { + err = e + } else { + err = multierror.Append(err, e) + } + } + }() + migrationsTable := fmt.Sprintf("%s.%s.%s", t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - query := fmt.Sprintf("SELECT version, dirty FROM %s LIMIT 1", migrationsTable) - err = t.conn.QueryRowContext(context.Background(), query).Scan(&version, &dirty) + // Use CREATE TABLE IF NOT EXISTS for safe concurrent table creation + createQuery := fmt.Sprintf(` + CREATE TABLE IF NOT EXISTS %s ( + version BIGINT NOT NULL, + dirty BOOLEAN NOT NULL + )`, migrationsTable) - switch { - case err == sql.ErrNoRows: - return database.NilVersion, false, nil - case err != nil: - // Check if table doesn't exist - if strings.Contains(strings.ToLower(err.Error()), "not exist") || - strings.Contains(strings.ToLower(err.Error()), "not found") { - return database.NilVersion, false, nil + if _, err := t.conn.Exec(createQuery); err != nil { + // Check if it's a "table already exists" error, which is safe to ignore + if strings.Contains(strings.ToLower(err.Error()), "already exists") || + strings.Contains(strings.ToLower(err.Error()), "table exists") { + return nil } - return 0, false, &database.Error{OrigErr: err, Query: []byte(query)} - default: - return version, dirty, nil + return &database.Error{OrigErr: err, Query: []byte(createQuery)} } + + return nil } -// Drop removes all tables from the current schema func (t *Trino) Drop() (err error) { // Get all tables in the current schema query := fmt.Sprintf(` @@ -503,7 +257,7 @@ func (t *Trino) Drop() (err error) { AND table_type = 'BASE TABLE'`, t.config.MigrationsCatalog, t.config.MigrationsSchema) - tables, err := t.conn.QueryContext(context.Background(), query) + tables, err := t.conn.Query(query) if err != nil { return &database.Error{OrigErr: err, Query: []byte(query)} } @@ -513,80 +267,40 @@ func (t *Trino) Drop() (err error) { } }() - // Collect table names - tableNames := make([]string, 0) + // Drop tables one by one for tables.Next() { var tableName string if err := tables.Scan(&tableName); err != nil { return err } - if len(tableName) > 0 { - tableNames = append(tableNames, tableName) - } - } - if err := tables.Err(); err != nil { - return &database.Error{OrigErr: err, Query: []byte(query)} - } - // Drop tables one by one - for _, tableName := range tableNames { dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS %s.%s.%s", t.config.MigrationsCatalog, t.config.MigrationsSchema, tableName) - if _, err := t.conn.ExecContext(context.Background(), dropQuery); err != nil { + if _, err := t.conn.Exec(dropQuery); err != nil { return &database.Error{OrigErr: err, Query: []byte(dropQuery)} } } + if err := tables.Err(); err != nil { + return &database.Error{OrigErr: err, Query: []byte(query)} + } return nil } -// ensureVersionTable creates the migrations table if it doesn't exist -func (t *Trino) ensureVersionTable() (err error) { - if err = t.Lock(); err != nil { - return err - } - - defer func() { - if e := t.Unlock(); e != nil { - if err == nil { - err = e - } else { - err = multierror.Append(err, e) - } - } - }() - - migrationsTable := fmt.Sprintf("%s.%s.%s", - t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - - // Check if table exists - checkQuery := fmt.Sprintf(` - SELECT COUNT(*) - FROM information_schema.tables - WHERE table_catalog = '%s' - AND table_schema = '%s' - AND table_name = '%s'`, - t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - - var count int - if err := t.conn.QueryRowContext(context.Background(), checkQuery).Scan(&count); err != nil { - return &database.Error{OrigErr: err, Query: []byte(checkQuery)} - } - - if count > 0 { - return nil // Table already exists +func (t *Trino) Lock() error { + if !t.isLocked.CompareAndSwap(false, true) { + return database.ErrLocked } + return nil +} - // Create the migrations table - createQuery := fmt.Sprintf(` - CREATE TABLE %s ( - version BIGINT NOT NULL, - dirty BOOLEAN NOT NULL - )`, migrationsTable) - - if _, err := t.conn.ExecContext(context.Background(), createQuery); err != nil { - return &database.Error{OrigErr: err, Query: []byte(createQuery)} +func (t *Trino) Unlock() error { + if !t.isLocked.CompareAndSwap(true, false) { + return database.ErrNotLocked } - return nil } + +func (t *Trino) Close() error { + return t.conn.Close() +} \ No newline at end of file diff --git a/database/trino/trino_test.go b/database/trino/trino_test.go index 9665f0231..6b864ded0 100644 --- a/database/trino/trino_test.go +++ b/database/trino/trino_test.go @@ -9,6 +9,7 @@ import ( "log" "strings" "testing" + "time" "github.com/dhui/dktest" "github.com/golang-migrate/migrate/v4" @@ -19,9 +20,9 @@ import ( ) const ( - trinoUser = "testuser" - trinoCatalog = "memory" - trinoSchema = "default" + trinoUser = "testuser" + trinoCatalog = "memory" + trinoSchema = "default" ) var ( @@ -29,8 +30,9 @@ var ( Env: map[string]string{ "TRINO_ENVIRONMENT": "test", }, - PortRequired: true, + PortRequired: true, ReadyFunc: isReady, + ReadyTimeout: 10 * time.Minute, // Increased timeout for Trino startup } // Using the official Trino Docker image specs = []dktesting.ContainerSpec{ @@ -39,9 +41,10 @@ var ( ) func trinoConnectionString(host, port string, options ...string) string { - baseURL := fmt.Sprintf("trino://%s@%s:%s/%s/%s", trinoUser, host, port, trinoCatalog, trinoSchema) + baseURL := fmt.Sprintf("http://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", + trinoUser, host, port, trinoCatalog, trinoSchema) if len(options) > 0 { - baseURL += "?" + strings.Join(options, "&") + baseURL += "&" + strings.Join(options, "&") } return baseURL } @@ -53,9 +56,9 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool { } // Build the direct Trino HTTP URL for sql.Open - trinoURL := fmt.Sprintf("http://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", + trinoURL := fmt.Sprintf("http://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", trinoUser, ip, port, trinoCatalog, trinoSchema) - + db, err := sql.Open("trino", trinoURL) if err != nil { log.Printf("trino open error: %v", err) @@ -67,17 +70,39 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool { } }() - if err = db.PingContext(ctx); err != nil { - switch err { - case sqldriver.ErrBadConn, io.EOF: - return false - default: - log.Printf("trino ping error: %v", err) + // Use a dedicated context with longer timeout for Trino startup + readyCtx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + defer cancel() + + for i := 0; i < 120; i++ { // Increased attempts + if err = db.PingContext(readyCtx); err != nil { + switch err { + case sqldriver.ErrBadConn, io.EOF: + time.Sleep(2 * time.Second) // Longer sleep for Trino + continue + default: + log.Printf("trino ping attempt %d error: %v", i+1, err) + } + + time.Sleep(2 * time.Second) + continue } - return false + + // Test a simple query to ensure Trino is fully ready + var result int + if err = db.QueryRowContext(readyCtx, "SELECT 1").Scan(&result); err != nil { + log.Printf("trino query test attempt %d error: %v", i+1, err) + time.Sleep(2 * time.Second) + continue + } + + log.Printf("trino ready after %d attempts", i+1) + // Give Trino a moment to stabilize before tests start + time.Sleep(3 * time.Second) + return true } - - return true + log.Printf("trino failed to become ready after 120 attempts") + return false } func mustRun(t *testing.T, d database.Driver, statements []string) { @@ -91,7 +116,6 @@ func mustRun(t *testing.T, d database.Driver, statements []string) { func Test(t *testing.T) { t.Run("test", test) t.Run("testMigrate", testMigrate) - t.Run("testLockingMethods", testLockingMethods) t.Run("testWithInstance", testWithInstance) t.Run("testOpen", testOpen) @@ -153,74 +177,6 @@ func testMigrate(t *testing.T) { }) } -func testLockingMethods(t *testing.T) { - dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { - ip, port, err := c.FirstPort() - if err != nil { - t.Fatal(err) - } - - // Test file-based locking (default) - addr := trinoConnectionString(ip, port, "x-lock-method=file") - tr := &Trino{} - d, err := tr.Open(addr) - if err != nil { - t.Fatal(err) - } - defer func() { - if err := d.Close(); err != nil { - t.Error(err) - } - }() - - // Test locking functionality - if err := d.Lock(); err != nil { - t.Fatal(err) - } - if err := d.Unlock(); err != nil { - t.Fatal(err) - } - - // Test table-based locking - addr2 := trinoConnectionString(ip, port, "x-lock-method=table") - d2, err := tr.Open(addr2) - if err != nil { - t.Fatal(err) - } - defer func() { - if err := d2.Close(); err != nil { - t.Error(err) - } - }() - - if err := d2.Lock(); err != nil { - t.Fatal(err) - } - if err := d2.Unlock(); err != nil { - t.Fatal(err) - } - - // Test no locking - addr3 := trinoConnectionString(ip, port, "x-lock-method=none") - d3, err := tr.Open(addr3) - if err != nil { - t.Fatal(err) - } - defer func() { - if err := d3.Close(); err != nil { - t.Error(err) - } - }() - - if err := d3.Lock(); err != nil { - t.Fatal(err) - } - if err := d3.Unlock(); err != nil { - t.Fatal(err) - } - }) -} - func testWithInstance(t *testing.T) { dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { ip, port, err := c.FirstPort() @@ -229,9 +185,9 @@ func testWithInstance(t *testing.T) { } // Create direct connection to Trino - trinoURL := fmt.Sprintf("http://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", + trinoURL := fmt.Sprintf("http://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", trinoUser, ip, port, trinoCatalog, trinoSchema) - + db, err := sql.Open("trino", trinoURL) if err != nil { t.Fatal(err) @@ -245,7 +201,6 @@ func testWithInstance(t *testing.T) { config := &Config{ MigrationsCatalog: trinoCatalog, MigrationsSchema: trinoSchema, - User: trinoUser, } d, err := WithInstance(db, config) @@ -283,12 +238,12 @@ func testOpen(t *testing.T) { url: trinoConnectionString(ip, port, "x-migrations-table=custom_migrations"), }, { - name: "URL with custom schema", - url: trinoConnectionString(ip, port, "x-migrations-schema=test_schema"), + name: "URL with custom schema", + url: trinoConnectionString(ip, port, "x-migrations-schema=default"), }, { name: "URL with timeouts", - url: trinoConnectionString(ip, port, "x-statement-timeout=5000", "x-connection-timeout=10000"), + url: trinoConnectionString(ip, port, "x-statement-timeout=5000"), }, } @@ -328,45 +283,43 @@ func TestTrinoLockConcurrency(t *testing.T) { t.Fatal(err) } - addr := trinoConnectionString(ip, port, "x-lock-method=file") + addr := trinoConnectionString(ip, port) tr := &Trino{} - - // First instance - d1, err := tr.Open(addr) - if err != nil { - t.Fatal(err) - } - defer d1.Close() - // Second instance - d2, err := tr.Open(addr) + // Single instance to test locking mechanism + d, err := tr.Open(addr) if err != nil { t.Fatal(err) } - defer d2.Close() + defer d.Close() - // First instance acquires lock - if err := d1.Lock(); err != nil { + // Test basic locking functionality + if err := d.Lock(); err != nil { t.Fatal(err) } - // Second instance should fail to acquire lock - if err := d2.Lock(); err != database.ErrLocked { + // Try to acquire lock again (should fail) + if err := d.Lock(); err != database.ErrLocked { t.Fatalf("Expected ErrLocked, got %v", err) } - // First instance releases lock - if err := d1.Unlock(); err != nil { + // Release lock + if err := d.Unlock(); err != nil { t.Fatal(err) } - // Second instance should now be able to acquire lock - if err := d2.Lock(); err != nil { + // Try to unlock again (should fail) + if err := d.Unlock(); err != database.ErrNotLocked { + t.Fatalf("Expected ErrNotLocked, got %v", err) + } + + // Should be able to lock again + if err := d.Lock(); err != nil { t.Fatal(err) } - if err := d2.Unlock(); err != nil { + if err := d.Unlock(); err != nil { t.Fatal(err) } }) -} \ No newline at end of file +} diff --git a/database/trino/unit_test.go b/database/trino/unit_test.go new file mode 100644 index 000000000..5e63addb9 --- /dev/null +++ b/database/trino/unit_test.go @@ -0,0 +1,57 @@ +package trino + +import ( + "testing" + + "github.com/golang-migrate/migrate/v4/database" +) + +func TestConfig_Defaults(t *testing.T) { + config := &Config{} + + // Test default values get set properly + if config.MigrationsTable != "" { + t.Errorf("Expected empty MigrationsTable, got %s", config.MigrationsTable) + } + + if config.MigrationsSchema != "" { + t.Errorf("Expected empty MigrationsSchema, got %s", config.MigrationsSchema) + } + + if config.MigrationsCatalog != "" { + t.Errorf("Expected empty MigrationsCatalog, got %s", config.MigrationsCatalog) + } +} + +func TestTrino_Constants(t *testing.T) { + if DefaultMigrationsTable != "schema_migrations" { + t.Errorf("Expected DefaultMigrationsTable to be 'schema_migrations', got %s", DefaultMigrationsTable) + } +} + +func TestTrino_Errors(t *testing.T) { + if ErrNilConfig == nil { + t.Error("Expected ErrNilConfig to be defined") + } +} + +func TestTrino_Registration(t *testing.T) { + // Test that the driver is registered + drivers := database.List() + found := false + for _, driver := range drivers { + if driver == "trino" { + found = true + break + } + } + + if !found { + t.Error("Trino driver should be registered") + } +} + +func TestTrino_DriverInterface(t *testing.T) { + // Test that Trino implements the database.Driver interface + var _ database.Driver = &Trino{} +} \ No newline at end of file From c9d87b0ee16eb76e722ed8e02ee8c55004889a8a Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Fri, 29 Aug 2025 08:56:52 +0200 Subject: [PATCH 03/11] Fix SQL syntax by removing unnecessary semicolons and ensure consistent formatting in migration files --- .../001_create_users_table.down.sql | 2 +- .../migrations/001_create_users_table.up.sql | 2 +- .../002_add_index_to_users.down.sql | 2 +- .../migrations/002_add_index_to_users.up.sql | 2 +- database/trino/trino.go | 33 ++++--------------- 5 files changed, 10 insertions(+), 31 deletions(-) diff --git a/database/trino/examples/migrations/001_create_users_table.down.sql b/database/trino/examples/migrations/001_create_users_table.down.sql index 365a21075..ea15b3854 100644 --- a/database/trino/examples/migrations/001_create_users_table.down.sql +++ b/database/trino/examples/migrations/001_create_users_table.down.sql @@ -1 +1 @@ -DROP TABLE IF EXISTS users; \ No newline at end of file +DROP TABLE IF EXISTS users \ No newline at end of file diff --git a/database/trino/examples/migrations/001_create_users_table.up.sql b/database/trino/examples/migrations/001_create_users_table.up.sql index e99d538ad..fe9a67183 100644 --- a/database/trino/examples/migrations/001_create_users_table.up.sql +++ b/database/trino/examples/migrations/001_create_users_table.up.sql @@ -3,4 +3,4 @@ CREATE TABLE users ( name VARCHAR, email VARCHAR, created_at TIMESTAMP -); \ No newline at end of file +) \ No newline at end of file diff --git a/database/trino/examples/migrations/002_add_index_to_users.down.sql b/database/trino/examples/migrations/002_add_index_to_users.down.sql index ca4880f8e..5b48d4eec 100644 --- a/database/trino/examples/migrations/002_add_index_to_users.down.sql +++ b/database/trino/examples/migrations/002_add_index_to_users.down.sql @@ -1 +1 @@ -DROP VIEW IF EXISTS user_by_email; \ No newline at end of file +DROP VIEW IF EXISTS user_by_email \ No newline at end of file diff --git a/database/trino/examples/migrations/002_add_index_to_users.up.sql b/database/trino/examples/migrations/002_add_index_to_users.up.sql index 8adcf8bc1..ed5fe6126 100644 --- a/database/trino/examples/migrations/002_add_index_to_users.up.sql +++ b/database/trino/examples/migrations/002_add_index_to_users.up.sql @@ -2,4 +2,4 @@ CREATE VIEW user_by_email AS SELECT id, name, email, created_at FROM users -WHERE email IS NOT NULL; \ No newline at end of file +WHERE email IS NOT NULL \ No newline at end of file diff --git a/database/trino/trino.go b/database/trino/trino.go index a55a9ab85..6e549d121 100644 --- a/database/trino/trino.go +++ b/database/trino/trino.go @@ -18,7 +18,7 @@ import ( var ( DefaultMigrationsTable = "schema_migrations" - ErrNilConfig = fmt.Errorf("no config") + ErrNilConfig = fmt.Errorf("no config") ) type Config struct { @@ -64,17 +64,17 @@ func (t *Trino) Open(dsn string) (database.Driver, error) { if err != nil { return nil, err } - + // Use Trino HTTP URL directly - just filter our custom parameters q := migrate.FilterCustomQuery(purl) - + // Set source if not provided query := q.Query() if query.Get("source") == "" { query.Set("source", "golang-migrate") } q.RawQuery = query.Encode() - + conn, err := sql.Open("trino", q.String()) if err != nil { return nil, err @@ -157,7 +157,7 @@ func (t *Trino) Version() (int, bool, error) { query = fmt.Sprintf("SELECT version, dirty FROM %s.%s.%s LIMIT 1", t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) ) - + err := t.conn.QueryRow(query).Scan(&version, &dirty) if err != nil { if err == sql.ErrNoRows { @@ -177,27 +177,6 @@ func (t *Trino) SetVersion(version int, dirty bool) error { migrationsTable := fmt.Sprintf("%s.%s.%s", t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - // For Memory connector and other append-only systems, use table recreation - // Check if we need to clear existing data by trying to recreate table - dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS %s", migrationsTable) - if _, err := t.conn.Exec(dropQuery); err != nil { - // If DROP fails, try DELETE (for connectors that support it) - deleteQuery := fmt.Sprintf("DELETE FROM %s", migrationsTable) - if _, err := t.conn.Exec(deleteQuery); err != nil { - return &database.Error{OrigErr: err, Query: []byte(deleteQuery)} - } - } else { - // Recreate table after successful drop - createQuery := fmt.Sprintf(` - CREATE TABLE %s ( - version BIGINT NOT NULL, - dirty BOOLEAN NOT NULL - )`, migrationsTable) - if _, err := t.conn.Exec(createQuery); err != nil { - return &database.Error{OrigErr: err, Query: []byte(createQuery)} - } - } - // Insert new version if needed if version >= 0 || (version == database.NilVersion && dirty) { insertQuery := fmt.Sprintf("INSERT INTO %s (version, dirty) VALUES (?, ?)", migrationsTable) @@ -303,4 +282,4 @@ func (t *Trino) Unlock() error { func (t *Trino) Close() error { return t.conn.Close() -} \ No newline at end of file +} From 8b7e02f34f73a8bcf7c1bc36d49a184a7d78c85b Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Fri, 29 Aug 2025 23:00:56 +0200 Subject: [PATCH 04/11] Enhance migration scripts: add IF NOT EXISTS to user table creation and use CREATE OR REPLACE for user view --- .../trino/examples/migrations/001_create_users_table.up.sql | 2 +- .../trino/examples/migrations/002_add_index_to_users.up.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/database/trino/examples/migrations/001_create_users_table.up.sql b/database/trino/examples/migrations/001_create_users_table.up.sql index fe9a67183..c5cc771a0 100644 --- a/database/trino/examples/migrations/001_create_users_table.up.sql +++ b/database/trino/examples/migrations/001_create_users_table.up.sql @@ -1,4 +1,4 @@ -CREATE TABLE users ( +CREATE TABLE IF NOT EXISTS users ( id BIGINT, name VARCHAR, email VARCHAR, diff --git a/database/trino/examples/migrations/002_add_index_to_users.up.sql b/database/trino/examples/migrations/002_add_index_to_users.up.sql index ed5fe6126..8828284d8 100644 --- a/database/trino/examples/migrations/002_add_index_to_users.up.sql +++ b/database/trino/examples/migrations/002_add_index_to_users.up.sql @@ -1,5 +1,5 @@ -- Trino doesn't support traditional indexes, but we can create a view for common queries -CREATE VIEW user_by_email AS +CREATE OR REPLACE VIEW user_by_email AS SELECT id, name, email, created_at FROM users WHERE email IS NOT NULL \ No newline at end of file From 8639c4e191bfda25b8b943987b1ad574c724a7ff Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Fri, 29 Aug 2025 23:22:17 +0200 Subject: [PATCH 05/11] Enhance Trino version management: add sequence column to version table and update queries for version retrieval and insertion --- database/trino/trino.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/database/trino/trino.go b/database/trino/trino.go index 6e549d121..f06399fbe 100644 --- a/database/trino/trino.go +++ b/database/trino/trino.go @@ -154,7 +154,7 @@ func (t *Trino) Version() (int, bool, error) { var ( version int dirty bool - query = fmt.Sprintf("SELECT version, dirty FROM %s.%s.%s LIMIT 1", + query = fmt.Sprintf("SELECT version, dirty FROM %s.%s.%s ORDER BY sequence DESC LIMIT 1", t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) ) @@ -177,12 +177,9 @@ func (t *Trino) SetVersion(version int, dirty bool) error { migrationsTable := fmt.Sprintf("%s.%s.%s", t.config.MigrationsCatalog, t.config.MigrationsSchema, t.config.MigrationsTable) - // Insert new version if needed - if version >= 0 || (version == database.NilVersion && dirty) { - insertQuery := fmt.Sprintf("INSERT INTO %s (version, dirty) VALUES (?, ?)", migrationsTable) - if _, err := t.conn.Exec(insertQuery, version, dirty); err != nil { - return &database.Error{OrigErr: err, Query: []byte(insertQuery)} - } + insertQuery := fmt.Sprintf("INSERT INTO %s (version, dirty, sequence) VALUES (?, ?, ?)", migrationsTable) + if _, err := t.conn.Exec(insertQuery, version, dirty, time.Now().UnixNano()); err != nil { + return &database.Error{OrigErr: err, Query: []byte(insertQuery)} } return nil @@ -211,7 +208,8 @@ func (t *Trino) ensureVersionTable() (err error) { createQuery := fmt.Sprintf(` CREATE TABLE IF NOT EXISTS %s ( version BIGINT NOT NULL, - dirty BOOLEAN NOT NULL + dirty BOOLEAN NOT NULL, + sequence BIGINT NOT NULL )`, migrationsTable) if _, err := t.conn.Exec(createQuery); err != nil { From 9ad39472da0260adaf1d53d1037a328cc87687c8 Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Sat, 30 Aug 2025 00:07:47 +0200 Subject: [PATCH 06/11] Add Trino support: update Makefile to include Trino in DATABASE variable and enhance connection handling with scheme conversion in trino.go; add tests for scheme conversion in trino_test.go --- Makefile | 2 +- database/trino/trino.go | 13 +++++- database/trino/trino_test.go | 78 +++++++++++++++++++++++++++++++++++- 3 files changed, 90 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8e23a43c7..b1891a454 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SOURCE ?= file go_bindata github github_ee bitbucket aws_s3 google_cloud_storage godoc_vfs gitlab -DATABASE ?= postgres mysql redshift cassandra spanner cockroachdb yugabytedb clickhouse mongodb sqlserver firebird neo4j pgx pgx5 rqlite +DATABASE ?= postgres mysql redshift cassandra spanner cockroachdb yugabytedb clickhouse mongodb sqlserver firebird neo4j pgx pgx5 rqlite trino DATABASE_TEST ?= $(DATABASE) sqlite sqlite3 sqlcipher VERSION ?= $(shell git describe --tags 2>/dev/null | cut -c 2-) TEST_FLAGS ?= diff --git a/database/trino/trino.go b/database/trino/trino.go index f06399fbe..0a3c019c5 100644 --- a/database/trino/trino.go +++ b/database/trino/trino.go @@ -65,8 +65,19 @@ func (t *Trino) Open(dsn string) (database.Driver, error) { return nil, err } - // Use Trino HTTP URL directly - just filter our custom parameters + // Filter custom parameters and handle scheme conversion q := migrate.FilterCustomQuery(purl) + + // Convert trino:// scheme to http:// or https:// based on ssl parameter + if q.Scheme == "trino" { + // Check ssl parameter (default is true) + ssl := purl.Query().Get("ssl") + if ssl == "" || ssl == "true" { + q.Scheme = "https" + } else { + q.Scheme = "http" + } + } // Set source if not provided query := q.Query() diff --git a/database/trino/trino_test.go b/database/trino/trino_test.go index 6b864ded0..8fa416b44 100644 --- a/database/trino/trino_test.go +++ b/database/trino/trino_test.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "log" + "net/url" "strings" "testing" "time" @@ -49,6 +50,15 @@ func trinoConnectionString(host, port string, options ...string) string { return baseURL } +func trinoConnectionStringWithScheme(scheme, host, port string, options ...string) string { + baseURL := fmt.Sprintf("%s://%s@%s:%s?catalog=%s&schema=%s&source=migrate-test", + scheme, trinoUser, host, port, trinoCatalog, trinoSchema) + if len(options) > 0 { + baseURL += "&" + strings.Join(options, "&") + } + return baseURL +} + func isReady(ctx context.Context, c dktest.ContainerInfo) bool { ip, port, err := c.FirstPort() if err != nil { @@ -238,13 +248,19 @@ func testOpen(t *testing.T) { url: trinoConnectionString(ip, port, "x-migrations-table=custom_migrations"), }, { - name: "URL with custom schema", + name: "URL with custom schema", url: trinoConnectionString(ip, port, "x-migrations-schema=default"), }, { name: "URL with timeouts", url: trinoConnectionString(ip, port, "x-statement-timeout=5000"), }, + { + name: "trino:// scheme with SSL disabled (HTTP)", + url: trinoConnectionStringWithScheme("trino", ip, port, "ssl=false"), + }, + // Note: HTTPS tests are skipped because the test container only supports HTTP + // The scheme conversion logic is tested separately in TestTrinoSchemeConversion } for _, tc := range testCases { @@ -276,6 +292,66 @@ func testOpen(t *testing.T) { }) } +func TestTrinoSchemeConversion(t *testing.T) { + // Test scheme conversion without requiring a live Trino instance + testCases := []struct { + name string + inputURL string + expectedScheme string + }{ + { + name: "trino:// with ssl=false should become http://", + inputURL: "trino://user@localhost:8080?ssl=false&catalog=memory&schema=default", + expectedScheme: "http", + }, + { + name: "trino:// with ssl=true should become https://", + inputURL: "trino://user@localhost:8080?ssl=true&catalog=memory&schema=default", + expectedScheme: "https", + }, + { + name: "trino:// without ssl parameter should default to https://", + inputURL: "trino://user@localhost:8080?catalog=memory&schema=default", + expectedScheme: "https", + }, + { + name: "http:// should remain http://", + inputURL: "http://user@localhost:8080?catalog=memory&schema=default", + expectedScheme: "http", + }, + { + name: "https:// should remain https://", + inputURL: "https://user@localhost:8080?catalog=memory&schema=default", + expectedScheme: "https", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // We'll simulate the URL parsing and scheme conversion logic + purl, err := url.Parse(tc.inputURL) + if err != nil { + t.Fatal(err) + } + + // Apply the same logic as in the Open function + q := migrate.FilterCustomQuery(purl) + if q.Scheme == "trino" { + ssl := purl.Query().Get("ssl") + if ssl == "" || ssl == "true" { + q.Scheme = "https" + } else { + q.Scheme = "http" + } + } + + if q.Scheme != tc.expectedScheme { + t.Errorf("Expected scheme %s, got %s for URL %s", tc.expectedScheme, q.Scheme, tc.inputURL) + } + }) + } +} + func TestTrinoLockConcurrency(t *testing.T) { dktesting.ParallelTest(t, specs, func(t *testing.T, c dktest.ContainerInfo) { ip, port, err := c.FirstPort() From 7ddf9530c6c4c7a81409d4c49ad31e55c59fdc66 Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Sat, 30 Aug 2025 16:47:18 +0200 Subject: [PATCH 07/11] Add Trino documentation: include connection string details and URL query parameters in README.md --- README.md | 1 + database/trino/README.md | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 database/trino/README.md diff --git a/README.md b/README.md index 9b5b4b69e..3948a3fc4 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Database drivers run migrations. [Add a new database?](database/driver.go) * [Firebird](database/firebird) * [MS SQL Server](database/sqlserver) * [rqlite](database/rqlite) +* [Trino](database/trino) ### Database URLs diff --git a/database/trino/README.md b/database/trino/README.md new file mode 100644 index 000000000..885759468 --- /dev/null +++ b/database/trino/README.md @@ -0,0 +1,27 @@ +# Trino + +The Trino driver supports schema migrations for synchronizing databases connected via Trino, including data sources like Iceberg, Parquet, and S3. It is designed to handle schema changes, but its capabilities depend on the Trino configuration. + +## Connection String + +The connection string for Trino follows the format: + +`trino://{user}@{host}:{port}?catalog={catalog}&schema={schema}&ssl=true` + +### URL Query Parameters + +| Parameter | Description | +|---|---| +| `catalog` | The name of the catalog to connect to. This catalog must already exist. | +| `schema` | The name of the schema to use. This schema must already exist within the specified catalog. | +| `ssl` | A boolean value (`true` or `false`) to enable or disable SSL. If not specified, it defaults to `true` (HTTPS). | +| `x-migrations-table` | The name of the migrations table. Defaults to `schema_migrations`. | +| `x-migrations-catalog`| The catalog where the migrations table is located. If not specified, the current catalog is used. | +| `x-migrations-schema` | The schema where the migrations table is located. If not specified, the current schema is used. | +| `x-statement-timeout` | The statement timeout in milliseconds. | + +### Notes + +- **Pre-existing Catalog and Schema**: The catalog and schema specified in the connection string must be created in Trino beforehand. The driver does not create them automatically. +- **Schema Synchronization**: The primary purpose of this driver is to synchronize schemas across different databases connected through Trino. It is particularly useful for managing schema evolution in data lakes where data is stored in formats like Iceberg, Parquet, or on S3. +- **Schema Changes**: Support for schema changes (e.g., `ALTER TABLE`) is dependent on the underlying connector and data source configuration in Trino. \ No newline at end of file From e7f75746dd416879544903bc5996df7e9c3ab11d Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Sun, 31 Aug 2025 00:19:06 +0200 Subject: [PATCH 08/11] fix: update snowflake go driver for aws package compatbility --- go.mod | 81 ++++++++++++------------ go.sum | 196 +++++++++++++++++++++++---------------------------------- 2 files changed, 120 insertions(+), 157 deletions(-) diff --git a/go.mod b/go.mod index c111f5099..774fe8580 100644 --- a/go.mod +++ b/go.mod @@ -30,27 +30,40 @@ require ( github.com/mutecomm/go-sqlcipher/v4 v4.4.0 github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8 github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba - github.com/snowflakedb/gosnowflake v1.6.19 + github.com/snowflakedb/gosnowflake v1.16.0 github.com/stretchr/testify v1.10.0 + github.com/trinodb/trino-go-client v0.328.0 github.com/xanzy/go-gitlab v0.15.0 go.mongodb.org/mongo-driver v1.7.5 golang.org/x/oauth2 v0.27.0 - golang.org/x/tools v0.24.0 + golang.org/x/tools v0.29.0 google.golang.org/api v0.169.0 modernc.org/ql v1.0.0 - modernc.org/sqlite v1.18.1 + modernc.org/sqlite v1.29.6 ) require ( cel.dev/expr v0.16.0 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect + github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect + github.com/apache/arrow-go/v18 v18.0.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.29.12 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.25.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.5.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang-jwt/jwt/v5 v5.2.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect @@ -61,8 +74,9 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/sys/sequential v0.6.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/ncruces/go-strftime v0.1.9 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/stretchr/objx v0.5.2 // indirect @@ -72,9 +86,9 @@ require ( go.opentelemetry.io/otel v1.37.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect go.opentelemetry.io/otel/metric v1.37.0 // indirect - go.opentelemetry.io/otel/sdk v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.37.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect + modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect ) require ( @@ -83,7 +97,7 @@ require ( cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/longrunning v0.5.5 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect + github.com/99designs/keyring v1.2.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 // indirect @@ -93,13 +107,10 @@ require ( github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/andybalholm/brotli v1.0.4 // indirect - github.com/apache/arrow/go/v10 v10.0.1 // indirect - github.com/apache/thrift v0.16.0 // indirect github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.65 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect @@ -114,17 +125,16 @@ require ( github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 // indirect github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 // indirect github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect + github.com/danieljoos/wincred v1.2.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 // indirect github.com/envoyproxy/go-control-plane v0.13.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect - github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect - github.com/gabriel-vasile/mimetype v1.4.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.7 // indirect github.com/go-stack/stack v1.8.0 // indirect - github.com/goccy/go-json v0.9.11 // indirect + github.com/goccy/go-json v0.10.4 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect @@ -133,7 +143,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/flatbuffers v2.0.8+incompatible // indirect + github.com/google/flatbuffers v24.12.23+incompatible // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect @@ -153,14 +163,10 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/k0kubun/pp v2.3.0+incompatible // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect - github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/klauspost/asmfmt v1.3.2 // indirect github.com/klauspost/compress v1.18.0 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect - github.com/mattn/go-colorable v0.1.6 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect - github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect + github.com/klauspost/cpuid/v2 v2.2.9 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect @@ -169,15 +175,14 @@ require ( github.com/onsi/gomega v1.15.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/pierrec/lz4/v4 v4.1.16 // indirect + github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rqlite/gorqlite v0.0.0-20230708021416-2acd02b70b79 github.com/shopspring/decimal v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/trinodb/trino-go-client v0.328.0 github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.1 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect @@ -186,38 +191,34 @@ require ( gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.36.0 // indirect - golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 // indirect - golang.org/x/mod v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.38.0 // indirect golang.org/x/sync v0.12.0 // indirect golang.org/x/sys v0.31.0 // indirect golang.org/x/term v0.30.0 // indirect golang.org/x/text v0.23.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/uint128 v1.2.0 // indirect modernc.org/b v1.0.0 // indirect - modernc.org/cc/v3 v3.36.3 // indirect - modernc.org/ccgo/v3 v3.16.9 // indirect modernc.org/db v1.0.0 // indirect modernc.org/file v1.0.0 // indirect - modernc.org/fileutil v1.0.0 // indirect + modernc.org/fileutil v1.3.0 // indirect modernc.org/golex v1.0.0 // indirect modernc.org/internal v1.0.0 // indirect - modernc.org/libc v1.17.1 // indirect + modernc.org/libc v1.41.0 // indirect modernc.org/lldb v1.0.0 // indirect - modernc.org/mathutil v1.5.0 // indirect - modernc.org/memory v1.2.1 // indirect - modernc.org/opt v0.1.3 // indirect + modernc.org/mathutil v1.6.0 // indirect + modernc.org/memory v1.7.2 // indirect modernc.org/sortutil v1.1.0 // indirect - modernc.org/strutil v1.1.3 // indirect - modernc.org/token v1.0.0 // indirect + modernc.org/strutil v1.2.0 // indirect + modernc.org/token v1.1.0 // indirect modernc.org/zappy v1.0.0 // indirect ) diff --git a/go.sum b/go.sum index fadabc0c7..877270820 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= @@ -62,6 +62,8 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 h1:oPdPEZFSbl7oSPEAIPMPBMUmiL+mqgzBJwM/9qYcwNg= github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1/go.mod h1:4qFor3D/HDsvBME35Xy9rwW9DecL+M2sNw1ybjPtwA0= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/clickhouse-go v1.4.3 h1:iAFMa2UrQdR5bHJ2/yaSLffZkxpcOYQMCUuKeNXGdqc= github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= @@ -75,68 +77,50 @@ 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/ahmetb/dlog v0.0.0-20170105205344-4fb5f8204f26 h1:3YVZUqkoev4mL+aCwVOSWV4M7pN+NURHL38Z2zq5JKA= github.com/ahmetb/dlog v0.0.0-20170105205344-4fb5f8204f26/go.mod h1:ymXt5bw5uSNu4jveerFxE0vNYxF8ncqbptntMaFMg3k= -github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/apache/arrow/go/v10 v10.0.1 h1:n9dERvixoC/1JjDmBcs9FPaEryoANa2sCgVFo6ez9cI= -github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= -github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= +github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= +github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= +github.com/apache/arrow-go/v18 v18.0.0 h1:1dBDaSbH3LtulTyOVYaBCHO3yVRwjV+TZaqn3g6V7ZM= +github.com/apache/arrow-go/v18 v18.0.0/go.mod h1:t6+cWRSmKgdQ6HsxisQjok+jBpKGhRDiqcf3p0p/F+A= +github.com/apache/thrift v0.21.0 h1:tdPmh/ptjE1IJnhbhrcl2++TauVjy242rkV/UzJChnE= +github.com/apache/thrift v0.21.0/go.mod h1:W1H8aR/QRtYNvrPeFXBtobyRkd0/YVhTc6i07XIAgDw= github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk= github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= -github.com/aws/aws-sdk-go-v2 v1.16.16/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k= github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.8/go.mod h1:JTnlBSot91steJeti4ryyu/tLd4Sk84O5W22L7O2EQU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= -github.com/aws/aws-sdk-go-v2/config v1.17.7/go.mod h1:dN2gja/QXxFF15hQreyrqYhLBaQo1d9ZKe/v/uplQoI= github.com/aws/aws-sdk-go-v2/config v1.29.12 h1:Y/2a+jLPrPbHpFkpAAYkVEtJmxORlXoo5k2g1fa2sUo= github.com/aws/aws-sdk-go-v2/config v1.29.12/go.mod h1:xse1YTjmORlb/6fhkWi8qJh3cvZi4JoVNhc+NbJt4kI= -github.com/aws/aws-sdk-go-v2/credentials v1.12.20/go.mod h1:UKY5HyIux08bbNA7Blv4PcXQ8cTkGh7ghHMFklaviR4= github.com/aws/aws-sdk-go-v2/credentials v1.17.65 h1:q+nV2yYegofO/SUXruT+pn4KxkxmaQ++1B/QedcKBFM= github.com/aws/aws-sdk-go-v2/credentials v1.17.65/go.mod h1:4zyjAuGOdikpNYiSGpsGz8hLGmUzlY8pc8r9QQ/RXYQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17/go.mod h1:yIkQcCDYNsZfXpd5UX2Cy+sWA1jPgIhGTw9cOBzfVnQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33 h1:fAoVmNGhir6BR+RU0/EI+6+D7abM+MCwWf8v4ip5jNI= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33/go.mod h1:84XgODVR8uRhmOnUkKGUZKqIMxmjmLOR8Uyp7G/TPwc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23/go.mod h1:2DFxAQ9pfIRy0imBCJv+vZ2X6RKxves6fbnEuSry6b4= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 h1:7Zwtt/lP3KNRkeZre7soMELMGNoBrutx8nobg1jKWmo= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15/go.mod h1:436h2adoHb57yd+8W+gYPrrA9U/R/SuAuOO42Ushzhw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17/go.mod h1:pRwaTYCJemADaqCbUAxltMoHKata7hmB5PjEXeu0kfg= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24/go.mod h1:jULHjqqjDlbyTa7pfM7WICATnOv+iOhjletM3N0Xbu8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.14/go.mod h1:AyGgqiKv9ECM6IZeNQtdT8NnMvUb3/2wokeq2Fgryto= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcuz+RjeziUtNJackkM= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9/go.mod h1:a9j48l6yL5XINLHLcOKInjdvknN+vWqPBxqeIDw7ktw= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.18/go.mod h1:NS55eQ4YixUJPTC+INxi2/jCqe1y2Uw3rnh9wEOVJxY= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 h1:lguz0bmOoGzozP9XfRJR1QIayEYo+2vP/No3OfLF0pU= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17/go.mod h1:4nYOrY41Lrbk2170/BGkcJKBhws9Pfn8MG3aGqjjeFI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17/go.mod h1:YqMdV+gEKCQ59NrB7rzrJdALeBIsYiVi8Inj3+KcqHI= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= -github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11/go.mod h1:fmgDANqTUCxciViKl9hb/zD5LFbvPINFRgWhDbR+vZo= github.com/aws/aws-sdk-go-v2/service/s3 v1.79.0 h1:OIw2nryEApESTYI5deCZGcq4Gvz8DBAt4tJlNyg3v5o= github.com/aws/aws-sdk-go-v2/service/s3 v1.79.0/go.mod h1:U5SNqwhXB3Xe6F47kXvWihPl/ilGaEDe8HD/50Z9wxc= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.23/go.mod h1:/w0eg9IhFGjGyyncHIQrXtU8wvNsTJOP0R6PPj0wf80= github.com/aws/aws-sdk-go-v2/service/sso v1.25.2 h1:pdgODsAhGo4dvzC3JAG5Ce0PX8kWXrTZGx+jxADD+5E= github.com/aws/aws-sdk-go-v2/service/sso v1.25.2/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5/go.mod h1:csZuQY65DAdFBt1oIjO5hhBR49kQqop4+lcuCjf2arA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0 h1:90uX0veLKcdHVfvxhkWUQSCi5VabtwMLFutYiRke4oo= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.19/go.mod h1:h4J3oPZQbxLhzGnk+j9dfYHi5qIOVJ5kczZd658/ydM= github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 h1:PZV5W8yk4OtH1JAuhV2PXwwO9v5G5Aoj+eMCn4T+1Kc= github.com/aws/aws-sdk-go-v2/service/sts v1.33.17/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= -github.com/aws/smithy-go v1.13.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY= @@ -177,8 +161,8 @@ github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369 h1:XNT/Zf5l++1Pyg08/HV04ppB0gKxAqtZQBRYiYrUuYk= github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= +github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -197,8 +181,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 h1:aaQcKT9WumO6JEJcRyTqFVq4XUZiUcKR2/GI31TOcz8= @@ -213,8 +197,6 @@ github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6 github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= -github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -222,8 +204,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsouza/fake-gcs-server v1.17.0 h1:OeH75kBZcZa3ZE+zz/mFdJ2btt9FgqfjI7gIh9+5fvk= github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= -github.com/gabriel-vasile/mimetype v1.4.1 h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q= -github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= +github.com/gabriel-vasile/mimetype v1.4.7 h1:SKFKl7kD0RiPdbht0s7hFtjl489WcQ1VyPW8ZzUMYCA= +github.com/gabriel-vasile/mimetype v1.4.7/go.mod h1:GDlAgAyIRT27BhFl53XNAFtfjzOkLaF35JdEG0P7LtU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -241,8 +223,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobuffalo/here v0.6.0 h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI= github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM= +github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gocql/gocql v0.0.0-20210515062232-b7ef815b4556 h1:N/MD/sr6o61X+iZBAT2qEUF023s4KbA8RWfKzl0L6MQ= github.com/gocql/gocql v0.0.0-20210515062232-b7ef815b4556/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= @@ -252,13 +234,12 @@ github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPh github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= @@ -273,7 +254,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -296,8 +276,8 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v24.12.23+incompatible h1:ubBKR94NR4pXUCY/MUsRVzd9umNW7ht7EG9hHfS9FX8= +github.com/google/flatbuffers v24.12.23+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -307,7 +287,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-github/v39 v39.2.0 h1:rNNM311XtPOz5rDdsJXAp2o8F67X9FnROXTvto3aSnQ= @@ -322,6 +301,8 @@ github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdf github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -363,6 +344,8 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= @@ -464,8 +447,6 @@ github.com/k0kubun/pp v2.3.0+incompatible h1:EKhKbi34VQDWJtq+zpsKSEhkHHs9w2P8Izb github.com/k0kubun/pp v2.3.0+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= @@ -473,8 +454,8 @@ github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= +github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -502,16 +483,18 @@ github.com/markbates/pkger v0.15.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= @@ -533,8 +516,9 @@ github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7z github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= @@ -548,6 +532,8 @@ github.com/mutecomm/go-sqlcipher/v4 v4.4.0 h1:sV1tWCWGAVlPhNGT95Q+z/txFxuhAYWwHD github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8 h1:P48LjvUQpTReR3TQRbxSeSBsMXzfK0uol7eRcr7VBYQ= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba h1:fhFP5RliM2HW/8XdcO5QngSfFli9GcRIpMXvypTQt6E= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -575,8 +561,8 @@ github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4S github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4/v4 v4.1.16 h1:kQPfno+wyx6C5572ABwV+Uo3pDFzQ7yhyGchSyRda0c= -github.com/pierrec/lz4/v4 v4.1.16/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU= +github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= @@ -589,8 +575,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= @@ -608,8 +594,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/snowflakedb/gosnowflake v1.6.19 h1:KSHXrQ5o7uso25hNIzi/RObXtnSGkFgie91X82KcvMY= -github.com/snowflakedb/gosnowflake v1.6.19/go.mod h1:FM1+PWUdwB9udFDsXdfD58NONC0m+MlOSmQRvimobSM= +github.com/snowflakedb/gosnowflake v1.16.0 h1:EfrAPVjWcBHzr2oiwEUz0dwFUiFlwftj9/YB6NktY9Q= +github.com/snowflakedb/gosnowflake v1.16.0/go.mod h1:XJ2z3SckeW+juZzjuYNcAJM7i4ZgIZNmepFm5foO3Vc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -628,8 +614,9 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/trinodb/trino-go-client v0.328.0 h1:X6hrGGysA3nvyVcz8kJbBS98srLNTNsnNYwRkMC1atA= github.com/trinodb/trino-go-client v0.328.0/go.mod h1:e/nck9W6hy+9bbyZEpXKFlNsufn3lQGpUgDL1d5f1FI= github.com/xanzy/go-gitlab v0.15.0 h1:rWtwKTgEnXyNUGrOArN7yyc3THRkpYcKXIXia9abywQ= @@ -681,8 +668,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= -go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= -go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -728,8 +715,8 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 h1:pVgRXcIictcr+lBQIFeiwuwtDIs4eL21OuM9nyAADmo= -golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -748,8 +735,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -777,7 +764,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -834,8 +820,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -843,6 +827,7 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -895,22 +880,21 @@ golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= +gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -955,8 +939,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -968,8 +952,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1006,61 +990,39 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/b v1.0.0 h1:vpvqeyp17ddcQWF29Czawql4lDdABCDRbXRAS4+aF2o= modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg= -modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.3 h1:uISP3F66UlixxWEcKuIWERa4TwrZENHSL8tWxZz8bHg= -modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/ccgo/v3 v3.16.9 h1:AXquSwg7GuMk11pIdw7fmO1Y/ybgazVkMhsZWCV0mHM= -modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= -modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/db v1.0.0 h1:2c6NdCfaLnshSvY7OU09cyAY0gYXUZj4lmg5ItHyucg= modernc.org/db v1.0.0/go.mod h1:kYD/cO29L/29RM0hXYl4i3+Q5VojL31kTUVpVJDw0s8= modernc.org/file v1.0.0 h1:9/PdvjVxd5+LcWUQIfapAWRGOkDLK90rloa8s/au06A= modernc.org/file v1.0.0/go.mod h1:uqEokAEn1u6e+J45e54dsEA/pw4o7zLrA2GwyntZzjw= -modernc.org/fileutil v1.0.0 h1:Z1AFLZwl6BO8A5NldQg/xTSjGLetp+1Ubvl4alfGx8w= -modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= +modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= +modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/internal v1.0.0 h1:XMDsFDcBDsibbBnHB2xzljZ+B1yrOVLEFkKL2u15Glw= modernc.org/internal v1.0.0/go.mod h1:VUD/+JAkhCpvkUitlEOnhpVxCgsBI90oTzSCRcqQVSM= -modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= -modernc.org/libc v1.17.1 h1:Q8/Cpi36V/QBfuQaFVeisEBs3WqoGAJprZzmf7TfEYI= -modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= +modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= +modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY= modernc.org/lldb v1.0.0 h1:6vjDJxQEfhlOLwl4bhpwIz00uyFK4EmSYcbwqwbynsc= modernc.org/lldb v1.0.0/go.mod h1:jcRvJGWfCGodDZz8BPwiKMJxGJngQ/5DrRapkQnLob8= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.1 h1:dkRh86wgmq/bJu2cAS2oqBCz/KsMZU7TUM4CibQ7eBs= -modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= +modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= modernc.org/ql v1.0.0 h1:bIQ/trWNVjQPlinI6jdOQsi195SIturGo3mp5hsDqVU= modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/sortutil v1.1.0 h1:oP3U4uM+NT/qBQcbg/K2iqAX0Nx7B1b6YZtq3Gk/PjM= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= -modernc.org/sqlite v1.18.1 h1:ko32eKt3jf7eqIkCgPAeHMBXw3riNSLhl2f3loEF7o8= -modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.13.1 h1:npxzTwFTZYM8ghWicVIX1cRWzj7Nd8i6AqqX2p+IYao= -modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= -modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= -modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM= -modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= +modernc.org/sqlite v1.29.6 h1:0lOXGrycJPptfHDuohfYgNqoe4hu+gYuN/pKgY5XjS4= +modernc.org/sqlite v1.29.6/go.mod h1:S02dvcmm7TnTRvGhv8IGYyLnIt7AS2KPaB1F/71p75U= +modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= +modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/zappy v1.0.0 h1:dPVaP+3ueIUv4guk8PuZ2wiUGcJ1WUVvIheeSSTD0yk= modernc.org/zappy v1.0.0/go.mod h1:hHe+oGahLVII/aTTyWK/b53VDHMAGCBYYeZ9sn83HC4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 0118f5b16bb9bcb5a47fba17f6ae0ea519ebfa0c Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Sun, 31 Aug 2025 00:26:45 +0200 Subject: [PATCH 09/11] refactor: use constant for Trino driver name and clean up code formatting --- database/trino/trino.go | 10 ++++++---- database/trino/trino_test.go | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/database/trino/trino.go b/database/trino/trino.go index 0a3c019c5..1cbafcb7f 100644 --- a/database/trino/trino.go +++ b/database/trino/trino.go @@ -21,6 +21,8 @@ var ( ErrNilConfig = fmt.Errorf("no config") ) +const TrinoDriverName = "trino" + type Config struct { MigrationsTable string MigrationsSchema string @@ -29,7 +31,7 @@ type Config struct { } func init() { - database.Register("trino", &Trino{}) + database.Register(TrinoDriverName, &Trino{}) } func WithInstance(conn *sql.DB, config *Config) (database.Driver, error) { @@ -67,9 +69,9 @@ func (t *Trino) Open(dsn string) (database.Driver, error) { // Filter custom parameters and handle scheme conversion q := migrate.FilterCustomQuery(purl) - + // Convert trino:// scheme to http:// or https:// based on ssl parameter - if q.Scheme == "trino" { + if q.Scheme == TrinoDriverName { // Check ssl parameter (default is true) ssl := purl.Query().Get("ssl") if ssl == "" || ssl == "true" { @@ -86,7 +88,7 @@ func (t *Trino) Open(dsn string) (database.Driver, error) { } q.RawQuery = query.Encode() - conn, err := sql.Open("trino", q.String()) + conn, err := sql.Open(TrinoDriverName, q.String()) if err != nil { return nil, err } diff --git a/database/trino/trino_test.go b/database/trino/trino_test.go index 8fa416b44..7d690700b 100644 --- a/database/trino/trino_test.go +++ b/database/trino/trino_test.go @@ -97,7 +97,7 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool { time.Sleep(2 * time.Second) continue } - + // Test a simple query to ensure Trino is fully ready var result int if err = db.QueryRowContext(readyCtx, "SELECT 1").Scan(&result); err != nil { @@ -105,7 +105,7 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool { time.Sleep(2 * time.Second) continue } - + log.Printf("trino ready after %d attempts", i+1) // Give Trino a moment to stabilize before tests start time.Sleep(3 * time.Second) @@ -333,7 +333,7 @@ func TestTrinoSchemeConversion(t *testing.T) { if err != nil { t.Fatal(err) } - + // Apply the same logic as in the Open function q := migrate.FilterCustomQuery(purl) if q.Scheme == "trino" { @@ -344,7 +344,7 @@ func TestTrinoSchemeConversion(t *testing.T) { q.Scheme = "http" } } - + if q.Scheme != tc.expectedScheme { t.Errorf("Expected scheme %s, got %s for URL %s", tc.expectedScheme, q.Scheme, tc.inputURL) } @@ -367,7 +367,7 @@ func TestTrinoLockConcurrency(t *testing.T) { if err != nil { t.Fatal(err) } - defer d.Close() + defer func() { _ = d.Close() }() // Test basic locking functionality if err := d.Lock(); err != nil { From 388ada045d727b7405ce797481a883ecbc951941 Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Sun, 31 Aug 2025 00:32:11 +0200 Subject: [PATCH 10/11] refactor: remove unused mustRun function and clean up whitespace in unit tests --- database/trino/trino_test.go | 8 -------- database/trino/unit_test.go | 10 +++++----- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/database/trino/trino_test.go b/database/trino/trino_test.go index 7d690700b..ce8ad9430 100644 --- a/database/trino/trino_test.go +++ b/database/trino/trino_test.go @@ -115,14 +115,6 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool { return false } -func mustRun(t *testing.T, d database.Driver, statements []string) { - for _, statement := range statements { - if err := d.Run(strings.NewReader(statement)); err != nil { - t.Fatal(err) - } - } -} - func Test(t *testing.T) { t.Run("test", test) t.Run("testMigrate", testMigrate) diff --git a/database/trino/unit_test.go b/database/trino/unit_test.go index 5e63addb9..457552a1e 100644 --- a/database/trino/unit_test.go +++ b/database/trino/unit_test.go @@ -8,16 +8,16 @@ import ( func TestConfig_Defaults(t *testing.T) { config := &Config{} - + // Test default values get set properly if config.MigrationsTable != "" { t.Errorf("Expected empty MigrationsTable, got %s", config.MigrationsTable) } - + if config.MigrationsSchema != "" { t.Errorf("Expected empty MigrationsSchema, got %s", config.MigrationsSchema) } - + if config.MigrationsCatalog != "" { t.Errorf("Expected empty MigrationsCatalog, got %s", config.MigrationsCatalog) } @@ -45,7 +45,7 @@ func TestTrino_Registration(t *testing.T) { break } } - + if !found { t.Error("Trino driver should be registered") } @@ -54,4 +54,4 @@ func TestTrino_Registration(t *testing.T) { func TestTrino_DriverInterface(t *testing.T) { // Test that Trino implements the database.Driver interface var _ database.Driver = &Trino{} -} \ No newline at end of file +} From eace67d67cd69a087e3b4019abd44d59046cfd71 Mon Sep 17 00:00:00 2001 From: Roberto Serafin Date: Mon, 1 Sep 2025 13:35:01 +0200 Subject: [PATCH 11/11] test: increase timeout for test execution and add cleanup for Trino container specs --- Makefile | 2 +- database/trino/trino_test.go | 38 +++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b1891a454..7b9d4b3e6 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ test-short: test: @-rm -r $(COVERAGE_DIR) @mkdir $(COVERAGE_DIR) - make test-with-flags TEST_FLAGS='-v -race -covermode atomic -coverprofile $$(COVERAGE_DIR)/combined.txt -bench=. -benchmem -timeout 20m' + make test-with-flags TEST_FLAGS='-v -race -covermode atomic -coverprofile $$(COVERAGE_DIR)/combined.txt -bench=. -benchmem -timeout 30m' test-with-flags: diff --git a/database/trino/trino_test.go b/database/trino/trino_test.go index ce8ad9430..0e9155575 100644 --- a/database/trino/trino_test.go +++ b/database/trino/trino_test.go @@ -117,9 +117,45 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool { func Test(t *testing.T) { t.Run("test", test) + + t.Cleanup(func() { + for _, spec := range specs { + t.Log("Cleaning up ", spec.ImageName) + if err := spec.Cleanup(); err != nil { + t.Error("Error removing ", spec.ImageName, "error:", err) + } + } + }) +} + +func TestOpen(t *testing.T) { + t.Run("testOpen", testOpen) + + t.Cleanup(func() { + for _, spec := range specs { + t.Log("Cleaning up ", spec.ImageName) + if err := spec.Cleanup(); err != nil { + t.Error("Error removing ", spec.ImageName, "error:", err) + } + } + }) +} + +func TestMigrate(t *testing.T) { t.Run("testMigrate", testMigrate) + + t.Cleanup(func() { + for _, spec := range specs { + t.Log("Cleaning up ", spec.ImageName) + if err := spec.Cleanup(); err != nil { + t.Error("Error removing ", spec.ImageName, "error:", err) + } + } + }) +} + +func TestWithInstance(t *testing.T) { t.Run("testWithInstance", testWithInstance) - t.Run("testOpen", testOpen) t.Cleanup(func() { for _, spec := range specs {