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

Improve logging in start.sh #1532

Open
mathbunnyru opened this issue Nov 15, 2021 · 2 comments · Fixed by #2006
Open

Improve logging in start.sh #1532

mathbunnyru opened this issue Nov 15, 2021 · 2 comments · Fixed by #2006
Labels
type:Enhancement A proposed enhancement to the docker images

Comments

@mathbunnyru
Copy link
Member

mathbunnyru commented Nov 15, 2021

Possible future improvements (just a note for someone, who will want to improve our docker stacks):

  1. Test JUPYTER_DOCKER_STACKS_QUIET env variable
  2. Always add log_level like this: `_log "INFO" "my_message"
  3. Based on the log level color can be added
  4. Exit on fatal errors (or maybe just errors)
  5. Add timestamps, like INFO[2021-08-23 11:00:00.000000] my_message
  6. Stop using bash, haha 👍

Based on comment: #1526 (review)

@mathbunnyru mathbunnyru added the type:Enhancement A proposed enhancement to the docker images label Nov 15, 2021
@mathbunnyru mathbunnyru changed the title Improve logging in start.sh [ENH] - Improve logging in start.sh Aug 28, 2023
@mathbunnyru mathbunnyru changed the title [ENH] - Improve logging in start.sh Improve logging in start.sh Sep 10, 2023
yuvipanda added a commit to yuvipanda/docker-stacks that referenced this issue Oct 17, 2023
Based on

> Stop using bash, haha 👍

from jupyter#1532.

If there's more apetite for this, I'll try to migrate
`start.sh` and `start-singleuser.sh` as well - I think they should
all be merged together. We can remove the `.sh` suffixes for
accuracy, and keep symlinks in so old config still works. Since
the shebang is what is used to launch the correct interpreter,
the `.sh` doesn't matter.

Will help fix jupyter#1532,
as I believe all those things are going to be easier to do from
python than bash
yuvipanda added a commit to yuvipanda/docker-stacks that referenced this issue Oct 17, 2023
Based on

> Stop using bash, haha 👍

from jupyter#1532.

If there's more apetite for this, I'll try to migrate
`start.sh` and `start-singleuser.sh` as well - I think they should
all be merged together. We can remove the `.sh` suffixes for
accuracy, and keep symlinks in so old config still works. Since
the shebang is what is used to launch the correct interpreter,
the `.sh` doesn't matter.

Will help fix jupyter#1532,
as I believe all those things are going to be easier to do from
python than bash
mathbunnyru added a commit that referenced this issue Oct 17, 2023
* Migrate start-notebook.sh to bash

Based on

> Stop using bash, haha 👍

from #1532.

If there's more apetite for this, I'll try to migrate
`start.sh` and `start-singleuser.sh` as well - I think they should
all be merged together. We can remove the `.sh` suffixes for
accuracy, and keep symlinks in so old config still works. Since
the shebang is what is used to launch the correct interpreter,
the `.sh` doesn't matter.

Will help fix #1532,
as I believe all those things are going to be easier to do from
python than bash

* Rename start-notebook.sh to start-notebook

* Cleanup start-notebook a little

* Fix typo

* Migrate start-singleuser as well

* Remove unused import

* Run symlink commands as root

* Combine repetitive RUN commands

* Remove multiple args to env

-u can not be set by shebang, we must set the env var
instead

* Fix conditional inversion

Co-authored-by: Ayaz Salikhov <[email protected]>

* Fix how start-singleuser is exec'd

* Actually call jupyterhub-singleuser in start-singleuser

* Pass through any additional args we get

* Put .py suffix on the start-* scripts

* Add .sh shims for the start-* scripts

* Document start-notebook.sh and start-singleuser.sh

* Partially test start-notebook.sh

* Reflow warning docs

Co-authored-by: Ayaz Salikhov <[email protected]>

---------

Co-authored-by: Ayaz Salikhov <[email protected]>
@yuvipanda
Copy link
Contributor

@mathbunnyru I think this should still stay open for a while?

@mathbunnyru mathbunnyru reopened this Oct 17, 2023
@mathbunnyru
Copy link
Member Author

Sure, reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Enhancement A proposed enhancement to the docker images
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants