{"record":{"id":"c5b58f77e6fa9325","repo":"vitessio/vitess","slug":"not-a-valid-uuid-s","errorCode":null,"errorMessage":"Not a valid UUID: %s","messagePattern":"Not a valid UUID: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/schemamanager/tablet_executor.go","lineNumber":94,"sourceCode":"\t}\n}\n\n// SetDDLStrategy applies ddl_strategy from command line flags\nfunc (exec *TabletExecutor) SetDDLStrategy(ddlStrategy string) error {\n\tddlStrategySetting, err := schema.ParseDDLStrategy(ddlStrategy)\n\tif err != nil {\n\t\treturn err\n\t}\n\texec.ddlStrategySetting = ddlStrategySetting\n\treturn nil\n}\n\n// SetUUIDList sets a (possibly empty) list of provided UUIDs for schema migrations\nfunc (exec *TabletExecutor) SetUUIDList(uuids []string) error {\n\tuuidsMap := map[string]bool{}\n\tfor _, uuid := range uuids {\n\t\tif !schema.IsOnlineDDLUUID(uuid) {\n\t\t\treturn fmt.Errorf(\"Not a valid UUID: %s\", uuid)\n\t\t}\n\t\tuuidsMap[uuid] = true\n\t}\n\tif len(uuidsMap) != len(uuids) {\n\t\treturn errors.New(\"UUID values must be unique\")\n\t}\n\texec.uuids = uuids\n\treturn nil\n}\n\n// hasProvidedUUIDs returns true when UUIDs were provided\nfunc (exec *TabletExecutor) hasProvidedUUIDs() bool {\n\treturn len(exec.uuids) != 0\n}\n\n// Open opens a connection to the primary for every shard.\nfunc (exec *TabletExecutor) Open(ctx context.Context, keyspace string) error {\n\tif !exec.isClosed {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/schemamanager/tablet_executor.go#L76-L112","documentation":"TabletExecutor.SetUUIDList validates each provided migration UUID with schema.IsOnlineDDLUUID before accepting them. Any entry that is not a valid Online DDL UUID causes this error. It fires before the duplicate check, so the invalid UUID is the first one failing validation.","triggerScenarios":"Calling SetUUIDList with a string that is not a valid UUID (e.g. empty string, a migration ID, a truncated or malformed UUID).","commonSituations":"Passing shard-targeted migration identifiers instead of UUIDs; copy/paste errors dropping characters; shell quoting issues mangling the UUID; using a human-readable migration label from --uuid-prefix flows.","solutions":["Verify each entry is a full valid UUID as reported by vtctldclient GetSchemaMigrations","List existing migrations with vtctldclient GetSchemaMigrations --keyspace <ks> and copy the exact UUIDs","Check shell quoting/splitting so UUIDs are not truncated or corrupted before the call"],"exampleFix":"// before\nexec.SetUUIDList([]string{\"4b5c1e2a\"}) // truncated\n// after\nexec.SetUUIDList([]string{\"f7d29e6a1c3b4d5e8f9012345678abcd\"})","handlingStrategy":"validation","validationCode":"for _, u := range uuids {\n  if !schema.IsOnlineDDLUUID(u) {\n    return fmt.Errorf(\"%q is not a valid Online DDL UUID\", u)\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy UUIDs programmatically from GetSchemaMigrations output","Beware shell quoting/truncation of UUIDs in scripts","Deduplicate UUIDs before calling SetUUIDList (a separate uniqueness error exists)"],"tags":["schemamanager","validation","uuid","online-ddl"],"backgroundTag":"invalid-uuid","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}