Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
dd726b5
feat: integrate Switch transpiler with Lakebridge installer
hiroyukinakazato-db Sep 30, 2025
febb62d
Merge branch 'main' into feature/switch-installer-integration
hiroyukinakazato-db Sep 30, 2025
fa26b4c
fix: remove undefined URLError from exception handling
hiroyukinakazato-db Sep 30, 2025
6511e20
refactor: streamline SwitchInstaller deployment logic and update tests
hiroyukinakazato-db Oct 3, 2025
33ea7de
refactor: simplify SwitchInstaller test structure and improve assertions
hiroyukinakazato-db Oct 3, 2025
d0c63c3
Merge remote-tracking branch 'origin/main' into feature/switch-instal…
hiroyukinakazato-db Oct 3, 2025
7cb9ea9
feat: add Switch transpiler installer for Lakebridge integration
hiroyukinakazato-db Oct 7, 2025
467dea9
fix: support case-insensitive config lookup in SwitchInstaller
hiroyukinakazato-db Oct 8, 2025
57298b0
Merge branch 'main' into feature/switch-installer-integration
hiroyukinakazato-db Oct 8, 2025
09c0eb8
Merge branch 'main' into feature/switch-installer-integration
hiroyukinakazato-db Oct 9, 2025
8439314
refactor: separate Switch installation from workspace deployment
hiroyukinakazato-db Oct 9, 2025
5f66f3f
Merge branch 'main' into feature/switch-installer-integration
hiroyukinakazato-db Oct 9, 2025
9dc4b04
refactor: encapsulate Switch package path resolution in SwitchDeployment
hiroyukinakazato-db Oct 9, 2025
7637234
test: update Switch installation tests for refactored interface
hiroyukinakazato-db Oct 9, 2025
729cb0d
Merge branch 'main' into feature/switch-installer-integration
hiroyukinakazato-db Oct 9, 2025
42ce0df
fix: exclude wait_for_completion from Switch job parameters
hiroyukinakazato-db Oct 10, 2025
f698470
Merge branch 'main' into feature/switch-installer-integration
hiroyukinakazato-db Oct 14, 2025
22cadc9
Defaults in `labs.yml` are strings.
asnare Oct 14, 2025
b3d2441
Update flag description to use placeholder syntax.
asnare Oct 14, 2025
ac7e2a4
Disable flag pending completion of integration.
asnare Oct 14, 2025
f0426e1
Leave pylint's max-args as-is.
asnare Oct 15, 2025
934c2e8
Remove unnecessary include_llm arguments.
asnare Oct 15, 2025
74923cc
Refactor Switch installation.
asnare Oct 16, 2025
084f90f
upgrade to latest switch plugin
sundarshankar89 Oct 21, 2025
61f796f
Merge branch 'main' into feature/switch-installer-integration
sundarshankar89 Oct 21, 2025
0c1d1d5
fixed package dependencies
sundarshankar89 Oct 21, 2025
6aeea25
Merge branch 'main' into feature/switch-installer-integration
sundarshankar89 Oct 22, 2025
468f8de
added additional configuration for making switch
sundarshankar89 Oct 22, 2025
6a57570
Latest Switch
sundarshankar89 Oct 22, 2025
2c3d153
Sorted List for FMAPI
sundarshankar89 Oct 22, 2025
f41dee8
setting logging level
sundarshankar89 Oct 22, 2025
950c1b8
setting logging level
sundarshankar89 Oct 22, 2025
6ca78ed
setting logging level
sundarshankar89 Oct 22, 2025
ba65df4
setting logging level
sundarshankar89 Oct 22, 2025
2e2abcb
setting logging level
sundarshankar89 Oct 22, 2025
bcbe4df
make default as first choice
sundarshankar89 Oct 22, 2025
486250f
fix tests
sundarshankar89 Oct 22, 2025
fc1ddca
fix tests
sundarshankar89 Oct 22, 2025
42c9c4e
fixes few bugs
sundarshankar89 Oct 23, 2025
1831076
update databricks-switch-plugin dependency to version 0.1.4
hiroyukinakazato-db Oct 26, 2025
01a0c87
Review Comments
sundarshankar89 Oct 27, 2025
ccce0f2
Review Comments
sundarshankar89 Oct 27, 2025
eae5997
Merge branch 'main' into feature/switch-installer-integration
sundarshankar89 Oct 28, 2025
34c9f8f
Merge branch 'main' into feature/switch-installer-integration
sundarshankar89 Oct 28, 2025
23df37b
added tests for configurator
sundarshankar89 Oct 29, 2025
4a0bf49
added tests for installer
sundarshankar89 Oct 29, 2025
c49c5b3
added tests for installer
sundarshankar89 Oct 29, 2025
078a0bc
added tests for switch
sundarshankar89 Oct 29, 2025
69f93b2
Merge branch 'main' into feature/switch-installer-integration
sundarshankar89 Oct 30, 2025
b5bcbcd
Merge branch 'main' into feature/switch-installer-integration
asnare Nov 4, 2025
6132f04
removed interactive prompt with include_llm_transpiler
sundarshankar89 Nov 5, 2025
53077ec
removed interactive prompt with include_llm_transpiler
sundarshankar89 Nov 5, 2025
186ab59
Merge branch 'main' into feature/switch-installer-integration
sundarshankar89 Nov 5, 2025
eb1d497
Merge branch 'main' into feature/switch-installer-integration
asnare Nov 6, 2025
52d6613
Log why the configuration questionnaire won't happen.
asnare Nov 6, 2025
11903f9
Logging tweaks.
asnare Nov 6, 2025
a62194d
Fix incorrect comment.
asnare Nov 6, 2025
24ad1b3
Style tweak, mark a method as static.
asnare Nov 6, 2025
59fe56e
Merge branch 'main' into feature/switch-installer-integration
gueniai Nov 7, 2025
6ac2e68
addressed review comments
sundarshankar89 Nov 7, 2025
9799a23
addressed review comments
sundarshankar89 Nov 7, 2025
ddf7f1a
update latest switch plugin
sundarshankar89 Nov 7, 2025
3ce1ffd
Avoid raising DatabricksError ourselves.
asnare Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions labs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ commands:
- name: interactive
description: "Whether installing in interactive mode, which may prompt for configuration settings."
default: auto
- name: include-llm-transpiler
description: "Include LLM-based transpiler in installation"
default: false
- name: describe-transpile
description: "Describe installed transpilers."
table_template: |-
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ bad-functions = ["map", "input"]
# ignored-parents =

# Maximum number of arguments for function / method.
max-args = 12
max-args = 13

# Maximum number of attributes for a class (see R0902).
max-attributes = 13
Expand Down
7 changes: 6 additions & 1 deletion src/databricks/labs/lakebridge/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ def install_transpile(
w: WorkspaceClient,
artifact: str | None = None,
interactive: str | None = None,
include_llm_transpiler: bool = False,
transpiler_repository: TranspilerRepository = TranspilerRepository.user_home(),
) -> None:
"""Install or upgrade the Lakebridge transpilers."""
Expand All @@ -633,9 +634,13 @@ def install_transpile(
ctx.add_user_agent_extra("cmd", "install-transpile")
if artifact:
ctx.add_user_agent_extra("artifact-overload", Path(artifact).name)
if include_llm_transpiler:
ctx.add_user_agent_extra("include-llm-transpiler", "true")
user = w.current_user
logger.debug(f"User: {user}")
transpile_installer = installer(w, transpiler_repository, is_interactive=is_interactive)
transpile_installer = installer(
w, transpiler_repository, is_interactive=is_interactive, include_llm_transpiler=include_llm_transpiler
)
transpile_installer.run(module="transpile", artifact=artifact)


Expand Down
18 changes: 18 additions & 0 deletions src/databricks/labs/lakebridge/deployment/installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

from databricks.labs.lakebridge.config import LakebridgeConfiguration
from databricks.labs.lakebridge.deployment.recon import ReconDeployment
from databricks.labs.lakebridge.transpiler.repository import TranspilerRepository
from databricks.labs.lakebridge.transpiler.installers import SwitchInstaller

logger = logging.getLogger("databricks.labs.lakebridge.install")

Expand Down Expand Up @@ -116,9 +118,25 @@ def uninstall(self, config: LakebridgeConfiguration):
f"Won't remove transpile validation schema `{config.transpile.schema_name}` "
f"from catalog `{config.transpile.catalog_name}`. Please remove it manually."
)
self._uninstall_switch_job()

if config.reconcile:
self._recon_deployment.uninstall(config.reconcile)

self._installation.remove()
logger.info("Uninstallation completed successfully.")

def _uninstall_switch_job(self) -> None:
"""Remove Switch transpiler job if exists."""
repository = TranspilerRepository.user_home()
switch_installer = SwitchInstaller(repository, self._ws, self._installation)
# Get configured resources before uninstalling for logging purpose
resources = switch_installer.get_configured_resources()
switch_installer.uninstall()

if resources:
logger.info(
f"Won't remove Switch resources: catalog=`{resources['catalog']}`, "
f"schema=`{resources['schema']}`, volume=`{resources['volume']}`. "
"Please remove them manually if needed."
)
17 changes: 14 additions & 3 deletions src/databricks/labs/lakebridge/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
import os
import webbrowser
from collections.abc import Set, Callable, Sequence
from collections.abc import Set, Sequence
from pathlib import Path
from typing import Any, cast

Expand All @@ -28,6 +28,7 @@
from databricks.labs.lakebridge.transpiler.installers import (
BladebridgeInstaller,
MorpheusInstaller,
SwitchInstaller,
TranspilerInstaller,
)
from databricks.labs.lakebridge.transpiler.repository import TranspilerRepository
Expand All @@ -50,10 +51,12 @@ def __init__(
environ: dict[str, str] | None = None,
*,
is_interactive: bool = True,
include_llm_transpiler: bool = False,
transpiler_repository: TranspilerRepository = TranspilerRepository.user_home(),
transpiler_installers: Sequence[Callable[[TranspilerRepository], TranspilerInstaller]] = (
transpiler_installers: Sequence[type[TranspilerInstaller]] = (
BladebridgeInstaller,
MorpheusInstaller,
SwitchInstaller,
),
):
self._ws = ws
Expand All @@ -65,6 +68,7 @@ def __init__(
self._ws_installation = workspace_installation
# TODO: Refactor the 'prompts' property in preference to using this flag, which should be redundant.
self._is_interactive = is_interactive
self._include_llm_transpiler = include_llm_transpiler
self._transpiler_repository = transpiler_repository
self._transpiler_installer_factories = transpiler_installers

Expand All @@ -77,7 +81,12 @@ def __init__(

@property
def _transpiler_installers(self) -> Set[TranspilerInstaller]:
return frozenset(factory(self._transpiler_repository) for factory in self._transpiler_installer_factories)
factories = self._transpiler_installer_factories
if not self._include_llm_transpiler:
if SwitchInstaller in factories:
logger.info("Skipping Switch installation (LLM transpiler not requested)")
factories = tuple(f for f in factories if f != SwitchInstaller)
return frozenset(factory(self._transpiler_repository, self._ws, self._installation) for factory in factories)

def run(
self,
Expand Down Expand Up @@ -386,6 +395,7 @@ def installer(
transpiler_repository: TranspilerRepository,
*,
is_interactive: bool,
include_llm_transpiler: bool = False,
) -> WorkspaceInstaller:
app_context = ApplicationContext(_verify_workspace_client(ws))
return WorkspaceInstaller(
Expand All @@ -398,6 +408,7 @@ def installer(
app_context.workspace_installation,
transpiler_repository=transpiler_repository,
is_interactive=is_interactive,
include_llm_transpiler=include_llm_transpiler,
)


Expand Down
Loading
Loading