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

Backport Inject session identifier into environment variable #920

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

vidartf
Copy link
Member

@vidartf vidartf commented Jul 13, 2022

Manual backport of #679 and the cleanup PR #859.

Carreau and others added 2 commits July 13, 2022 10:38
There are many use case where users want to know the current notebook
name/path. This help by adding a session identifier (to not really say
this is the current notebook name), and by default make it the full path
to the notebook document that created the session.

This will of course not work if the notebook get renamed, but we can
tackle this later.

See also jupyter/jupyter_client#656,
jupyter/notebook#6180. It will need to be ported
to jupyter_server as well.

This is the mirror commit of
jupyter/notebook#6279 on main notebook.
* Make start_kernel env extend os.environ

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2022

Codecov Report

Merging #920 (0c4d3f3) into 1.x (c9897b5) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              1.x     #920      +/-   ##
==========================================
- Coverage   71.72%   71.65%   -0.08%     
==========================================
  Files          62       62              
  Lines        7686     7687       +1     
  Branches     1275     1275              
==========================================
- Hits         5513     5508       -5     
- Misses       1782     1790       +8     
+ Partials      391      389       -2     
Impacted Files Coverage Δ
jupyter_server/services/sessions/sessionmanager.py 88.31% <100.00%> (+0.05%) ⬆️
jupyter_server/services/kernels/kernelmanager.py 78.64% <0.00%> (-1.95%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9897b5...0c4d3f3. Read the comment docs.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thanks!

@blink1073 blink1073 merged commit 4b3a390 into jupyter-server:1.x Jul 13, 2022
@blink1073 blink1073 changed the title Backport Inject session identifier into environment variable. #679 Backport Inject session identifier into environment variable Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants