[HUE-658] [fb] Hue should display hadoop fs errors in a popup and not in a 500

Review Request #1979 - Created April 4, 2012 and submitted

Romain Rigaux
old-hue-rw
HUE-658
hue
bcwalrus
commit 02816c9ab87a6e21239257c3dbe8c270d3ca53cd
Author: Romain Rigaux <romain@cloudera.com>
Date:   Thu Apr 5 15:13:25 2012 -0700

    [HUE-658] [fb] Hue should display hadoop fs errors in a popup and not in a 500
    
    Display any browsing related fs error in a popup.

:100755 100755 55e8858... 1d66aaa... M  apps/filebrowser/src/filebrowser/views.py
:100644 100644 076c1b9... 291f903... M  apps/filebrowser/src/filebrowser/views_test.py
visual testing
unit test
  • 1
  • 0
  • 1
  • 0
  • 2
Description From Last Updated
Perhaps we should also change this to PopupException, too? This is a legit error if a user is viewing a ... bc Wong
  1. 
      
  2. apps/filebrowser/src/filebrowser/views.py (Diff revision 1)
     
     
     
    Perhaps we should also change this to PopupException, too? This is a legit error if a user is viewing a file while another one is deleting it.
    
    And how do we know that all IOErrors mean file not found?
  3. Would it work if you only catch WebHdfsException and URLError?
  4. 
      
  1. Btw, it shouldn't be too hard to write a unit test for this. You can trigger errors by accessing a bogus path and files you have no permission to, and then verify the result page. Check filebrowser/views_test.py.
    1. Tests for no permission and file not found added.
  2. 
      
  1. Thanks!
  2. Would avoid checking HTML output, because that is quite fragile. When bootstrap makes an incompatible change again, we don't want to have to fix all tests.
    1. I see, the 2 HTML asserts were removed.
  3. 
      
Review request changed

Status: Closed (submitted)

Loading...