Skip to content

feat: raise explicit missing-dependency errors when engines are const… - #106

Merged
Miles Cole (mwc360) merged 1 commit into
mainfrom
engine_dependency_checks
Sep 16, 2026
Merged

Miles Cole (mwc360) merged 1 commit into
mainfrom
engine_dependency_checks

Conversation

@mwc360

Copy link
Copy Markdown
Contributor

Engines import their optional libraries lazily, so a forgotten extra surfaced partway into a run as an error that named neither the engine nor the package to install.

BaseEngine now declares REQUIRED_MODULES and INSTALL_EXTRA, and init calls verify_dependencies() before doing any other work. The raised MissingDependenciesError subclasses ImportError, names every missing module at once rather than one per failed run, and carries the matching pip install lakebench[...] hint.

Availability is resolved with importlib.util.find_spec rather than installed distribution names so that modules supplied by a managed runtime, such as pyspark on Fabric, Synapse, and HDInsight, count as present.

FabricDataWarehouse overrides the hook to also check for the Microsoft ODBC Driver 18 for SQL Server, which pip cannot install, and its connection string now references the same constant so the two cannot drift.

Tests assert the declared modules of every engine are actually installed by the extra they name.

…ructed

Engines import their optional libraries lazily, so a forgotten extra surfaced
partway into a run as an error that named neither the engine nor the package to
install.

BaseEngine now declares REQUIRED_MODULES and INSTALL_EXTRA, and __init__ calls
verify_dependencies() before doing any other work. The raised
MissingDependenciesError subclasses ImportError, names every missing module at
once rather than one per failed run, and carries the matching
`pip install lakebench[...]` hint.

Availability is resolved with importlib.util.find_spec rather than installed
distribution names so that modules supplied by a managed runtime, such as
pyspark on Fabric, Synapse, and HDInsight, count as present.

FabricDataWarehouse overrides the hook to also check for the Microsoft ODBC
Driver 18 for SQL Server, which pip cannot install, and its connection string
now references the same constant so the two cannot drift.

Tests assert the declared modules of every engine are actually installed by the
extra they name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mwc360
Miles Cole (mwc360) merged commit aa0fd58 into main Sep 16, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant