Skip to content

UUID for test databases#10680

Open
stephanos wants to merge 1 commit into
mainfrom
stephanos/loadschema-fail
Open

UUID for test databases#10680
stephanos wants to merge 1 commit into
mainfrom
stephanos/loadschema-fail

Conversation

@stephanos

@stephanos stephanos commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What changed?

Use UUID for database names.

Why?

From https://github.com/temporalio/temporal/actions/runs/27384406387

panic: FATAL: LoadSchema [recovered, repanicked]
goroutine 928163 [running]:

testing.tRunner.func1.2({0x680fe20, 0xc06cafdb30})

/opt/hostedtoolcache/go/1.26.4/arm64/src/testing/testing.go:1974 +0x2b8

testing.tRunner.func1()

/opt/hostedtoolcache/go/1.26.4/arm64/src/testing/testing.go:1977 +0x460

panic({0x680fe20?, 0xc06cafdb30?})

/opt/hostedtoolcache/go/1.26.4/arm64/src/runtime/panic.go:860 +0x12c

go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x2, 0xc073c7d110, {0x7e042e0?, 0x33?, 0xc035698000?})

/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.1/zapcore/entry.go:196 +0xa8

go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc073c7d110, {0xc07be44680, 0x2, 0x2})

/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.1/zapcore/entry.go:272 +0x278

go.uber.org/zap.(*Logger).Panic(0xc03360c400, {0xc075e3bda0, 0x11}, {0xc07be44680, 0x2, 0x2})

/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.1/logger.go:285 +0x60

go.temporal.io/server/common/log.(*zapLogger).Panic(0xc0361fe750, {0xc075e3bda0, 0x11}, {0xc06cafdac0, 0x1, 0x1})

/home/runner/work/temporal/temporal/common/log/zap_logger.go:174 +0x1b4

go.temporal.io/server/common/testing/testlogger.(*TestLogger).Fatal(0xc0361fe5d0, {0x755ae1f, 0xa}, {0xc06cafdac0, 0x1, 0x1})

/home/runner/work/temporal/temporal/common/testing/testlogger/testlogger.go:506 +0x2c8

go.temporal.io/server/common/persistence/sql.(*TestCluster).LoadSchema(0xc0542a5ce0, {0xc074d4b680, 0x47})

/home/runner/work/temporal/temporal/common/persistence/sql/test_sql_persistence.go:206 +0x804

go.temporal.io/server/common/persistence/sql.(*TestCluster).SetupTestDatabase(0xc0542a5ce0)

/home/runner/work/temporal/temporal/common/persistence/sql/test_sql_persistence.go:84 +0x21c

go.temporal.io/server/common/persistence/persistence-tests.(*TestBase).Setup(0xc05af8d1e0, 0xc08d0b6040)

/home/runner/work/temporal/temporal/common/persistence/persistence-tests/persistence_test_base.go:206 +0x2b4

go.temporal.io/server/tests/testcore.newClusterWithPersistenceTestBaseFactory(0xc05dfe3208, 0xc05af8d040, {0x7

might indicate a potential database name conflict. It's not 100% clear but this doesn't hurt IMO.

@stephanos stephanos added the test-all-dbs Request PR checks to test all databases label Jun 12, 2026
@stephanos stephanos force-pushed the stephanos/loadschema-fail branch from 4b7c603 to 0be2890 Compare June 12, 2026 17:43
func GenerateRandomDBName() string {
uuidPart := strings.ReplaceAll(uuid.NewString(), "-", "")
// Keep generated DB names short enough for Cassandra keyspaces after XDC tests append cluster suffixes.
return "test_" + uuidPart[:24]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the main change

@stephanos stephanos marked this pull request as ready for review June 12, 2026 18:15
@stephanos stephanos requested review from a team as code owners June 12, 2026 18:15
@stephanos stephanos requested a review from spkane31 June 12, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-all-dbs Request PR checks to test all databases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant