-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
211 lines (167 loc) · 7.47 KB
/
mise.toml
File metadata and controls
211 lines (167 loc) · 7.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
[settings]
experimental = true
[hooks]
postinstall = "if [ -z \"$CI\" ]; then lefthook install --force; fi"
[env]
# GDK root directory. Override with an absolute path, e.g: export GDK_ROOT=$HOME/workspace/gdk
# Do not use ~ (tilde is not expanded in variable values).
GDK_ROOT_RESOLVED = "{{env.GDK_ROOT | default(value=env.HOME ~ '/gitlab/gdk')}}"
# Path to Siphon repository for proto compilation (siphon-proto crate)
# Clone from: https://gitlab.com/gitlab-org/analytics-section/siphon
SIPHON_PROTO_ROOT = "{{env.GDK_ROOT | default(value=env.HOME ~ '/gitlab/gdk')}}/siphon"
[tools]
"rust" = { version = "1.93.0", components = "rustfmt,clippy", targets = "aarch64-unknown-linux-gnu,x86_64-unknown-linux-gnu" }
"cargo:cargo-nextest" = "0.9.123"
"cargo:cargo-edit" = "0.13.8"
"cargo:cargo-audit" = "0.22.0"
"cargo:cargo-deny" = "0.19.0"
"cargo:cargo-geiger" = "0.13.0"
"cargo:cargo-cyclonedx" = "0.5.7"
"cargo:cargo-zigbuild" = "0.21.5"
"cargo:ast-grep" = "0.42.0"
"sccache" = "0.13.0"
"tilt" = "0.36.1"
"zig" = "0.15.2"
clickhouse = "25.12"
uv = "0.9.28"
node = "24"
vale = "3.13.0"
lychee = "0.21.0"
lefthook = "2.1.3"
protoc = "34.1"
jq = "1.7"
[tasks."hooks:install"]
run = ["lefthook install", "cp scripts/hooks/post-checkout $(git rev-parse --git-common-dir)/hooks/post-checkout"]
description = "Install git hooks (lefthook + worktree support)"
[tasks.build]
run = "cargo build --release"
description = "Build the crates"
[tasks.test]
run = "./scripts/run-unit-tests.sh"
description = "Run unit + non-Docker integration tests (auto-discovers test targets)"
[tasks."test:fast"]
run = "CARGO_PROFILE_TEST_DEBUG=0 CARGO_PROFILE_TEST_SPLIT_DEBUGINFO=unpacked ./scripts/run-unit-tests.sh"
description = "Run unit + non-Docker integration tests with reduced debug info"
[tasks."test:local"]
run = "cargo nextest run --test local"
description = "Run local integration tests — compiler + querying pipeline (no Docker)"
[tasks."test:integration"]
run = "cargo nextest run --all-features --test containers --no-fail-fast --retries 0"
env = { DOCKER_HOST = "unix://{{env.HOME}}/.colima/gkg/docker.sock" }
description = "Run integration tests (requires Docker and `mise colima:start`)"
[tasks."test:integration:server"]
run = "cargo nextest run --all-features --test containers -j 4 --no-fail-fast --retries 0 -E 'test(data_correctness) | test(hydration_integration) | test(redaction_integration) | test(graph_formatter)'"
env = { DOCKER_HOST = "unix://{{env.HOME}}/.colima/gkg/docker.sock" }
description = "Run server integration tests (data correctness, hydration, redaction, graph formatter)"
[tasks.clean]
run = ["cargo clean", "rm -rf lib/*/"]
description = "Clean the crates"
[tasks."lint:fmt"]
run = "cargo fmt --all -- --check"
description = "Check Rust formatting"
[tasks."lint:code"]
run = "cargo clippy --all-targets --all-features -- -D warnings"
description = "Run clippy lint checks"
[tasks."lint:code:fix"]
run = [
"cargo fmt",
"cargo clippy --all-targets --all-features --fix --allow-dirty -- -D warnings",
"cargo fmt",
]
description = "Run clippy lint checks and fix applicable issues"
[tasks."fix:newlines"]
run = "gitlab-xtasks lint verify-newlines --file-extensions rs,md,yml,yaml,toml,astro,js,ts,json,mdx,vue,rb,css,mjs --directory . --fix"
description = "Fix newlines formatting in the codebase"
[tasks."local:index:repo"]
run = 'cargo run --release --bin orbit -- index ${usage_repo_path?} --stats'
description = "Index a local repository"
usage = 'arg "<repo_path>"'
[tasks."diff:branch"]
run = "git diff --unified=0 origin/${usage_base:-main}...HEAD $(xargs < .gitdiffignore) > git_diff_full.txt"
description = "Diff current branch against an origin branch (default: main)"
usage = 'arg "[base]" default="main" help="Branch on origin to diff against"'
[tasks."query:profile"]
run = 'cargo run -p query-profiler -- "$@"'
description = "Profile a GKG query against ClickHouse (use -- to pass args)"
[tasks."query:diff"]
run = 'python3 scripts/devtools/diff-profiler-results.py "$@"'
description = "Compare query-profiler result files (use -- to pass args)"
[tasks."perf:gtime"]
run = "./scripts/devtools/gtime.sh"
[tasks."perf:rss"]
run = './scripts/devtools/average_rss.sh ${usage_repo_path?} ${usage_interval:-0.025}'
description = "Measure average RSS memory usage during indexing"
usage = '''
arg "<repo_path>"
arg "[interval]" default="0.025" help="Sampling interval in seconds"
'''
[tasks."proto:ruby"]
run = '''
mkdir -p crates/gkg-server/proto/ruby
protoc --ruby_out=crates/gkg-server/proto/ruby \
--grpc_out=crates/gkg-server/proto/ruby \
--plugin=protoc-gen-grpc=$(which grpc_ruby_plugin) \
-I crates/gkg-server/proto \
crates/gkg-server/proto/gkg.proto
echo "Ruby proto files generated in crates/gkg-server/proto/ruby/"
'''
description = "Generate Ruby protobuf files for Rails client"
[tasks."proto:build-gem"]
run = '''
BUNDLE_GEMFILE=tools/protogem/Gemfile bundle install --quiet
ruby tools/protogem/build-proto-gem
'''
description = "Build gitlab-gkg-proto Ruby gem from proto definitions"
[tasks."proto:publish-gem"]
depends = ["proto:build-gem"]
run = 'gem push _build/gitlab-gkg-proto-*.gem'
description = "Publish gitlab-gkg-proto gem to RubyGems.org"
[tasks."server:start"]
run = 'GKG_GITLAB__JWT__VERIFYING_KEY=${GKG_GITLAB__JWT__VERIFYING_KEY:-$(cat $GDK_ROOT_RESOLVED/gitlab/.gitlab_knowledge_graph_secret 2>/dev/null || cat $GDK_ROOT_RESOLVED/gitlab/.gitlab_shell_secret 2>/dev/null || echo "development-secret-at-least-32-bytes")} cargo run -p gkg-server'
description = "Start the GKG server (webserver mode)"
[tasks."server:dispatch"]
run = './scripts/run-dispatcher.sh'
description = "Start the GKG server (dispatch-indexing mode)"
[tasks."ontology:validate"]
run = "find config/ontology -name '*.yaml' ! -name 'reference.yaml' | xargs uvx check-jsonschema --verbose --schemafile config/schemas/ontology.schema.json"
description = "Validate ontology YAML files against JSON schema"
[tasks."e2e:setup"]
run = "cargo xtask e2e setup"
description = "Set up the full E2E environment (cluster, GitLab, GKG stack)"
[tasks."e2e:teardown"]
run = "cargo xtask e2e teardown"
description = "Tear down the full E2E environment (cluster, GitLab, GKG stack)"
[tasks."e2e:test"]
run = "cargo xtask e2e test"
description = "Run E2E redaction tests (assumes environment is up)"
[tasks."e2e:rebuild:gkg"]
run = "cargo xtask e2e rebuild --gkg"
description = "Rebuild GKG image and restart GKG pods"
[tasks."e2e:rebuild:rails"]
run = "cargo xtask e2e rebuild --rails"
description = "Rebuild Rails CNG images and helm upgrade GitLab"
[tasks."e2e:rebuild:all"]
run = "cargo xtask e2e rebuild --gkg --rails"
description = "Rebuild both Rails CNG and GKG images"
[tasks."colima:start"]
run = "colima start gkg --memory 12"
description = "Start gkg Colima instance for integration tests"
[tasks."colima:stop"]
run = "colima stop gkg"
description = "Stop gkg Colima instance"
[tasks."colima:status"]
run = "colima list"
description = "Show status of all Colima instances"
[tasks."lint:markdown"]
run = "npx markdownlint-cli2@0.19.0 '**/*.md'"
description = "Run markdownlint on all markdown files"
[tasks."lint:vale"]
run = "vale --minAlertLevel error ."
description = "Run Vale prose linting on markdown files"
[tasks."lint:links"]
run = "lychee --offline --include-fragments --exclude-path output --exclude-path .claude --exclude-path .opencode '**/*.md'"
description = "Check for broken links in markdown files"
[tasks."lint:docs"]
depends = ["lint:markdown", "lint:vale", "lint:links"]
run = "echo 'All doc linters passed'"
description = "Run all documentation linters"