Ivan Dzikovsky created ZEPPELIN-5977:
Summary: The "Import New Note" window unexpectedly closes in
multi-user env
Key: ZEPPELIN-5977
URL: https://issues.apache.org/jira/browse/ZEPPELIN-5977
Project: Zeppelin
Issue Type: Bug
Components: front-end
Affects Versions: 0.10.1
Reporter: Ivan Dzikovsky
*Steps to reproduce*
# Open Zeppelin UI and click on "Import note" link in start page. You should
see "Import New Note" popup.
# Open another instance of Zeppelin and try to import another note at the same
time, rename folder or another note or create new note.
*Expected result*
In the first tab nothing should happen.
*Actual result*
Expected result
"Import New Note" window in the first Zeppelin tab get closed without any
reason.
*Business justification*
This is not a big deal when Zeppelin used by one user, but it became a problem
when there are a lot of users who try to use Zeppelin at the same time.
*Root cause*
It seems like workflow for that popup was designed in the following way:
# User opens popup
# User drags notebook file into popup
# Notebook file gets uploaded to Zeppelin backend
# On success, backend respond with "{{NOTES_INFO}}" message with updated
information about list of available notebooks
# Message of "{{NOTES_INFO}}" type triggers closing of that popup (this
happens in
[note-import.controller.js|https://github.com/apache/zeppelin/blob/579074e/zeppelin-web/src/components/note-import/note-import.controller.js#L149]
and
[websocket-event.factory.js|https://github.com/apache/zeppelin/blob/579074e/zeppelin-web/src/components/websocket/websocket-event.factory.js#L76]).
And the flaw of this design is that there are a lot of events which can trigger
"{{NOTES_INFO}}" message to do the update of an info about available notes, so
it happens not only after notebook was successfully uploaded through "Import
New Note" popup.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)