Skip to content
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

[BUG] sys.path and os.getcwd() are inconsistent between Databricks VS-Code Extension and a deployed bundle #1459

Open
arne-123 opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@arne-123
Copy link

In your docs: https://docs.databricks.com/en/files/cwd-dbr-14.html it says:

'CWD returns the directory containing the notebook or script being run.
When run locally with databricks-connection, os.getcwd() returns the path of the project not the file being run.

Furthermore, the root dir is not added to sys.path when running the job in a bundle but added when run locally.

This happens in ./packages/databricks-vscode/resources/python/dbconnect-bootstrap.py (Line 68)

sys.path.insert(0, root_dir)

Here the root dir is added to sys.path, creating the inconsistent behavior.

@arne-123 arne-123 added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant