Skip to content

Improve lsp resiliency #1491

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

Merged
merged 2 commits into from
Apr 1, 2025
Merged

Improve lsp resiliency #1491

merged 2 commits into from
Apr 1, 2025

Conversation

ericvergnaud
Copy link
Contributor

Increase timeout and other minor improvements

Copy link

✅ 13/13 passed, 1 skipped, 15s total

Running from acceptance #306

Copy link
Collaborator

@sundarshankar89 sundarshankar89 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -375,6 +375,11 @@ async def _do_initialize(self, config: TranspileConfig) -> None:
env = deepcopy(os.environ)
for name, value in self._config.remorph.env_vars.items():
env[name] = value
# ensure modules are searched locally before being searched in remorph
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, I don't follow this change, can you explain a bit more, we create a venv when remorph is installed, that is the Path we should be pointing to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't -yet- create a venv for the LSP server. We need to ensure that the LSP server's imports are resolved against its codebase rather than against remorph's code base. The PYTHONPATH here is for the LSP Server only, it doesn't affect remorph.

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is probably a question on how we manage dependency, I have a similar challenge in profiler debating between
Remorph Managing using existing venv vs creating a new venv.
Installing them against base env

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then we need to prioritize having independent installers per pluggable transpiler. I have created a ticket for this: #1507.
In the meantime, this PR limits risks and side-effects.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@sundarshankar89 sundarshankar89 left a comment

Choose a reason for hiding this comment

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

LGTM

@sundarshankar89 sundarshankar89 requested a review from a team April 1, 2025 09:32
@ericvergnaud ericvergnaud assigned gueniai and unassigned ericvergnaud Apr 1, 2025
Copy link
Contributor

@biswadeepupadhyay-db biswadeepupadhyay-db left a comment

Choose a reason for hiding this comment

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

LGTM

@ericvergnaud ericvergnaud added this pull request to the merge queue Apr 1, 2025
Merged via the queue into main with commit 11b2522 Apr 1, 2025
6 checks passed
@ericvergnaud ericvergnaud deleted the improve-LSP-resiliency branch April 1, 2025 13:14
ericvergnaud added a commit that referenced this pull request Apr 3, 2025
* 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)
  Introduce table definition (#1450)
  Add Error handling Pipeline Execution (#1466)
  Enhance Profiler config to execute Python Script (#1465)
  Pipeline Executor for Profiling (#1453)
  Updated document On Python requirement (#1473)

# Conflicts:
#	src/databricks/labs/remorph/transpiler/lsp/lsp_engine.py
ericvergnaud added a commit that referenced this pull request Apr 4, 2025
* 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.

4 participants