IBM / jupyterlab-s3-browser

A JupyterLab extension for browsing S3-compatible object storage
Apache License 2.0
122 stars 41 forks source link

Pass errors to jupyterlab interface? #68

Open rabernat opened 2 years ago

rabernat commented 2 years ago

Thanks you for providing this extremely useful labextension! 🙏 @yuvipanda and I checked it out yesterday on a 2i2c JupyterHub and were presently surprised when things "just worked" for many scenarios. I am opening this issue to share a specific point of feedback from our first experience.

Is your feature request related to a problem? Please describe.

It is very common to encounter errors related to incorrect credentials, wrong endpoints, etc. when working with s3. In its current configuration, this extension prints those errors to a log on the server side. In many contexts (e.g. jupyterhub on kubernetes), it is impossible for the user to see these errors. In these cases, things fail silently, with no feedback to the user. This was my experience yesterday as a hub user. However, when Yuvi (hub admin) ran kubectl to examine the logs, he saw useful information like,

It is a problem that users can't see these errors, because it makes it much harder to debug problems connecting to s3.

Describe the solution you'd like

I would like to see the errors logged to the jupyterlab UI somehow. Ideally there would be a little "log" panel somewhere where all these messages are collected. Even better would be a "verbose" option to enable logging of even successful s3 API calls.

Describe alternatives you've considered

I suppose an alternative would be to configure the hub in such a way that users can see all of the server-side logs from their notebooks server. TBH this would not be a bad idea either--however, it would probable require some serious upstream changes to jupyterhub itself.