You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "ParkGyeongTae (via GitHub)" <gi...@apache.org> on 2025/06/15 01:28:19 UTC

[PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

ParkGyeongTae opened a new pull request, #4947:
URL: https://github.com/apache/zeppelin/pull/4947

   ### What is this PR for?
   This PR fixes a UI bug where notebook and folder names that contain spaces are displayed with the URL-encoded text %20 in the notebook tree (e.g., Flink%20Tutorial).
   We now URL-decode the VFS path and keep the existing Windows-specific prefix handling, so names with spaces render correctly across all platforms.
   
   ### What type of PR is it?
   Bug Fix
   
   ### Todos
   * [x] - Add URL-decode logic in path normalisation
   
   ### What is the Jira issue?
   * Jira: https://issues.apache.org/jira/browse/ZEPPELIN/ZEPPELIN-6202
   
   ### How should this be tested?
   * Build this branch and start Zeppelin.
   * Create or import a notebook whose name contains a space (e.g., “Python Tutorial”).
   
   ### Screenshots (if appropriate)
   Before
   ![image](https://github.com/user-attachments/assets/f1fba587-fd88-4034-b224-f2edc08e5f1d)
   After
   ![image](https://github.com/user-attachments/assets/0577c8c2-6f48-475f-b47e-30afd144bfd3)
   
   ### Questions:
   * Does the license files need to update? No.
   * Is there breaking changes for older versions? No.
   * Does this needs documentation? No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3044374188

   Yes, I'm seeing the same. The paths are shown in the URI encoded format as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3042313217

   @ParkGyeongTae After checking with the dubugger, I found that the reason why the path of a newly created note after startup appears correctly is because the `Note` instance is not initialized using the path from the `.getURI()` method. Instead, the path from the web app(from the user) is used to initialize the `Note` instance, and this path remains unchanged when returned to the web app. So I believe we just need to fix the previously claimed bugs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3113077520

   It's good to hear that it works on MacOS. I would be interested to know whether it also works on Windows. As far as I know, Windows itself is not supported by Zeppelin, but we shouldn't break any functions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3097184378

   > @Reamer I tested it by replacing getURI() with getPath(), and everything works fine on my platform.
   
   Which platform did you use?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3042322540

   And I've checked the returned instance from `.getName()` method on both the Windows and MacOS.
   
   - On MacOS.
   ![image](https://github.com/user-attachments/assets/72b8ef09-3720-49d8-84d9-b4fc2c67522c)
   
   - On Windows.
   ![image](https://github.com/user-attachments/assets/9924e106-0fc0-42b1-ac9d-661fecb7abf6)
   
   Based on this, maybe we could somehow join the `rootFile` and `absolutePath` properties to construct the path, instead of relying on the `.getURI()` method.
   To be safe, it might be worth checking on other OSs as well, such as linux distros.
   
   Note: On Windows with Korean locale, backslashes (`\`) are displayed as won signs (`₩`), but they are still regular path separators.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3041483275

   @Reamer 
   I checked out the master branch and ran it after building in IntelliJ. I'll look into this issue further.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3131114475

   Merged into master and branch-0.12


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3112536710

   @Reamer 
   I'm using a MacBook M4 Pro with macOS.
   Do you want to check how it behaves when built on Windows?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3113684212

   The latest revision breaks the `getNotePath()` method because `rootNotebookFolder` doesn't align with `noteFileName`.
   
   - On Windows:
     - `rootNotebookFolder` : `/C:/Users/chanlee/...`
     - `noteFileName`: `/Users/chanlee/...`
     - => The prefixes don't match.
   
   IF we try to fix this by setting `rootNotebookFolder` using `getName().getPath()` also, the `/C:` segment gets dropped, which breaks file access.
   (This effectively reverts the fix from #3615 .)
   
   To fix the URL-encoded path issue without breaking things on Windows, we should ensure:
   - `rootNotebookFolder` includes the drive letter (e.g., `C:`) at the beginning.
   - `noteFileName` starts with the same prefix as `rootNotebookFolder`. (If the former includes the drive letter, the latter should as well)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3036138497

   @Reamer 
   I discovered something new. When Zeppelin is running, notebook names with spaces are displayed correctly. However, after shutting down and restarting Zeppelin, the spaces in notebook names are shown as %20.
   
   Interestingly, if I create a new notebook before restarting, the space is displayed properly. But after restarting, even that notebook shows %20 instead of spaces.
   
   To fix this, I modified the NoteInfo.java file located at zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteInfo.java.
   
   What do you think about this approach?
   
   Initial launch
   ![image](https://github.com/user-attachments/assets/3015b2f2-81a5-45e5-b50b-5e1e028a7aba)
   
   Notebook created while running
   ![image](https://github.com/user-attachments/assets/972051b2-56f4-4ed7-86ef-1b5908cd3699)
   
   After restart
   ![image](https://github.com/user-attachments/assets/da7bd985-cfd9-460b-8ad2-e7a51c4118b6)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "tbonelee (via GitHub)" <gi...@apache.org>.
tbonelee commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3015234807

   @Reamer 
   
   Hi Reamer, thanks for the review.
   
   Just a thought-the need for decoding here might stem from the use of `getURI()` instead of `getPath()`, which returns an encoded string. Since encoding alters the original path, decoding it at this point could help restore its intended form. I also noticed that `S3NotebookRepo` provides decoded names, so this seemed consistent-but I haven't checked all other repos, so I may be missing some cases.
   
   Curious to hear your thoughts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3044243514

   @tbonelee 
   Ah, I see. That makes sense now—thank you for the clear explanation!
   I'll revert back to the previous approach where I modified VFSNotebookRepo.java.
   By the way, are you experiencing the same issue as I did?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3095711855

   @ParkGyeongTae Sorry, for the late response.
   Can you try the `getPath()` method on your platform so maybe we can get rid of all the getUri() decode encode stuff? See:
   https://github.com/apache/zeppelin/pull/4947#issuecomment-3020160187


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3096907089

   @Reamer 
   I tested it by replacing getURI() with getPath(), and everything works fine on my platform.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3116689415

   @tbonelee 
   cc. @Reamer 
   Hi Chanho, Thanks a lot for checking this on Windows!
   
   It makes sense now that directly replacing `getURI()` with `getPath()` wouldn't work due to the mismatch between `rootNotebookFolder` and `noteFileName` on Windows. That’s a really helpful insight.
   
   Given that, what do you think about keeping `getURI()` but just applying decoding instead of replacing it with `getPath()`?
   
   Original code:
   ```java
   String noteFileName = fileObject.getName().getURI().replace("file:///", "/");
   ```
   Proposed changed:
   ```java
   String noteFileName = URLDecoder.decode(
       fileObject.getName().getURI(), StandardCharsets.UTF_8
   ).replace("file:///", "/");
   ```
   
   This might fix the encoded path issue without affecting the drive letter or breaking things on Windows. Would love to hear your thoughts!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3020170040

   > I also noticed that S3NotebookRepo provides decoded names, so this seemed consistent-but I haven't checked all other repos, so I may be missing some cases.
   
   I thought the method calls go to a Java native object. But here the vfs library is used. Therefore it must be corrected at this point.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "ParkGyeongTae (via GitHub)" <gi...@apache.org>.
ParkGyeongTae commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3045138832

   @Reamer 
   cc. @tbonelee 
   I’ve tested this on both an Intel MacBook and an M4 MacBook, and the same issue occurs on both. After cloning Zeppelin from GitHub, building it with the default settings, and running it, spaces in note names are shown as %20.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3036315901

   Very strange. Which NotebookRepo and which Zeppelin version are you using? I have never seen %20 in the name of Zeppelin Notes. I have never seen %20 in the name of Zeppelin Notes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3117724070

   Thank you for recreating the behavior on Windows. Making a major code change here would be going too far. We can therefore take the workaround via the URL decoder.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer merged PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ZEPPELIN-6202] Fix %20 showing in notebook tree by URL-decoding note file paths [zeppelin]

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4947:
URL: https://github.com/apache/zeppelin/pull/4947#issuecomment-3020160187

   Javadoc of `getPath()`. 
   ```
       /**
        * Gets the absolute path string of this file, within its file system. This path is normalized, so that {@code .}
        * and {@code ..} elements have been removed. Also, the path only contains {@code /} as its separator character. The
        * path always starts with {@code /}
        * <p>
        * The root of a file system has {@code /} as its absolute path.
        * </p>
        *
        * @return The path. Never returns null.
        */
       String getPath();
   ```
   
   Maybe it was a bug in vfs library. Do you have access to a Windows machine to validate the behaviour of the workaround with `getUri()`?
   
   I would like to get rid of the workaround.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org