From c8a36260ee4ad41dcf8feca06873ef1bcdb96d24 Mon Sep 17 00:00:00 2001 From: Romain Rigaux Date: Fri, 4 Jun 2021 18:12:53 +0200 Subject: [PATCH] [fs] Stringify the user to get proper username key --- desktop/core/src/desktop/lib/fsmanager.py | 2 +- desktop/libs/aws/src/aws/s3/s3connection.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/core/src/desktop/lib/fsmanager.py b/desktop/core/src/desktop/lib/fsmanager.py index ef963b6f486..4ec327f7376 100644 --- a/desktop/core/src/desktop/lib/fsmanager.py +++ b/desktop/core/src/desktop/lib/fsmanager.py @@ -46,7 +46,7 @@ # FIXME: Should we check hue principal for the default user? # FIXME: Caching via username has issues when users get deleted. Need to switch to userid, but bigger change def _get_cache_key(fs, identifier, user=_DEFAULT_USER): - return fs + ':' + identifier + ':' + user + return fs + ':' + identifier + ':' + str(user) def clear_cache(): diff --git a/desktop/libs/aws/src/aws/s3/s3connection.py b/desktop/libs/aws/src/aws/s3/s3connection.py index 47b33dfbfdf..54f1ab97b16 100644 --- a/desktop/libs/aws/src/aws/s3/s3connection.py +++ b/desktop/libs/aws/src/aws/s3/s3connection.py @@ -107,15 +107,15 @@ def make_request(self, method, bucket='', key='', headers=None, data='', if isinstance(key, Key): key = key.name path = self.calling_format.build_path_base(bucket, key) - boto.log.debug('path=%s' % path) + LOG.debug('path=%s' % path) auth_path = self.calling_format.build_auth_path(bucket, key) - boto.log.debug('auth_path=%s' % auth_path) + LOG.debug('auth_path=%s' % auth_path) host = self.calling_format.build_host(self.server_name(), bucket) if query_args: path += '?' + query_args - boto.log.debug('path=%s' % path) + LOG.debug('path=%s' % path) auth_path += '?' + query_args - boto.log.debug('auth_path=%s' % auth_path) + LOG.debug('auth_path=%s' % auth_path) params = {} http_request = self.build_base_http_request(method, path, auth_path,