Skip to content

Make transpile config flexible #1488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 62 commits into
base: main
Choose a base branch
from

Conversation

ericvergnaud
Copy link
Contributor

@ericvergnaud ericvergnaud commented Mar 10, 2025

Our current code requires various transpile config fields at install time, but requires them as parameters when running transpile.
This PR fixes the discrepancy by:

  • making all fields optional at install time
  • making all parameters optional at transpile time
  • checking the config completeness at transpile time

Builds on top of the following PRs:
#1491
#1490
#1487
#1485
#1484
#1480
#1472
#1456

Also requires databrickslabs/blueprint#189

…esiliency

* no-default-transpiler-install:
  fix typo
  formatting
  only install rct and morpheus when installing 'transpiler' module
  only install rct and morpheus when installing 'transpiler' module
…g-flexible

* improve-installer-resiliency:
  formatting
  fix typo
  improve resiliency
  improve resiliency
  formatting
  only install rct and morpheus when installing 'transpiler' module
  only install rct and morpheus when installing 'transpiler' module
…exible

* fix-missing-dependencies:
  remove duplicate
  update dependencies
  fix missing dependency
…-options

* improve-installer-resiliency:
  formatting
  fix typo
  improve resiliency
  improve resiliency

# Conflicts:
#	src/databricks/labs/remorph/install.py
…g-flexible

* configure-lsp-custom-options:
  formatting and failing tests
  pass transpiler options add init time and check reception
  update rct config
  add tests and fix issues
  fix typo
  reads config options
@ericvergnaud ericvergnaud requested a review from a team as a code owner March 10, 2025 17:25
@ericvergnaud ericvergnaud marked this pull request as draft March 10, 2025 17:25
Copy link

github-actions bot commented Mar 10, 2025

❌ 13/14 passed, 1 failed, 1 skipped, 11s total

❌ test_stores_and_fetches_config: databricks.labs.blueprint.installation.SerdeError: transpiler_options.(as dict[str, any]).b: unknown: c (1.722s)
databricks.labs.blueprint.installation.SerdeError: transpiler_options.(as dict[str, any]).b: unknown: c
[gw4] linux -- Python 3.10.16 /home/runner/work/remorph/remorph/.venv/bin/python
15:41 INFO [databricks.labs.remorph.helpers.db_sql] Using SQL backend with warehouse_id: TEST_DEFAULT_WAREHOUSE_ID
15:41 INFO [databricks.labs.remorph.install] Saving configuration file config.yml
15:41 INFO [databricks.labs.remorph.helpers.db_sql] Using SQL backend with warehouse_id: TEST_DEFAULT_WAREHOUSE_ID
15:41 INFO [databricks.labs.remorph.install] Saving configuration file config.yml
[gw4] linux -- Python 3.10.16 /home/runner/work/remorph/remorph/.venv/bin/python

Running from acceptance #313

@ericvergnaud ericvergnaud marked this pull request as ready for review March 11, 2025 16:36
input_source: str | None = None
output_folder: str | None = None
error_file_path: str | None = None
sdk_config: dict[str, str] | None = None
skip_validation: bool = False
catalog_name: str = "remorph"
schema_name: str = "transpiler"
transpiler_options: dict[str, Any] | None = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the types of the values in this dictionary supposed to be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any type. That's data provided by the transpiler config, that we don't control. It's any valid JSON.

Copy link
Contributor

@asnare asnare Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSONValue: typing.TypeAlias = None | bool | int | float | str | list["JSONValue"] | dict[str, "JSONValue"]

* main:
  Improve lsp resiliency (#1491)
  Hot Fix for Dashboard Names (#1476)
  Improve installer resiliency (#1484)
  Patch Contributing Document (#1506)
  Introduce Documentation for Remorph (#1460)
  Fix missing dependencies (#1485)
  Installation Improvements (#1495)
  Update transpilers.md (#1486)
  Drop proxy commands (#1493)
  Fix labs.yml (#1490)
  Configure lsp custom options (#1487)
  Add support for DBT (#1456)

# Conflicts:
#	pyproject.toml
#	src/databricks/labs/remorph/config.py
#	src/databricks/labs/remorph/install.py
#	src/databricks/labs/remorph/transpiler/execute.py
#	tests/unit/test_install.py
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.

2 participants