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

Set LabApp to fail when config files have errors. #5716

Open
Zsailer opened this issue Dec 3, 2018 · 7 comments
Open

Set LabApp to fail when config files have errors. #5716

Zsailer opened this issue Dec 3, 2018 · 7 comments

Comments

@Zsailer
Copy link
Member

Zsailer commented Dec 3, 2018

If jupyterlab config file contains an error, the jupyterlab app throws a warning, ignores the config file, and continues running the application.

Would it make more sense to, instead, fail fast when errors are found? This is a simple change. Just need to add raise_config_file_errors = True as an attribute in the LabApp.

This was raised in issue #5614. Opening this issue to discuss, as this will change the default behavior of jupyterlab.

@jasongrout
Copy link
Contributor

Would it make more sense to, instead, fail fast when errors are found?

Yes! Several of us agree.

@jasongrout jasongrout modified the milestones: 1.0, Future Jan 25, 2019
@Zsailer
Copy link
Member Author

Zsailer commented Jan 25, 2019

@jasongrout
raise_config_file_errors=False by default in traitlets (docs here). To fail fast, a traitlets application just needs to set this to True.

My question is, how deep+wide in the inheritance tree should we go? Meaning, do we only want the LabApp to fail on config file errors? or all JupyterLab subcommands too?

Further, all JupyterLab apps inherit from JupyterApp at some point. We could set this trait at the JupyterApp level so all jupyter applications behave the same.

@vidartf
Copy link
Member

vidartf commented Feb 5, 2019

Meaning, do we only want the LabApp to fail on config file errors? or all JupyterLab subcommands too?

I would say that only having the LabApp fail would be a good start. I think having it on subcommands could become counterproductive. Are there any examples of lab subcommands that will do the wrong thing if the config is incorrect?

@bollwyvl
Copy link
Contributor

bollwyvl commented Feb 5, 2019 via email

@Madhu94
Copy link
Contributor

Madhu94 commented Mar 4, 2019

@bollwyvl, for the example you mentioned - jupyter lab buildand jupyter labextension don't look up the config file for app_dir, either JUPYTERLAB_DIR has to be set or the --app-dir flag needs to be passed in.

Do any of the other subcommands look into the config file?

We could set this trait at the JupyterApp level so all jupyter applications behave the same.

So the change would be in jupyter_core instead ?

@goanpeca
Copy link
Member

goanpeca commented Jun 8, 2021

Wondering what is the current state of this issues :)

Was this implemented @jupyterlab/committers ?

@vidartf
Copy link
Member

vidartf commented Jun 17, 2022

I think this can be closed now? After Ian's fix in jupyter-core, I think we can now just set JupyterApp.raise_config_file_errors=True, and it should fail as expected (though I haven't actually confirmed this).

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

No branches or pull requests

6 participants