Commit Graph

5 Commits

Author SHA1 Message Date
Muhammad Aji Muharrom
bcd323f794 Healthcheck url from json (#1868)
* Get healthcheck URL from JSON file

Obtain Jupyter server's full URL from
/home/$NB_USER/.local/share/jupyter/runtime/*.json
and use it for healthcheck.

* Expand tests for healthcheck

* Update pre-commit config

* Remove workdir from tests

* Wait for container start with 0.1s interval

* Quote NB_USER variable on base-notebook/Dockerfile

* Fix style and make test actually work

* Ooops, GitHub didn't show last line

* Fix mypy

* Use bash with pipefail option for healthcheck

* Create python script for healthcheck

* Don't verify SSL certificate on healthcheck

* Update healthcheck test

- Add "user" parameter
- Add tests when container should not be healthy

* Fix typo

* Update test_healthcheck.py

---------

Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2023-02-28 14:07:52 +04:00
Muhammad Aji Muharrom
0d324bc0b3 Parameterize healthcheck by internal port (#1859)
* Use the JUPYTER_PORT environment variable to configure server port

- Remove port setting in jupyter_server_config.py
- Declare the $JUPYTER_PORT env on the base Dockerfile
- Use it for HEALTHCHECK

* Add test case for JUPYTER_PORT env variable

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

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

* Update documentation

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

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

* Update style

* Better wording

* Better wording

* Add test for custom internal port

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

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

* Parametrize internal port test case

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

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

* Try to fix test

* Better tests

Co-authored-by: Muhammad Aji Muharrom <ajimuharrom@uchicago.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@gmail.com>
2023-01-24 11:19:39 +04:00
Ayaz Salikhov
a905ff6f6d Check healthcheck in all jupyter applications (#1854)
* Check healthcheck in all jupyter applications

* Fix

* Remove JUPYTERHUB_API_TOKEN healthcheck test
2023-01-04 10:24:09 +04:00
Ayaz Salikhov
c9ac681f8f Increase sleep for healthcheck 2023-01-01 12:07:37 +03:00
Ayaz Salikhov
2a1cd45ebf Pin jupyter_server>=2.0.0 (#1853)
* Pin jupyter_server==2.0.0

* Update scipy-notebook/Dockerfile

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>

* Fix test

* Fix test

* Test healthcheck properly

* Fix typing

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-12-30 11:08:27 +02:00