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

Restore default writing of browser open redirect file, add opt-in to skip #1144

Merged

Conversation

bollwyvl
Copy link
Contributor

@bollwyvl bollwyvl commented Dec 21, 2022

Elevator Pitch

Make skipping the browser open files opt-in.

References

Changes

  • add ServerApp.no_browser_open_file, defaulting to False
  • gate writing of the browser redirect file behind this setting
  • update printed message to not show the message if the file was not written
    • add a little i18n to the text
  • add test of no_browser_open_file and false, check for file creation and log message

Alternatives

  • make browser_open_file allow_none=True
    • this is probably clearer, and wouldn't introduce a new config variable, but Nones do weird things

@bollwyvl
Copy link
Contributor Author

Ha, i can see why this didn't get caught earlier. 😿

          test_command: "python -m jupyterlab.browser_check --no-browser-test"

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Base: 79.84% // Head: 80.03% // Increases project coverage by +0.18% 🎉

Coverage data is based on head (230de3b) compared to base (1c9c943).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1144      +/-   ##
==========================================
+ Coverage   79.84%   80.03%   +0.18%     
==========================================
  Files          68       68              
  Lines        8048     8053       +5     
  Branches     1598     1600       +2     
==========================================
+ Hits         6426     6445      +19     
+ Misses       1200     1184      -16     
- Partials      422      424       +2     
Impacted Files Coverage Δ
jupyter_server/serverapp.py 80.19% <100.00%> (+0.87%) ⬆️
...ter_server/services/kernels/connection/channels.py 59.82% <0.00%> (+1.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bollwyvl
Copy link
Contributor Author

coverage sad, but them's the brakes. Happy to add a test, but the best one, mentioned above, is presently explicitly disabled.

@bollwyvl bollwyvl changed the title Restore default writing of browser open files, add opt-in to skip Restore default writing of browser open redirect file, add opt-in to skip Dec 21, 2022
@bollwyvl bollwyvl force-pushed the gh-1143-make-no-browser-file-opt-in branch from 6b8c360 to bec5c26 Compare December 21, 2022 05:59
@bollwyvl bollwyvl force-pushed the gh-1143-make-no-browser-file-opt-in branch from bec5c26 to 230de3b Compare December 21, 2022 06:08
@bollwyvl
Copy link
Contributor Author

80.03% (+0.18%) compared to 1c9c943

Ha, and back over 80 to boot.

@blink1073 blink1073 added the bug label Dec 21, 2022
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.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.0.2 reports location of browser launch file, but does not create it
2 participants