Repository navigation
fix(integrations): use current python interpreter in notebook UI launcher (#981) - #996
Open
legend91019 wants to merge 1 commit into
Open
legend91019 wants to merge 1 commit into
legend91019 wants to merge 1 commit into
Conversation
…cher (apache#981) - Update launch_ui_colab and launch_ui_jupyter to use sys.executable (fallback to 'python') instead of hardcoded 'python' literal - Ensure Burr tracking server subprocess uses the active notebook kernel environment - Add unit and regression tests in tests/integrations/test_notebook.py
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Fixes #981.
In notebook environments (Jupyter, Colab, VSCode), virtual environments may be active for the notebook kernel without having their binary path activated in the notebook server's or system
PATH.Previously,
launch_ui_jupyter()andlaunch_ui_colab()spawned the background server process using the literal"python"command:This causes the subprocess to execute under whatever
pythonis resolved on the parent PATH, which may lackapache-burror dependencies, causing%burr_uito fail to start the server.This PR:
launch_ui_jupyter()andlaunch_ui_colab()inburr/integrations/notebook.pyto usesys.executable or "python", guaranteeing that the tracking server runs inside the active notebook kernel's Python environment.tests/integrations/test_notebook.pyvalidating thatsys.executableis passed tosubprocess.Popenand that fallback to"python"works when the executable path is empty.Verification
tests/integrations/test_notebook.pycovering Jupyter and Colab UI launchers."python"was passed instead ofsys.executable.uv run pytest tests/integrations/test_notebook.py.python scripts/check_asf_headers.py.