{"record":{"id":"f0aa14c6de55a356","repo":"vitessio/vitess","slug":"failed-to-process-config-options-v","errorCode":null,"errorMessage":"failed to process config options: %v","messagePattern":"failed to process config options: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vttablet/tabletmanager/vreplication/controller.go","lineNumber":111,"sourceCode":"\n// workflowTypeName returns the human-readable name for the workflow type\n// (e.g. \"OnlineDDL\", \"Reshard\", \"MoveTables\").\nfunc (ct *controller) workflowTypeName() string {\n\treturn binlogdatapb.VReplicationWorkflowType(ct.workflowType).String()\n}\n\nfunc processWorkflowOptions(params map[string]string) (*vttablet.VReplicationConfig, error) {\n\toptions, ok := params[\"options\"]\n\tif !ok {\n\t\toptions = \"{}\"\n\t}\n\tvar workflowOptions vtctldata.WorkflowOptions\n\tif err := json.Unmarshal([]byte(options), &workflowOptions); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse options column: %v\", err)\n\t}\n\tworkflowConfig, err := vttablet.NewVReplicationConfig(workflowOptions.Config)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to process config options: %v\", err)\n\t}\n\treturn workflowConfig, nil\n}\n\n// newController creates a new controller. Unless a stream is explicitly 'Stopped',\n// this function launches a goroutine to perform continuous vreplication.\nfunc newController(ctx context.Context, params map[string]string, dbClientFactory func() binlogplayer.DBClient, mysqld mysqlctl.MysqlDaemon, ts *topo.Server, cell string, blpStats *binlogplayer.Stats, vre *Engine, tpo discovery.TabletPickerOptions) (*controller, error) {\n\tif blpStats == nil {\n\t\tblpStats = binlogplayer.NewStats()\n\t}\n\tworkflowConfig, err := processWorkflowOptions(params)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttabletTypesStr := workflowConfig.TabletTypesStr\n\tct := &controller{\n\t\tvre:             vre,\n\t\tdbClientFactory: dbClientFactory,","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vttablet/tabletmanager/vreplication/controller.go#L93-L129","documentation":"After parsing the workflow options JSON, processWorkflowOptions passes options.Config to vttablet.NewVReplicationConfig. If the config blob is invalid (bad format, unknown fields, validation failure), the controller cannot be created and returns `failed to process config options: <err>`.","triggerScenarios":"The workflow's options JSON contains a `config` key whose value fails NewVReplicationConfig validation — e.g. invalid YAML/JSON config content, unsupported settings, or config referencing unknown parameters.","commonSituations":"Users enabling vreplication workflow configuration (e.g. throttler/copy-phase settings via WorkflowOptions.Config) with typos or unsupported fields; config format changed between Vitess versions so an old stored config no longer validates; partial config written by tooling.","solutions":["Read the `config` value in the workflow's options column and correct it against the VReplicationConfig schema for your Vitess version","Remove the `config` key (use `{}` or options without config) to fall back to defaults if custom config isn't required","Recreate the workflow with a valid config rather than editing stored state, if the config cannot be repaired in place","Check release notes for VReplicationConfig format changes if the workflow was created on an older Vitess"],"exampleFix":"// before\noptions = '{\"config\":\"enable_throttler: maybe\"}' // invalid config value\n// after\noptions = '{\"config\":\"enable_throttler: true\"}' // valid, or simply '{}':","handlingStrategy":"validation","validationCode":"// validate options.Config parses before storing the workflow\nvar wfOpts vtctldata.WorkflowOptions\nif err := json.Unmarshal([]byte(optionsCol), &wfOpts); err != nil { return err }\nif _, err := vttablet.NewVReplicationConfig(wfOpts.Config); err != nil {\n  return fmt.Errorf(\"workflow config invalid: %w\", err)\n}","typeGuard":"func hasValidConfig(optionsJSON string) bool {\n  var o vtctldata.WorkflowOptions\n  if json.Unmarshal([]byte(optionsJSON), &o) != nil { return false }\n  if o.Config == \"\" { return true }\n  _, err := vttablet.NewVReplicationConfig(o.Config)\n  return err == nil\n}","tryCatchPattern":"ct, err := newController(ctx, env, ...)\nif err != nil {\n  if strings.Contains(err.Error(), \"failed to process config options\") {\n    // fix or remove the `config` key in the workflow options, then retry\n  }\n  return err\n}","preventionTips":["Validate VReplicationConfig against your Vitess version's schema before storing it","Avoid hand-crafting config blobs; use supported tooling/flags","Review release notes for config format changes when upgrading","If unsure, omit `config` and use defaults"],"tags":["vreplication","config","configuration"],"backgroundTag":"vreplication-config-invalid","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}