From 53df36dd006696165343b58df434fec60988f017 Mon Sep 17 00:00:00 2001 From: Iaroslav Zeigerman Date: Mon, 28 Jul 2025 08:43:29 -0700 Subject: [PATCH] Chore: Print a deprecation warning in the sqlmesh ui command --- docs/guides/ui.md | 5 +++++ docs/quickstart/ui.md | 4 ++++ sqlmesh/cli/main.py | 23 +++++++++++++++-------- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/guides/ui.md b/docs/guides/ui.md index 1da48e50b3..29bb204988 100644 --- a/docs/guides/ui.md +++ b/docs/guides/ui.md @@ -1,5 +1,10 @@ # Browser UI guide +!!! warning + + Browser UI is deprecated. Please use the [VSCode extension](vscode.md) instead. + + SQLMesh's free, open-source browser user interface (UI) makes it easy to understand, explore, and modify your SQLMesh project. This page describes the UI's components and how they work. diff --git a/docs/quickstart/ui.md b/docs/quickstart/ui.md index 06a9d8c448..2891536876 100644 --- a/docs/quickstart/ui.md +++ b/docs/quickstart/ui.md @@ -1,5 +1,9 @@ # Browser UI +!!! warning + + Browser UI is deprecated. Please use the [VSCode extension](../guides/vscode.md) instead. + In this quickstart, you'll use the SQLMesh browser user interface to get up and running with SQLMesh's scaffold generator. This example project will run locally on your computer using [DuckDB](https://duckdb.org/) as an embedded SQL engine. ??? info "Learn more about the quickstart project structure" diff --git a/sqlmesh/cli/main.py b/sqlmesh/cli/main.py index e4b06552ad..8982efc9f8 100644 --- a/sqlmesh/cli/main.py +++ b/sqlmesh/cli/main.py @@ -107,6 +107,14 @@ def cli( if "--help" in sys.argv: return + configure_logging( + debug, + log_to_stdout, + log_file_dir=log_file_dir, + ignore_warnings=ignore_warnings, + ) + configure_console(ignore_warnings=ignore_warnings) + load = True if len(paths) == 1: @@ -117,14 +125,6 @@ def cli( if ctx.invoked_subcommand in SKIP_LOAD_COMMANDS: load = False - configure_logging( - debug, - log_to_stdout, - log_file_dir=log_file_dir, - ignore_warnings=ignore_warnings, - ) - configure_console(ignore_warnings=ignore_warnings) - configs = load_configs(config, Context.CONFIG_TYPE, paths, dotenv_path=dotenv) log_limit = list(configs.values())[0].log_limit @@ -884,6 +884,13 @@ def info(obj: Context, skip_connection: bool, verbose: int) -> None: @cli_analytics def ui(ctx: click.Context, host: str, port: int, mode: str) -> None: """Start a browser-based SQLMesh UI.""" + from sqlmesh.core.console import get_console + + get_console().log_warning( + "The UI is deprecated and will be removed in a future version. Please use the SQLMesh VSCode extension instead. " + "Learn more at https://sqlmesh.readthedocs.io/en/stable/guides/vscode/" + ) + try: import uvicorn except ModuleNotFoundError as e: