Skip to content

Commit fa293da

Browse files
authored
Chore: Print a deprecation warning in the sqlmesh ui command (#5046)
1 parent 583552e commit fa293da

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

docs/guides/ui.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Browser UI guide
22

3+
!!! warning
4+
5+
Browser UI is deprecated. Please use the [VSCode extension](vscode.md) instead.
6+
7+
38
SQLMesh's free, open-source browser user interface (UI) makes it easy to understand, explore, and modify your SQLMesh project.
49

510
This page describes the UI's components and how they work.

docs/quickstart/ui.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Browser UI
22

3+
!!! warning
4+
5+
Browser UI is deprecated. Please use the [VSCode extension](../guides/vscode.md) instead.
6+
37
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.
48

59
??? info "Learn more about the quickstart project structure"

sqlmesh/cli/main.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ def cli(
107107
if "--help" in sys.argv:
108108
return
109109

110+
configure_logging(
111+
debug,
112+
log_to_stdout,
113+
log_file_dir=log_file_dir,
114+
ignore_warnings=ignore_warnings,
115+
)
116+
configure_console(ignore_warnings=ignore_warnings)
117+
110118
load = True
111119

112120
if len(paths) == 1:
@@ -117,14 +125,6 @@ def cli(
117125
if ctx.invoked_subcommand in SKIP_LOAD_COMMANDS:
118126
load = False
119127

120-
configure_logging(
121-
debug,
122-
log_to_stdout,
123-
log_file_dir=log_file_dir,
124-
ignore_warnings=ignore_warnings,
125-
)
126-
configure_console(ignore_warnings=ignore_warnings)
127-
128128
configs = load_configs(config, Context.CONFIG_TYPE, paths, dotenv_path=dotenv)
129129
log_limit = list(configs.values())[0].log_limit
130130

@@ -884,6 +884,13 @@ def info(obj: Context, skip_connection: bool, verbose: int) -> None:
884884
@cli_analytics
885885
def ui(ctx: click.Context, host: str, port: int, mode: str) -> None:
886886
"""Start a browser-based SQLMesh UI."""
887+
from sqlmesh.core.console import get_console
888+
889+
get_console().log_warning(
890+
"The UI is deprecated and will be removed in a future version. Please use the SQLMesh VSCode extension instead. "
891+
"Learn more at https://sqlmesh.readthedocs.io/en/stable/guides/vscode/"
892+
)
893+
887894
try:
888895
import uvicorn
889896
except ModuleNotFoundError as e:

0 commit comments

Comments
 (0)