-
Notifications
You must be signed in to change notification settings - Fork 37
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
Improve lsp resiliency #1491
Conversation
✅ 13/13 passed, 1 skipped, 15s total Running from acceptance #306 |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 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
* 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
Increase timeout and other minor improvements