Skip to content

Commit a0e0d9a

Browse files
committed
Fix ClickHouse state store build errors
- Add missing metadata.yaml file for component metadata schema - Add ClickHouse to test-info.mjs configuration for CI/CD - Add docker-compose-clickhouse.yml infrastructure setup - Enable conformance and certification testing for ClickHouse This resolves the 'Annotations 5 errors' build failures. Signed-off-by: Mehmet TOSUN <[email protected]>
1 parent 0761432 commit a0e0d9a

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: '3.8'
2+
3+
services:
4+
clickhouse:
5+
image: clickhouse/clickhouse-server:latest
6+
ports:
7+
- "9000:9000"
8+
- "8123:8123"
9+
environment:
10+
- CLICKHOUSE_USER=default
11+
- CLICKHOUSE_PASSWORD=clickhouse_password
12+
- CLICKHOUSE_DB=dapr_test
13+
ulimits:
14+
nofile:
15+
soft: 262144
16+
hard: 262144
17+
healthcheck:
18+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"]
19+
interval: 5s
20+
timeout: 5s
21+
retries: 10

.github/scripts/test-info.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,11 @@ const components = {
623623
certification: true,
624624
conformanceSetup: 'docker-compose.sh cassandra',
625625
},
626+
'state.clickhouse': {
627+
conformance: true,
628+
certification: true,
629+
conformanceSetup: 'docker-compose.sh clickhouse',
630+
},
626631
'state.cloudflare.workerskv': {
627632
conformance: true,
628633
requireCloudflareCredentials: true,

state/clickhouse/metadata.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# yaml-language-server: $schema=../../component-metadata-schema.json
2+
schemaVersion: v1
3+
type: state
4+
name: clickhouse
5+
version: v1
6+
status: stable
7+
title: "ClickHouse"
8+
urls:
9+
- title: Reference
10+
url: https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-clickhouse/
11+
capabilities:
12+
- crud
13+
- etag
14+
- ttl
15+
authenticationProfiles:
16+
- title: "Username and password"
17+
description: "Authenticate using username and password."
18+
metadata:
19+
- name: username
20+
type: string
21+
required: false
22+
description: |
23+
Username for ClickHouse host. Defaults to empty.
24+
example: "default"
25+
default: ""
26+
- name: password
27+
type: string
28+
required: false
29+
sensitive: true
30+
description: |
31+
Password for ClickHouse host. No default. Use secretKeyRef for
32+
secret reference
33+
example: "mypassword"
34+
default: ""
35+
metadata:
36+
- name: clickhouseURL
37+
required: true
38+
description: Connection string for the ClickHouse host
39+
example: "tcp://localhost:9000"
40+
type: string
41+
- name: databaseName
42+
required: true
43+
description: The database name to use. Will be created if database does not exist.
44+
example: "dapr_state_store"
45+
type: string
46+
- name: tableName
47+
required: true
48+
description: The table name to use. Will be created if table does not exist.
49+
example: "state"
50+
type: string

0 commit comments

Comments
 (0)