Skip to content

Conversation

@sakce
Copy link

@sakce sakce commented Dec 1, 2025

Features:

  • Backend: New /api/clusters/topology endpoint with comprehensive topology data

    • Queries system.clusters, system.replicas, system.tables, and system.parts
    • Returns cluster structure, replication status, and table metadata
  • Frontend: Interactive graph visualization using @antv/graphin

    • Three view modes: Cluster Topology, Tables & Databases, Combined View
    • Hierarchical graph showing clusters → shards → replicas
    • Database and table visualization with replication indicators
    • Color-coded health status (green: healthy, yellow: slowdowns, red: errors)
    • Click-to-expand node details in sidebar drawer
    • Supports multiple clusters with dropdown selector
  • Dependencies: Added @antv/g6 (5.0.50) and @antv/graphin (3.0.5) for graph rendering

This view enables ops teams to quickly understand their ClickHouse cluster architecture, identify unhealthy nodes, and visualize data distribution.

Features:
- Backend: New /api/clusters/topology endpoint with comprehensive topology data
  - Queries system.clusters, system.replicas, system.tables, and system.parts
  - Returns cluster structure, replication status, and table metadata

- Frontend: Interactive graph visualization using @antv/graphin
  - Three view modes: Cluster Topology, Tables & Databases, Combined View
  - Hierarchical graph showing clusters → shards → replicas
  - Database and table visualization with replication indicators
  - Color-coded health status (green: healthy, yellow: slowdowns, red: errors)
  - Click-to-expand node details in sidebar drawer
  - Supports multiple clusters with dropdown selector

- Dependencies: Added @antv/g6 (5.0.50) and @antv/graphin (3.0.5) for graph rendering

This view enables ops teams to quickly understand their ClickHouse cluster
architecture, identify unhealthy nodes, and visualize data distribution.
@wiz-7ad640923b
Copy link

wiz-7ad640923b bot commented Dec 1, 2025

Wiz Scan Summary

⚠️ Many findings detected
Many findings were detected, but only a subset of the findings are displayed inline due to API constraints. To view all findings inline, please click here.
Scanner Findings
Vulnerability Finding Vulnerabilities 21 High 32 Medium 6 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Total 21 High 32 Medium 6 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

)
except Exception as e:
logger.error("topology_error", error=str(e))
return Response({"error": str(e)}, status=500)

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.

Copilot Autofix

AI 9 days ago

To fix the problem, modify the response sent to the user in the except block so that it does not include details from the exception object—just a generic message like {"error": "An internal error has occurred."}. Retain detailed error information in logs using logger.error, which already records the stringified exception (optionally, logging the traceback if desired). Only generic and non-sensitive information should be returned to API consumers.

No changes to the functionality are needed except for the API error message in the except block (lines 63) of the topology method in housewatch/api/cluster.py. No new imports are required, as logger is already set up. No additional package installations are needed.


Suggested changeset 1
housewatch/api/cluster.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/housewatch/api/cluster.py b/housewatch/api/cluster.py
--- a/housewatch/api/cluster.py
+++ b/housewatch/api/cluster.py
@@ -60,4 +60,4 @@
             )
         except Exception as e:
             logger.error("topology_error", error=str(e))
-            return Response({"error": str(e)}, status=500)
+            return Response({"error": "An internal error has occurred."}, status=500)
EOF
@@ -60,4 +60,4 @@
)
except Exception as e:
logger.error("topology_error", error=str(e))
return Response({"error": str(e)}, status=500)
return Response({"error": "An internal error has occurred."}, status=500)
Copilot is powered by AI and may make mistakes. Always verify output.
@sakce sakce closed this Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants