{"record":{"id":"cfdb2fc8fd0c06b4","repo":"hasura/graphql-engine","slug":"metadata-diff-for-config-d-not-supported","errorCode":null,"errorMessage":"metadata diff for config %d not supported","messagePattern":"metadata diff for config (.+?) not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/metadata_diff.go","lineNumber":127,"sourceCode":"\t)\n\n\treturn metadataDiffCmd\n}\n\nfunc (o *MetadataDiffOptions) Run() error {\n\tvar op errors.Op = \"commands.MetadataDiffOptions.Run\"\n\n\tif o.EC.Config.Version >= cli.V2 && o.EC.MetadataDir != \"\" {\n\t\terr := getMetadataModeHandler(o.EC.MetadataMode).Diff(o)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, err)\n\t\t}\n\n\t\treturn nil\n\t} else {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"metadata diff for config %d not supported\", o.EC.Config.Version),\n\t\t)\n\t}\n}\n\ntype DiffType string\n\nconst (\n\tDifftypeUnifiedJSON DiffType = \"unified-json\"\n\tDifftypeUnifiedYAML DiffType = \"unified-yaml\"\n\tDifftypeYAML        DiffType = \"yaml\"\n\tDifftypeJSON        DiffType = \"json\"\n)\n\nconst zeroDifferencesFound = \"zero differences found\"\n\ntype printGeneratedMetadataFileDiffOpts struct {\n\tprojectMetadataHandler *projectmetadata.Handler\n\t// actual directory paths to project directory","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/metadata_diff.go#L109-L145","documentation":"The metadata diff command only knows how to build metadata for specific project config versions; if o.EC.Config.Version is not one of the handled values, it falls through to this error. It indicates the project's config.yaml version is not supported by this CLI build's diff logic.","triggerScenarios":"Running `hasura metadata diff` in a project whose config.yaml has a Version the diff command does not handle (e.g. a v3 project with an older CLI that only diffs v1/v2 configs, or a newer config version than the CLI knows).","commonSituations":"Project created with a newer Hasura CLI then opened with an older one, manually bumped config version in config.yaml, or CI using a pinned outdated CLI image on a modern project.","solutions":["Update the CLI to a version matching your project (v3 projects need a recent CLI): hasura update-cli","Or set the config version in config.yaml to a version your CLI supports and re-export metadata to match","Verify with `hasura version` and compare against the project's Hasura server version"],"exampleFix":"# config.yaml (project needs v3)\nversion: 3\n# upgrade CLI instead of downgrading project:\n# hasura update-cli\n","handlingStrategy":"validation","validationCode":"# Shell: assert config version supported by this CLI\nV=$(grep -E '^version:' config.yaml | awk '{print $2}')\n[ \"$V\" = \"3\" ] || { echo \"config version $V not supported by this CLI\"; exit 1; }","typeGuard":"// Go\nfunc supportedConfigVersion(v config.Version) bool {\n  return v == config.V1 || v == config.V2 || v == config.V3\n}","tryCatchPattern":null,"preventionTips":["Keep CLI version in lockstep with project/server version","Don't hand-bump config.yaml versions"],"tags":["config-version","metadata-diff","version-mismatch"],"backgroundTag":"unsupported-config-version","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}