Skip to content

Commit cf2a379

Browse files
authored
[HUD][CH] Update README with ClickHouse information (#6092)
Also add a comment in the .env file for clarity
1 parent c922275 commit cf2a379

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

torchci/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ OPENSEARCH_REGION=
2828
OPENSEARCH_USERNAME=
2929
OPENSEARCH_PASSWORD=
3030

31+
# Secrets for making queries to ClickHouse. They can be found on Vercel
3132
CLICKHOUSE_HUD_USER_URL=
3233
CLICKHOUSE_HUD_USER_USERNAME=
3334
CLICKHOUSE_HUD_USER_PASSWORD=

torchci/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,25 @@ console.
100100
3. Download the query with `yarn node scripts/downloadQueryLambda.mjs <workspace> <queryname> <version>`. (You can skip `<version>` if you want the latest version). This will auto-update sql and lambda files in the `rockset/<workspace>` dir and the query version in `rockset/prodVersion.json`.
101101
4. Commit the updated files.
102102

103+
## How to edit ClickHouse queries
104+
105+
If you are familiar with the old setup for Rockset, ClickHouse does not have
106+
versioned query lambdas. Instead, queries are defined in `clickhouse_queries/`
107+
and HUD sends the entire query text to ClickHouse in the same way Rockset did
108+
for queries not defined using a query lambda.
109+
110+
Each query should have a folder in `clickhouse_queries/` with two files: one
111+
containing the query and the other containing a json dictionary mapping
112+
parameters to their types.
113+
114+
To edit the query, only these files need to be changed. The change will be
115+
reflected immediately in your local development and in the Vercel preview when
116+
you submit your PR.
117+
118+
If you want to test your query in ClickHouse Cloud's console, you need to copy
119+
the query text into the console. If you make changes, you will have to copy the
120+
query back into the file.
121+
103122
## Alerts
104123

105124
Code is in `test-infra/tools/torchci/check_alerts.py`. It queries HUD, filters out pending jobs, and then checks to see if there are 2 consecutive

0 commit comments

Comments
 (0)