chore(extensions): clean up backend entrypoints and file globs (#38360)

This commit is contained in:
Ville Brofeldt
2026-03-03 09:45:35 -08:00
committed by GitHub
parent 016417f793
commit c35bf344a9
11 changed files with 426 additions and 117 deletions

View File

@@ -81,15 +81,8 @@ def test_extension_json_template_renders_with_both_frontend_and_backend(
# Verify frontend section is not present (contributions are code-first)
assert "frontend" not in parsed
# Verify backend section exists
assert "backend" in parsed
backend = parsed["backend"]
assert backend["entryPoints"] == [
"superset_extensions.test_org.test_extension.entrypoint"
]
assert backend["files"] == [
"backend/src/superset_extensions/test_org/test_extension/**/*.py"
]
# Verify no backend section in extension.json (moved to pyproject.toml)
assert "backend" not in parsed
@pytest.mark.unit
@@ -97,7 +90,7 @@ def test_extension_json_template_renders_with_both_frontend_and_backend(
"include_frontend,include_backend,expected_sections",
[
(True, False, []),
(False, True, ["backend"]),
(False, True, []),
(False, False, []),
],
)
@@ -220,12 +213,7 @@ def test_template_rendering_with_different_ids(
assert parsed["publisher"] == publisher
assert parsed["name"] == technical_name
assert parsed["displayName"] == display_name
assert parsed["backend"]["entryPoints"] == [
f"superset_extensions.{publisher_snake}.{name_snake}.entrypoint"
]
assert parsed["backend"]["files"] == [
f"backend/src/superset_extensions/{publisher_snake}/{name_snake}/**/*.py"
]
assert "backend" not in parsed
# Test package.json template
template = jinja_env.get_template("frontend/package.json.j2")