{"record":{"id":"2764a83fa3a348a9","repo":"apache/superset","slug":"extension-name-cannot-be-empty","errorCode":null,"errorMessage":"Extension name cannot be empty","messagePattern":"Extension name cannot be empty","errorType":"exception","errorClass":"ExtensionNameError","httpStatus":null,"severity":"error","filePath":"superset-extensions-cli/src/superset_extensions_cli/utils.py","lineNumber":249,"sourceCode":"\n    if not PUBLISHER_REGEX.match(publisher):\n        raise ExtensionNameError(\n            \"Publisher must start with a letter and contain only lowercase letters, numbers, and hyphens (e.g., 'my-org')\"\n        )\n\n\ndef validate_technical_name(name: str) -> None:\n    \"\"\"\n    Validate technical extension name format.\n\n    Args:\n        name: Technical extension name (e.g., 'dashboard-widgets')\n\n    Raises:\n        ExtensionNameError: If name is invalid\n    \"\"\"\n    if not name:\n        raise ExtensionNameError(\"Extension name cannot be empty\")\n\n    if not TECHNICAL_NAME_REGEX.match(name):\n        raise ExtensionNameError(\n            \"Extension name must start with a letter and contain only lowercase letters, numbers, and hyphens (e.g., 'dashboard-widgets')\"\n        )\n\n\ndef validate_display_name(display_name: str) -> str:\n    \"\"\"\n    Validate and normalize display name format.\n\n    Args:\n        display_name: Human-readable extension name\n\n    Returns:\n        Cleaned display name\n\n    Raises:","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-extensions-cli/src/superset_extensions_cli/utils.py#L231-L267","documentation":"Thrown by validate_technical_name() in the superset-extensions CLI when the technical extension name is empty (falsy). The technical name is the slug part of '<publisher>/<name>' used for directories, package names, and module federation identifiers, so an empty value cannot be accepted. This is the first of two guards in the function; the second checks the format regex.","triggerScenarios":"Calling a scaffolding command with an empty string for the extension name (e.g. `create my-org \"\"`), passing a name composed only of whitespace (before regex validation, since only truthiness is checked here), or a script that builds the name from a variable that ended up empty.","commonSituations":"Shell scripts that pass \"$EXTENSION_NAME\" when the env var was never exported; CI templates with a placeholder that was never filled in; typos where the publisher argument is duplicated and the name argument is omitted so argparse receives ''.","solutions":["Supply a non-empty technical name slug, e.g. 'dashboard-widgets'.","Check the argument order of your CLI invocation — an empty name usually means a missing/shifted positional argument.","In automation, add a guard that fails early with your own message when the name variable is empty."],"exampleFix":"# before\nNAME=\"\"\nsuperset-extensions create my-org \"$NAME\"\n\n# after\nNAME=\"dashboard-widgets\"\nsuperset-extensions create my-org \"$NAME\"","handlingStrategy":"validation","validationCode":"name = name or \"\"\nif not name.strip():\n    raise SystemExit(\"extension name is required (kebab-case slug, e.g. 'dashboard-widgets')\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fail fast in wrapper scripts when positional arguments are empty instead of forwarding them to the CLI.","Use shell defaults: \"${EXTENSION_NAME:?EXTENSION_NAME must be set}\"."],"tags":["cli","validation","empty-value","extensions"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}