HUE-8946 [useradmin] Fix arguement as list in import_ldap_user and import_ldap_group

Review Request #14279 - Created Sept. 10, 2019 and updated

Ying Chen
hue
master
HUE-8946
hue
jgauthier, johan, romain, weixia
commit 2e7bc053bce0d3bb021f9a09f75fb7d12d4e35dd (HEAD -> fix_import_ldap_group_HUE-8946)
Author: Ying Chen <yingchen@cloudera.com>
Date:   Tue Sep 10 11:06:11 2019 -0700

    HUE-8946 [useradmin] Fix arguement as list in import_ldap_user and import_ldap_group

:100644 100644 36ab9ace6f... df0abf5f94... M    apps/useradmin/src/useradmin/management/commands/import_ldap_group.py
:100644 100644 c2daf232f2... 474201de8e... M    apps/useradmin/src/useradmin/management/commands/import_ldap_user.py
Fix error: 
    AttributeError: 'list' object has no attribute 'replace'
    
hue/build/env/bin/hue import_ldap_group euser_grp --import-members --sync-users
pydev debugger: process 29551 is connecting

Connected to pydev debugger (build 183.5912.18)
[10/Sep/2019 10:50:33 -0700] settings     DEBUG    DESKTOP_DB_TEST_NAME SET: /Users/yingchen/mtv_cloudera/CDH6.1.x/hue/desktop/desktop-test.db
[10/Sep/2019 10:50:33 -0700] settings     DEBUG    DESKTOP_DB_TEST_USER SET: hue_test
[10/Sep/2019 10:50:34 -0700] decorators   INFO     AXES: BEGIN LOG
[10/Sep/2019 10:50:34 -0700] decorators   INFO     Using django-axes 2.2.0
[10/Sep/2019 10:50:37 -0700] __init__     INFO     Couldn't import snappy. Support for snappy compression disabled.
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop_auth_views_dt_login ^hue/accounts/login>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^accounts/login/$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^accounts/logout/$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^profile$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^login/oauth/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^login/oauth_authenticated/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^hue/oidc_failed>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop_views_home2 ^home/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop_views_home ^home2$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^home_embeddable$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop.views.log_view ^logs$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/log_analytics$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/log_js_error$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop.views.dump_config ^desktop/dump_config$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/download_logs$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/get_debug_level>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/set_all_debug>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/reset_all_debug>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^bootstrap.js$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/status_bar/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/debug/is_alive$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/debug/is_idle$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop.views.threads ^desktop/debug/threads$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/debug/memory$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop.views.check_config ^desktop/debug/check_config$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/debug/check_config_ajax$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/log_frontend_event$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^assist_m>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop_views_hue ^hue.*/$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^403$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^404$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^500$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^ko_editor>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^ko_metastore>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^jasmine>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/globalJsConstants.js>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/workers/aceSqlLocationWorker.js>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/workers/aceSqlSyntaxWorker.js>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop_views_unsupported ^boohoo$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop_views.index ^$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/tag/add_tag$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/tag/remove_tag$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/doc/tag$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/doc/update_tags$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/doc/get$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/doc/update_permissions>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/open?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/docs/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/move/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/mkdir/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/update/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/delete/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/copy/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/restore/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/share/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/get_config/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/context/namespaces/(?P<interface>\w+)/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/context/computes/(?P<interface>\w+)/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/context/clusters/(?P<interface>\w+)/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern desktop.api2.user_preferences ^desktop/api2/user_preferences/(?P<key>\w+)?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/export/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api2/doc/import/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/search/entities/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/search/entities_interactive/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^editor>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/configurations/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/configurations/user/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/configurations/delete/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern useradmin_views_list_for_autocomplete ^desktop/api/users/autocomplete>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/users/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/vcs/contents/?$>
[10/Sep/2019 10:50:38 -0700] urls         DEBUG    Dynamic pattern: <RegexURLPattern None ^desktop/api/vcs/authorize/?$>
[10/Sep/2019 10:50:49 -0700] views        DEBUG    Importing user CN=ying test,OU=test,OU=Test,DC=ad,DC=cloudera,DC=com
[10/Sep/2019 10:50:49 -0700] views        DEBUG    Importing user CN=second enduser,OU=test,OU=Test,DC=ad,DC=cloudera,DC=com
[10/Sep/2019 10:50:49 -0700] views        DEBUG    Importing user CN=enduser one,OU=test,OU=Test,DC=ad,DC=cloudera,DC=com
  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
  1. 
      
  2. Correct way to fix should be https://github.com/cloudera/hue/commit/e0f6aa3360ede625500af751b0eea05b2d3834bd#diff-4a7857d6ea82870c5520caacf7e4a041R36 ?

  3. 
      
Review request changed

Summary:

-HUE-8946 [useradmin] Fix arguement as list in import_ldap_group
+HUE-8946 [useradmin] Fix arguement as list in import_ldap_user and import_ldap_group

Description:

~  

commit f64b784cf4c279bfc3dda49f8c8ce83262dde253 (HEAD -> fix_import_ldap_group_HUE-8946)

  ~

commit 2e7bc053bce0d3bb021f9a09f75fb7d12d4e35dd (HEAD -> fix_import_ldap_group_HUE-8946)

    Author: Ying Chen yingchen@cloudera.com
    Date: Tue Sep 10 11:06:11 2019 -0700

   
~  
HUE-8946 [useradmin] Fix arguement as list in import_ldap_group
  ~
HUE-8946 [useradmin] Fix arguement as list in import_ldap_user and import_ldap_group
   
~  

:100644 100644 36ab9ace6f... b493482659... M apps/useradmin/src/useradmin/management/commands/import_ldap_group.py

  ~

:100644 100644 36ab9ace6f... df0abf5f94... M apps/useradmin/src/useradmin/management/commands/import_ldap_group.py

  + :100644 100644 c2daf232f2... 474201de8e... M apps/useradmin/src/useradmin/management/commands/import_ldap_user.py

Diff:

Revision 2 (+2 -2)

Show changes

  1. Ship It!
  2. 
      
  1. arguement --> argument

  2. 
      
Loading...