{"record":{"id":"ca85685e4193df34","repo":"hasura/graphql-engine","slug":"plugin-plugin-name-is-defined-more-than-once","errorCode":null,"errorMessage":"Plugin {plugin_name} is defined more than once","messagePattern":"Plugin (.+?) is defined more than once","errorType":"validation","errorClass":"PluginValidationError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/plugins/error.rs","lineNumber":21,"sourceCode":"use open_dds::plugins::LifecyclePluginName;\n\n#[derive(Debug, thiserror::Error)]\npub enum PluginValidationError {\n    #[error(\"Plugin {plugin_name} references unknown data connector {data_connector_name}\")]\n    UnknownDataConnector {\n        plugin_name: Qualified<LifecyclePluginName>,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"Data connector {data_connector_name} is referenced by multiple {plugin_type} plugins: {plugin_name_a} and {plugin_name_b}\"\n    )]\n    DuplicatePluginForDataConnector {\n        plugin_type: String,\n        data_connector_name: Qualified<DataConnectorName>,\n        plugin_name_a: Qualified<LifecyclePluginName>,\n        plugin_name_b: Qualified<LifecyclePluginName>,\n    },\n    #[error(\"Plugin {plugin_name} is defined more than once\")]\n    DuplicatePluginName {\n        plugin_name: Qualified<LifecyclePluginName>,\n    },\n}\n","sourceCodeStart":3,"sourceCodeEnd":26,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/plugins/error.rs#L3-L26","documentation":"Thrown when two lifecycle plugins in the metadata share the same qualified name. Plugin names form a namespace (per subgraph) and must be unique.","triggerScenarios":"Declaring two lifecycle plugins with the same LifecyclePluginName (same subgraph + name), typically via duplicated definitions or overlapping metadata files; detected during the plugins validation stage.","commonSituations":"Copy-pasting a plugin block without renaming; including the same plugin file twice in the metadata build; merging subgraphs that both define a plugin with the same name.","solutions":["Search all plugin definitions for the name in the error and remove or rename the duplicate","Check that no plugin metadata file is included twice in your build/export process","Adopt a naming convention (e.g. <connector>_<purpose>_plugin) to avoid collisions"],"exampleFix":"# before\nplugins:\n  - name: auditPlugin\n    ...\n  - name: auditPlugin   # duplicate\n# after\nplugins:\n  - name: auditPlugin\n    ...\n  - name: auditPluginV2\n    ...","handlingStrategy":"validation","validationCode":"const seen = new Set();\nfor (const p of plugins) {\n  const key = `${p.subgraph}::${p.name}`;\n  if (seen.has(key)) throw new Error(`duplicate plugin ${key}`);\n  seen.add(key);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use a plugin naming convention including purpose and connector","Ensure metadata files are not included twice in the build"],"tags":["metadata","plugins","duplicate","naming","open-dds"],"backgroundTag":"duplicate-metadata-definition","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}