From aa0e46a87dff313fdff5d1756125d1347b5ef3c9 Mon Sep 17 00:00:00 2001 From: "Mariano Z." Date: Tue, 21 Oct 2025 09:19:45 -0300 Subject: [PATCH] dev: automated commit - 2025-10-21 09:19:45 --- .gitattributes | 1 + .../bin/generate_tinyrdm_connections.py | 53 ++++++++++-------- rbw/.config/rbw/config.json | Bin 221 -> 244 bytes 3 files changed, 32 insertions(+), 22 deletions(-) diff --git a/.gitattributes b/.gitattributes index 4acdf4f..265a9dc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,6 +6,7 @@ zsh/.config/zsh/zsh_history* filter=git-crypt diff=git-crypt config/.config/sdm-ui.yaml filter=git-crypt diff=git-crypt config/.config/ngrok/ngrok.yml filter=git-crypt diff=git-crypt aws/.aws/config filter=git-crypt diff=git-crypt +rbw/.config/rbw/config.json filter=git-crypt diff=git-crypt # Add any new paths for sensitive files in your new modules # For example, if you have API tokens in new locations: diff --git a/local-bin/.local/bin/generate_tinyrdm_connections.py b/local-bin/.local/bin/generate_tinyrdm_connections.py index d785008..e499eda 100755 --- a/local-bin/.local/bin/generate_tinyrdm_connections.py +++ b/local-bin/.local/bin/generate_tinyrdm_connections.py @@ -108,22 +108,28 @@ def group_connections(connections): groups = defaultdict(list) for conn in connections: - if conn['customer'] == 'internal': - group_name = 'Internal' + # Mirror DBeaver grouping: internal/features -> 'internal', otherwise by customer, else 'other' + if conn['customer'] == 'internal' or conn['customer'].startswith('feature'): + group_name = 'internal' + elif conn['stage'] in ['stage', 'production']: + group_name = conn['customer'] + else: + group_name = 'other' + + # Keep stage-based color coding + if conn['stage'] == 'internal': conn_stage = 'internal' - elif conn['stage'] in ['stage']: - group_name = 'Stage' + elif conn['stage'] == 'stage': conn_stage = 'stage' - elif conn['stage'] in ['production']: - group_name = 'Production' + elif conn['stage'] == 'production': conn_stage = 'production' else: - continue + conn_stage = 'unknown' conn_yaml = create_connection_yaml( - conn['name'], - conn['addr'], - conn['port'], + conn['name'], + conn['addr'], + conn['port'], conn_stage ) @@ -133,19 +139,22 @@ def group_connections(connections): def generate_yaml_content(groups): yaml_lines = [] - group_order = ['Internal', 'Stage', 'Production'] + # Prefer 'internal' first, then alphabetical by customer + ordered_groups = [] + if 'internal' in groups: + ordered_groups.append('internal') + ordered_groups.extend(sorted([g for g in groups.keys() if g != 'internal'])) - for group_name in group_order: - if group_name in groups: - yaml_lines.append(f"- name: {group_name}") - yaml_lines.append(" last_db: 0") - yaml_lines.append(" type: group") - yaml_lines.append(" connections:") - - for conn_yaml in groups[group_name]: - yaml_lines.append(conn_yaml) - - yaml_lines.append("") + for group_name in ordered_groups: + yaml_lines.append(f"- name: {group_name}") + yaml_lines.append(" last_db: 0") + yaml_lines.append(" type: group") + yaml_lines.append(" connections:") + + for conn_yaml in groups[group_name]: + yaml_lines.append(conn_yaml) + + yaml_lines.append("") return '\n'.join(yaml_lines) diff --git a/rbw/.config/rbw/config.json b/rbw/.config/rbw/config.json index 67037d7e380e123ebaeab2cf56f60946a5963c9a..47474818808eb7c2543f8c90d6d42dcfac5c86ec 100644 GIT binary patch literal 244 zcmVd(Z@1Q@|z4!w6oVRbx3ir_FL(%3Gnh{Wn8fdu1j%3c@}g89EgIwu|r;Hl`N<2)(3<@$zq z{yDP0#?uuV#vDx3K4RtmDWm}y#GV?4&XHDK#xz6e21!vFvP