[Bug]: Interactive Mode is not properl detecting `is_in_notebook` with Jupyter Enterprise Gateway
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
### What happened?
Interactive mode is not properly identifying it is running inside an IPython notebook when you are using an external Kernel using (Jupyter Enterprise Gateway)(https://jupyter-enterprise-gateway.readthedocs.io/en/latest/).
It seems the following code:
```python
if is_in_ipython():
# The import and usage must be valid under the execution path.
from IPython import get_ipython
if 'IPKernelApp' in get_ipython().config:
is_in_notebook = True
```
is not working on JEG cause the currently running IPython process doesn't have a KernelApp initialized in the same way.
Not exactly of the fix but there might either other way of identifying the running state or a way to enforce the running mode no matter what's being detected.
### Issue Priority
Priority: 3 (minor)
### Issue Components
- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
Contributor guide
Assessment
This issue has not been assessed yet.