Fix schema stats page error on loading data - #94
Closed
vaibhavmashal wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses the schema stats page failing to load by updating the ClickHouse “available tables” query to return the fields the frontend expects (notably name plus size/row/engine/partition metadata). It also changes how the frontend Docker image is built and run.
Changes:
- Expand
AVAILABLE_TABLES_SQLto returnname(aliased),total_bytes,readable_bytes,total_rows,engine, andpartition_key. - Update
frontend/Dockerfileto use a Node base image and serve the built static assets on port 3000.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
housewatch/clickhouse/queries/sql.py |
Extends the available-tables query to include frontend-required fields and aliases. |
frontend/Dockerfile |
Switches to a runnable container that serves the built frontend with serve on port 3000. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1
to
+8
| FROM node:20-alpine | ||
|
|
||
| WORKDIR /frontend | ||
|
|
||
| RUN npm install -g serve | ||
| COPY build/ build/ | ||
|
|
||
| CMD ["echo", "Serve the files from /frontend/build, don't run this container directly"] No newline at end of file | ||
| CMD ["serve", "-s", "build", "-l", "3000"] No newline at end of file |
|
|
||
| WORKDIR /frontend | ||
|
|
||
| RUN npm install -g serve |
vaibhavmashal
force-pushed
the
fix-schema-stats
branch
from
September 3, 2026 17:02
30d9ea9 to
ff1e57b
Compare
Author
|
Rebased the branch onto upstream \main\ to cleanly isolate the changes to \AVAILABLE_TABLES_SQL\ in \housewatch/clickhouse/queries/sql.py\ and remove the unrelated frontend Dockerfile commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #70.
The frontend expects a
ame\ field and extra table stats (\ otal_bytes, \ otal_rows, \engine, \partition_key) when retrieving available tables, but \AVAILABLE_TABLES_SQL\ previously only returned \database\ and \ able. This PR updates the query to return these fields as well (aliasing \ able\ to
ame), ensuring the frontend can load data correctly without breaking.