chore: commit remaining pre-existing changes
- Agent configs (.opencode/agents/) - Backend: alembic, routes, app, utils, scripts - Frontend: package.json, vite, components, e2e infra - Specs: 028-llm-datasource-supeset updates - Docker e2e config and Playwright setup
This commit is contained in:
@@ -48,13 +48,18 @@ router = APIRouter()
|
||||
|
||||
# #region _normalize_superset_env_url [C:1] [TYPE Function]
|
||||
# @BRIEF Canonicalize Superset environment URL to base host/path without trailing /api/v1.
|
||||
# Auto-prepends https:// if no scheme is present.
|
||||
# @PRE: raw_url can be empty.
|
||||
# @POST: Returns normalized base URL.
|
||||
# @POST: Returns normalized base URL with scheme.
|
||||
def _normalize_superset_env_url(raw_url: str) -> str:
|
||||
normalized = str(raw_url or "").strip().rstrip("/")
|
||||
if normalized.lower().endswith("/api/v1"):
|
||||
normalized = normalized[: -len("/api/v1")]
|
||||
return normalized.rstrip("/")
|
||||
normalized = normalized.rstrip("/")
|
||||
# Auto-prepend https:// if no scheme is present
|
||||
if normalized and not normalized.startswith("http://") and not normalized.startswith("https://"):
|
||||
normalized = f"https://{normalized}"
|
||||
return normalized
|
||||
|
||||
|
||||
# #endregion _normalize_superset_env_url
|
||||
|
||||
Reference in New Issue
Block a user