From e806c01506d33686ac60facb06e1b6e77479b007 Mon Sep 17 00:00:00 2001 From: Amit Srivastava Date: Tue, 1 Oct 2024 16:48:53 -0700 Subject: [PATCH] [computes] Fixed the typo in picking compute display-name --- .../core/src/desktop/management/commands/sync_warehouses.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop/core/src/desktop/management/commands/sync_warehouses.py b/desktop/core/src/desktop/management/commands/sync_warehouses.py index f1159fca3c9..7b1c0412b9a 100644 --- a/desktop/core/src/desktop/management/commands/sync_warehouses.py +++ b/desktop/core/src/desktop/management/commands/sync_warehouses.py @@ -110,9 +110,10 @@ def get_computes_from_k8s(): try: namespace = n.metadata.name LOG.info('Getting details for ns: %s' % namespace) + display_name = n.metadata.labels.get('displayName') item = { - 'name': n.metadata.labels.get('displayname', namespace), - 'description': '%s (%s)' % (n.metadata.labels.get('displayname'), n.metadata.name), + 'name': display_name if display_name else namespace, + 'description': '%s (%s)' % (display_name, namespace) if display_name else namespace, 'external_id': namespace, # 'creation_timestamp': n.metadata.labels.get('creation_timestamp'), }