Skip to content

Commit d706d7e

Browse files
authored
Merge branch 'main' into main
2 parents 9e34097 + 153dd32 commit d706d7e

462 files changed

Lines changed: 32514 additions & 8148 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/hooks/format-backend.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
# Format backend Rust files with rustfmt after Claude edits them
3+
4+
# Get the file path from the tool result (passed via stdin as JSON)
5+
INPUT=$(cat)
6+
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
7+
8+
# Exit if no file path
9+
if [ -z "$FILE_PATH" ]; then
10+
exit 0
11+
fi
12+
13+
# Check if the file is in the backend directory and is a Rust file
14+
if [[ "$FILE_PATH" == *"/backend/"* ]] && [[ "$FILE_PATH" =~ \.rs$ ]]; then
15+
cd "$CLAUDE_PROJECT_DIR/backend" || exit 0
16+
# Run rustfmt with config from rustfmt.toml (edition=2021)
17+
rustfmt --config-path rustfmt.toml "$FILE_PATH" 2>/dev/null || true
18+
fi
19+
20+
exit 0

.claude/hooks/format-frontend.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# Format frontend files with prettier after Claude edits them
3+
4+
# Get the file path from the tool result (passed via stdin as JSON)
5+
INPUT=$(cat)
6+
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
7+
8+
# Exit if no file path
9+
if [ -z "$FILE_PATH" ]; then
10+
exit 0
11+
fi
12+
13+
# Check if the file is in the frontend directory
14+
if [[ "$FILE_PATH" == *"/frontend/"* ]]; then
15+
# Check if it's a formattable file type
16+
if [[ "$FILE_PATH" =~ \.(ts|js|svelte|json|css|html|md)$ ]]; then
17+
cd "$CLAUDE_PROJECT_DIR/frontend" || exit 0
18+
# Run prettier silently, don't fail the hook if prettier fails
19+
npx prettier --write "$FILE_PATH" 2>/dev/null || true
20+
fi
21+
fi
22+
23+
exit 0

.claude/hooks/notify-user.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
# Notify user when Claude requires input (works on macOS and Linux)
3+
4+
# Check if we're in an SSH session
5+
if [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" || -n "$SSH_CONNECTION" ]]; then
6+
# SSH session - use terminal bell
7+
# If using VSCode, enable audible terminal bell for SSH sessions:
8+
# Add the following to .vscode/settings.json:
9+
# "accessibility.signals.terminalBell": {
10+
# "sound": "on"
11+
# },
12+
# "terminal.integrated.enableVisualBell": true
13+
printf '\a'
14+
else
15+
# Local session - use native notifications
16+
if [[ "$OSTYPE" == "darwin"* ]]; then
17+
osascript -e 'display notification "Claude is waiting for your input" with title "Claude Code" sound name "Glass"' 2>/dev/null || printf '\a'
18+
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
19+
notify-send "Claude Code" "Claude is waiting for your input" 2>/dev/null || printf '\a'
20+
else
21+
printf '\a'
22+
fi
23+
fi
24+
25+
exit 0

.claude/settings.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
"Bash(git log:*)",
2424
"Bash(git branch:*)",
2525
"Bash(git show:*)",
26-
"Bash(git blame:*)"
26+
"Bash(git blame:*)",
27+
"Bash(cargo check:*)",
28+
"mcp__ide__getDiagnostics",
29+
"Bash(npm run generate-backend-client:*)",
30+
"Bash(npm run check:*)"
2731
],
2832
"deny": [
2933
"Read(.env)",
@@ -91,6 +95,34 @@
9195
}
9296
]
9397
}
98+
],
99+
"PostToolUse": [
100+
{
101+
"matcher": "Edit|Write",
102+
"hooks": [
103+
{
104+
"type": "command",
105+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/format-frontend.sh",
106+
"timeout": 30
107+
},
108+
{
109+
"type": "command",
110+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/format-backend.sh",
111+
"timeout": 30
112+
}
113+
]
114+
}
115+
],
116+
"Notification": [
117+
{
118+
"hooks": [
119+
{
120+
"type": "command",
121+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/notify-user.sh",
122+
"timeout": 10
123+
}
124+
]
125+
}
94126
]
95127
},
96128
"enabledPlugins": {

.github/DockerfileBackendTests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VER
4242
RUN /usr/local/bin/python3 -m pip install pip-tools
4343

4444
# Bun
45-
COPY --from=oven/bun:1.2.23 /usr/local/bin/bun /usr/bin/bun
45+
COPY --from=oven/bun:1.3.8 /usr/local/bin/bun /usr/bin/bun
4646

4747
ARG TARGETPLATFORM
4848

.github/workflows/backend-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
with:
3434
fetch-depth: 0
3535

36-
- name: install xmlsec1
36+
- name: install xmlsec1 and gssapi
3737
run: |
3838
sudo apt-get update
39-
sudo apt-get install -y libxml2-dev libxmlsec1-dev
39+
sudo apt-get install -y libxml2-dev libxmlsec1-dev libkrb5-dev libsasl2-dev
4040
4141
- uses: actions-rust-lang/setup-rust-toolchain@v1
4242
with:
@@ -100,10 +100,10 @@ jobs:
100100
token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }}
101101
fetch-depth: 0
102102

103-
- name: install xmlsec1
103+
- name: install xmlsec1 and gssapi
104104
run: |
105105
sudo apt-get update
106-
sudo apt-get install -y libxml2-dev libxmlsec1-dev
106+
sudo apt-get install -y libxml2-dev libxmlsec1-dev libkrb5-dev libsasl2-dev
107107
108108
- name: Substitute EE code (EE logic is behind feature flag)
109109
run: |

.github/workflows/backend-test.yml

Lines changed: 113 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ jobs:
4444
go-version: 1.21.5
4545
- uses: oven-sh/setup-bun@v2
4646
with:
47-
bun-version: 1.1.43
47+
bun-version: 1.3.8
48+
- uses: actions/setup-node@v4
49+
with:
50+
node-version: '20'
4851
- uses: astral-sh/setup-uv@v6.2.1
4952
with:
5053
version: "0.9.24"
@@ -67,6 +70,111 @@ jobs:
6770
- name: Substitute EE code (EE logic is behind feature flag)
6871
run: |
6972
./substitute_ee_code.sh --copy --dir ./windmill-ee-private
73+
- name: Setup private npm registry with test package
74+
working-directory: /tmp
75+
run: |
76+
set -e
77+
78+
# Install Verdaccio globally
79+
npm install -g verdaccio
80+
81+
# Create Verdaccio config that requires authentication for @windmill-test packages
82+
mkdir -p /tmp/verdaccio/storage
83+
cat > /tmp/verdaccio/config.yaml << 'VERDACCIO_CONFIG'
84+
storage: /tmp/verdaccio/storage
85+
auth:
86+
htpasswd:
87+
file: /tmp/verdaccio/htpasswd
88+
max_users: 100
89+
uplinks:
90+
npmjs:
91+
url: https://registry.npmjs.org/
92+
packages:
93+
'@windmill-test/*':
94+
access: $authenticated
95+
publish: $authenticated
96+
'@*/*':
97+
access: $all
98+
publish: $authenticated
99+
proxy: npmjs
100+
'**':
101+
access: $all
102+
publish: $authenticated
103+
proxy: npmjs
104+
server:
105+
keepAliveTimeout: 60
106+
middlewares:
107+
audit:
108+
enabled: true
109+
log: { type: stdout, format: pretty, level: warn }
110+
VERDACCIO_CONFIG
111+
112+
# Create empty htpasswd file (users will be created via API)
113+
touch /tmp/verdaccio/htpasswd
114+
115+
# Start Verdaccio in background
116+
verdaccio --config /tmp/verdaccio/config.yaml &
117+
VERDACCIO_PID=$!
118+
119+
# Wait for Verdaccio to be ready
120+
echo "Waiting for Verdaccio to start..."
121+
for i in {1..30}; do
122+
if curl -s http://localhost:4873/-/ping > /dev/null 2>&1; then
123+
echo "Verdaccio is ready"
124+
break
125+
fi
126+
sleep 1
127+
done
128+
129+
# Login to get a token
130+
echo "Getting auth token..."
131+
RESPONSE=$(curl -s -X PUT \
132+
-H "Content-Type: application/json" \
133+
-d '{"name":"testuser","password":"testpass123"}' \
134+
http://localhost:4873/-/user/org.couchdb.user:testuser)
135+
136+
echo "Auth response: $RESPONSE"
137+
NPM_TOKEN=$(echo "$RESPONSE" | jq -r '.token')
138+
139+
if [ -z "$NPM_TOKEN" ] || [ "$NPM_TOKEN" = "null" ]; then
140+
echo "Failed to get NPM token from response"
141+
exit 1
142+
fi
143+
144+
echo "NPM_TOKEN=${NPM_TOKEN}" >> $GITHUB_ENV
145+
echo "Got NPM token successfully: ${NPM_TOKEN:0:10}..."
146+
147+
# Configure npm globally with the auth token
148+
echo "//localhost:4873/:_authToken=${NPM_TOKEN}" > ~/.npmrc
149+
echo "Configured ~/.npmrc with auth token"
150+
151+
# Create a simple test package
152+
mkdir -p /tmp/windmill-test-private-pkg
153+
cat > /tmp/windmill-test-private-pkg/package.json << 'PKG_JSON'
154+
{
155+
"name": "@windmill-test/private-pkg",
156+
"version": "1.0.0",
157+
"main": "index.js"
158+
}
159+
PKG_JSON
160+
cat > /tmp/windmill-test-private-pkg/index.js << 'PKG_JS'
161+
module.exports.greet = (name) => `Hello from private package, ${name}!`;
162+
PKG_JS
163+
164+
# Publish to Verdaccio with auth
165+
cd /tmp/windmill-test-private-pkg
166+
echo "Publishing package..."
167+
npm publish --registry http://localhost:4873
168+
echo "Package published successfully"
169+
170+
# Verify the package requires auth by trying anonymous access (should fail)
171+
rm -f ~/.npmrc
172+
echo "Testing anonymous access (should fail)..."
173+
if npm view @windmill-test/private-pkg --registry http://localhost:4873 2>/dev/null; then
174+
echo "ERROR: Package should require authentication but anonymous access worked"
175+
exit 1
176+
fi
177+
echo "Verified: Package requires authentication for @windmill-test/private-pkg"
70178
- name: Cache DuckDB FFI module build
71179
uses: actions/cache@v3
72180
with:
@@ -84,9 +192,10 @@ jobs:
84192
RUST_LOG_STYLE: never
85193
CARGO_NET_GIT_FETCH_WITH_CLI: true
86194
WMDEBUG_FORCE_V0_WORKSPACE_DEPENDENCIES: 1
87-
WMDEBUG_FORCE_RUNNABLE_SETTINGS_V0: 1
195+
WMDEBUG_FORCE_RUNNABLE_SETTINGS_V0: 1
88196
WMDEBUG_FORCE_NO_LEGACY_DEBOUNCING_COMPAT: 1
197+
TEST_NPM_REGISTRY: "http://localhost:4873/:_authToken=${{ env.NPM_TOKEN }}"
89198
run: |
90-
deno --version && bun -v && go version && python3 --version
199+
deno --version && bun -v && node --version && go version && python3 --version
91200
cd windmill-duckdb-ffi-internal && ./build_dev.sh && cd ..
92-
DENO_PATH=$(which deno) BUN_PATH=$(which bun) GO_PATH=$(which go) UV_PATH=$(which uv) cargo test --features enterprise,deno_core,duckdb,license,python,rust,scoped_cache,parquet,private --all -- --nocapture
201+
DENO_PATH=$(which deno) BUN_PATH=$(which bun) NODE_BIN_PATH=$(which node) GO_PATH=$(which go) UV_PATH=$(which uv) cargo test --features enterprise,deno_core,duckdb,license,python,rust,scoped_cache,parquet,private,private_registry_test --all -- --nocapture

.github/workflows/build-publish-rh-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
platforms: linux/amd64,linux/arm64
6363
push: true
6464
build-args: |
65-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,native_trigger,static_frontend,all_languages,deno_core,mcp,private
65+
features=ee_rhel
6666
secrets: |
6767
rh_username=${{ secrets.RH_USERNAME }}
6868
rh_password=${{ secrets.RH_PASSWORD }}

.github/workflows/build-publish-rh8-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
platforms: linux/amd64
6565
push: true
6666
build-args: |
67-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,native_trigger,static_frontend,all_languages,deno_core,mcp,private
67+
features=ee_rhel
6868
secrets: |
6969
rh_username=${{ secrets.RH_USERNAME }}
7070
rh_password=${{ secrets.RH_PASSWORD }}
@@ -81,7 +81,7 @@ jobs:
8181
platforms: linux/arm64
8282
push: true
8383
build-args: |
84-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,native_trigger,static_frontend,all_languages,deno_core,mcp,private
84+
features=ee_rhel
8585
secrets: |
8686
rh_username=${{ secrets.RH_USERNAME }}
8787
rh_password=${{ secrets.RH_PASSWORD }}

.github/workflows/build_windows_worker_.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
$env:OPENSSL_DIR="${Env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows-static"
5858
mkdir frontend/build && cd backend
5959
New-Item -Path . -Name "windmill-api/openapi-deref.yaml" -ItemType "File" -Force
60-
cargo build --release --features=enterprise,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,license,http_trigger,zip,oauth2,kafka,nats,sqs_trigger,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,native_trigger,static_frontend,all_languages_windows,mcp,bedrock,private
60+
cargo build --release --features=ee_windows
6161
- name: Rename binary with corresponding architecture
6262
run: |
6363
Rename-Item -Path ".\backend\target\release\windmill.exe" -NewName "windmill-ee.exe"

0 commit comments

Comments
 (0)