Skip to content

Commit b4c1779

Browse files
author
Justin Torre
committed
Merge branch 'main' into justin/helix-web-slack-connect
2 parents 97d8ef6 + 8b7bebe commit b4c1779

File tree

241 files changed

+30193
-20923
lines changed

Some content is hidden

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

241 files changed

+30193
-20923
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: ClickHouse Wrapper Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- devin/eng-3012-ci
8+
pull_request:
9+
branches:
10+
- main
11+
paths:
12+
# ClickHouse wrapper and database implementation files
13+
- "valhalla/jawn/src/lib/db/ClickhouseWrapper.ts"
14+
- "valhalla/jawn/src/managers/HeliconeSqlManager.ts"
15+
# ClickHouse wrapper test files
16+
- "valhalla/jawn/src/lib/db/test/TestClickhouseWrapper.test.ts"
17+
- "valhalla/jawn/src/lib/db/test/TestClickhouseWrapper.ts"
18+
- "valhalla/jawn/src/lib/db/test/clickhouseMockData.ts"
19+
# Workflow file itself
20+
- ".github/workflows/hql-clickhouse-tests.yml"
21+
22+
jobs:
23+
hql-clickhouse-wrapper-tests:
24+
name: HQL ClickHouse Wrapper Tests
25+
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: valhalla/jawn
29+
services:
30+
clickhouse:
31+
image: clickhouse/clickhouse-server:latest
32+
ports:
33+
- 8123:8123
34+
- 9000:9000
35+
options: >-
36+
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1"
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Setup Node.js
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: "20"
47+
cache: "yarn"
48+
cache-dependency-path: "**/yarn.lock"
49+
50+
- name: Install dependencies
51+
run: |
52+
# Retry logic for yarn install with fallback to npm
53+
for i in 1 2 3; do
54+
echo "Attempt $i: Installing dependencies..."
55+
if yarn install --frozen-lockfile --network-timeout 100000; then
56+
echo "✓ Successfully installed dependencies"
57+
exit 0
58+
fi
59+
echo "Attempt $i failed, waiting 5 seconds..."
60+
sleep 5
61+
done
62+
# Fallback to npm if yarn fails
63+
echo "Yarn failed, using npm install..."
64+
npm install
65+
66+
- name: Wait for ClickHouse
67+
run: |
68+
for i in {1..30}; do
69+
if curl -s http://localhost:8123/ping > /dev/null; then
70+
echo "ClickHouse is ready"
71+
break
72+
fi
73+
echo "Waiting for ClickHouse... ($i/30)"
74+
sleep 2
75+
if [ $i -eq 30 ]; then
76+
echo "ClickHouse failed to start after 30 attempts"
77+
exit 1
78+
fi
79+
done
80+
81+
- name: Run ClickHouse Wrapper Tests
82+
run: yarn test:jawn TestClickhouseWrapper.test.ts
83+
env:
84+
NODE_ENV: test
85+
CLICKHOUSE_HOST: localhost
86+
CLICKHOUSE_PORT: 8123
87+
CLICKHOUSE_USER: default
88+
CLICKHOUSE_PASSWORD: ""
89+
CLICKHOUSE_DATABASE: default
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: HQL Security Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
paths:
11+
# HQL security-related implementation files
12+
- "valhalla/jawn/src/lib/stores/HqlStore.ts"
13+
- "valhalla/jawn/src/lib/errors/HqlErrors.ts"
14+
- "valhalla/jawn/src/managers/HqlQueryManager.ts"
15+
- "valhalla/jawn/src/controllers/public/heliconeSqlController.ts"
16+
# HQL security test files
17+
- "valhalla/jawn/src/lib/db/test/hqlSecurityTests.test.ts"
18+
- "valhalla/jawn/src/lib/db/test/MockClickhouseWrapper.ts"
19+
- "valhalla/jawn/src/controllers/public/__tests__/heliconeSqlController.test.ts"
20+
# Web HQL files
21+
- "web/lib/api/hql/**"
22+
# Workflow file itself
23+
- ".github/workflows/hql-security-tests.yml"
24+
25+
jobs:
26+
hql-security-tests:
27+
hql-security-tests:
28+
name: Run HQL Security Tests
29+
defaults:
30+
run:
31+
working-directory: valhalla/jawn
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: "20"
39+
cache: "yarn"
40+
cache-dependency-path: "**/yarn.lock"
41+
42+
- name: Install dependencies
43+
run: |
44+
# Retry logic for yarn install with fallback to npm
45+
for i in 1 2 3; do
46+
echo "Attempt $i: Installing dependencies..."
47+
if yarn install --frozen-lockfile --network-timeout 100000; then
48+
echo "✓ Successfully installed dependencies"
49+
exit 0
50+
fi
51+
echo "Attempt $i failed, waiting 5 seconds..."
52+
sleep 5
53+
done
54+
# Fallback to npm if yarn fails
55+
echo "Yarn failed, using npm install..."
56+
npm install
57+
58+
- name: Run HQL Security Tests
59+
run: yarn test:jawn hqlSecurityTests.test.ts
60+
env:
61+
NODE_ENV: test
62+
63+
# Note: API integration tests are skipped in CI because they require
64+
# the full Jawn server to be running on port 8585.
65+
# These tests should be run locally or in a more complete E2E test environment.
66+
# To run locally:
67+
# 1. Start the Jawn server: yarn start
68+
# 2. Run tests: yarn test:jawn heliconeSqlController.test.ts

.github/workflows/jawn-deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ env:
2222
US_REGION: us-west-2
2323
EU_REGION: eu-west-1
2424
AWS_ACCOUNT_ID: 849596434884
25-
US_TASK_DEFINITION_REVISION: 49
26-
EU_TASK_DEFINITION_REVISION: 30
25+
US_TASK_DEFINITION_REVISION: 50
26+
EU_TASK_DEFINITION_REVISION: 31
2727

2828
jobs:
2929
build_and_push:

.github/workflows/packages-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ jobs:
3232
run: yarn install --frozen-lockfile
3333
working-directory: packages
3434

35-
- name: Run llm-mapper tests
35+
- name: Run packages tests
3636
run: npx jest __tests__/
3737
working-directory: packages

.github/workflows/worker-test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ on:
44
workflow_dispatch: # Manual trigger for testing iterations!
55
push:
66
branches:
7-
- "**" # Run on ALL branches for every push
7+
- main
88
pull_request:
99
branches:
10-
- "**" # Run on ALL branches for PRs
11-
types: [opened, synchronize, reopened, ready_for_review]
10+
- main
1211

1312
jobs:
1413
worker-ai-gateway-tests:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
scripts/
2+
!valhalla/jawn/scripts/
23
dist/
34
server.py
45

@@ -48,3 +49,4 @@ override.tf.json
4849
settings.local.json
4950
examples/**/*/package-lock.json
5051
examples/**/*/yarn.lock
52+
coverage/

bifrost/app/components/Layout.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ import { BLOG_CONTENT } from "../blog/page";
77
export const Layout = async ({
88
children,
99
hideFooter,
10+
noNavbarMargin,
1011
}: {
1112
children: React.ReactNode;
1213
hideFooter?: boolean;
14+
noNavbarMargin?: boolean;
1315
}) => {
1416
const githubResponse = await fetch(
1517
"https://api.github.com/repos/helicone/helicone"
@@ -24,10 +26,15 @@ export const Layout = async ({
2426
<>
2527
{/* <Banner /> */}
2628

27-
<NavBar stars={stars} featuredBlogMetadata={featuredBlogMetadata || {
28-
title: "Check out our latest blog",
29-
description: "Open-source LLM observability and monitoring platform for developers",
30-
}} featuredBlogFolderName={featuredBlogFolderName} />
29+
<NavBar
30+
stars={stars}
31+
featuredBlogMetadata={featuredBlogMetadata || {
32+
title: "Check out our latest blog",
33+
description: "Open-source LLM observability and monitoring platform for developers",
34+
}}
35+
featuredBlogFolderName={featuredBlogFolderName}
36+
noMargin={noNavbarMargin}
37+
/>
3138
{children}
3239
{!hideFooter && <Footer />}
3340
</>

0 commit comments

Comments
 (0)