{"record":{"id":"8099eb2bee4f566a","repo":"GoogleContainerTools/skaffold","slug":"marshalling-configuration-w-8099eb","errorCode":null,"errorMessage":"marshalling configuration: %w","messagePattern":"marshalling configuration: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/inspect/jobManifestPaths/modify.go","lineNumber":95,"sourceCode":"\t\t\tif jobManifestPath, ok := result.VerifyJobManifestPaths[configs[i].(*latest.SkaffoldConfig).Verify[j].Name]; ok {\n\t\t\t\tconfigs[i].(*latest.SkaffoldConfig).Verify[j].ExecutionMode.KubernetesClusterExecutionMode.JobManifestPath = jobManifestPath\n\t\t\t}\n\t\t}\n\n\t\tfor j := range configs[i].(*latest.SkaffoldConfig).CustomActions {\n\t\t\tif jobManifestPath, found := result.CustomActionJobManifestPaths[configs[i].(*latest.SkaffoldConfig).CustomActions[j].Name]; found {\n\t\t\t\tif configs[i].(*latest.SkaffoldConfig).CustomActions[j].ExecutionModeConfig.KubernetesClusterExecutionMode == nil {\n\t\t\t\t\tconfigs[i].(*latest.SkaffoldConfig).CustomActions[j].ExecutionModeConfig.KubernetesClusterExecutionMode = &latest.KubernetesClusterVerifier{}\n\t\t\t\t}\n\n\t\t\t\tconfigs[i].(*latest.SkaffoldConfig).CustomActions[j].ExecutionModeConfig.KubernetesClusterExecutionMode.JobManifestPath = jobManifestPath\n\t\t\t}\n\t\t}\n\t}\n\n\tbuf, err := yaml.MarshalWithSeparator(configs)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"marshalling configuration: %w\", err)\n\t}\n\tout.Write(buf)\n\n\treturn nil\n}\n","sourceCodeStart":77,"sourceCodeEnd":101,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/inspect/jobManifestPaths/modify.go#L77-L101","documentation":"The jobManifestPaths `Modify` command loads skaffold configs, modifies jobManifestPaths entries, and re-serializes them with yaml.MarshalWithSeparator to write to stdout. If marshaling fails, \"marshalling configuration: %w\" is returned. The command produced no output and the underlying marshal error is preserved.","triggerScenarios":"Running `skaffold inspect job-manifest-paths modify` when the resulting config structs cannot be marshaled (unsupported values, nil required fields).","commonSituations":"Schema mismatch between the skaffold.yaml version and the CLI's config structs; modifying configs with values the marshaller can't encode.","solutions":["Check the wrapped error to find the offending config field and correct skaffold.yaml.","Ensure the file's apiVersion matches a version supported by your skaffold CLI.","Use a matching skaffold version for the config schema you're editing."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := modifyJobManifestPaths(opts, out); err != nil {\n    if strings.Contains(err.Error(), \"marshalling configuration\") {\n        // configs were modified in memory but could not be serialized; report and exit\n    }\n}","preventionTips":["Keep apiVersion in skaffold.yaml supported by your CLI","Test config round-trips after schema-affecting edits","Capture stdout to a temp file and validate YAML before replacing the original"],"tags":["yaml","marshaling","cli-output"],"backgroundTag":"yaml-marshaling-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}