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

Fix syntax error in jupyter-server-config Python file #2286

Merged
merged 8 commits into from
Mar 5, 2024

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Mar 4, 2024

Reference Issues or PRs

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Any other comments?

@krassowski
Copy link
Member Author

Great, d140bf7 uncovered another existing but silent issue, 🎉:

[terraform]: ╷
[terraform]: │ Error: local-exec provisioner error
[terraform]: │ 
[terraform]: │   with module.jupyterhub.local_file.jupyter_jupyterlab_pioneer_config_py,
[terraform]: │   on modules/kubernetes/services/jupyterhub/configmaps.tf line 44, in resource "local_file" "jupyter_jupyterlab_pioneer_config_py":
[terraform]: │   44:   provisioner "local-exec" {
[terraform]: │ 
[terraform]: │ Error running command 'python -m py_compile
[terraform]: │ modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_jupyterlab_pioneer_config.py':
[terraform]: │ exit status 1. Output:   File
[terraform]: │ "modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_jupyterlab_pioneer_config.py",
[terraform]: │ line 6
[terraform]: │     log_format =
[terraform]: │                 ^
[terraform]: │ SyntaxError: invalid syntax
[terraform]: │ 
[terraform]: │ 
[terraform]: ╵

@krassowski
Copy link
Member Author

krassowski commented Mar 4, 2024

While the provisioner script added in this PR adds a guard against syntax error, it does not actually ensure that the configs are applied (imagine that someone makes a typo in a future PR and places the config in a wrong directory). The end-to-end tests should pick it up, but failed to detect the problems for either pioneer and plain server config. I will open a new issue for this. Edit, here it goes: #2287

@krassowski krassowski marked this pull request as draft March 4, 2024 14:05
@krassowski krassowski marked this pull request as ready for review March 4, 2024 16:08
@krassowski
Copy link
Member Author

@marcelovilla this is now all passing, should we go ahead with trying out the branch in a deployment?

Copy link
Member

@marcelovilla marcelovilla left a comment

Choose a reason for hiding this comment

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

Thanks @krassowski! Just tested this on a new deployment and I am able to submit notebook jobs.

@marcelovilla
Copy link
Member

Closes #2277

@krassowski krassowski linked an issue Mar 5, 2024 that may be closed by this pull request
@krassowski krassowski merged commit 292df05 into nebari-dev:develop Mar 5, 2024
10 checks passed
@pavithraes pavithraes added this to the 2024.2.1 milestone Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[BUG] - Notebook Jobs failing because environment is not found
3 participants