Skip to content

Commit fb19a11

Browse files
Merge branch 'main' into chore/mcp-server-host
2 parents cca3b15 + ddb14ec commit fb19a11

103 files changed

Lines changed: 5915 additions & 2341 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.

‎.github/workflows/deployment.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ jobs:
640640
NEXT_PUBLIC_POSTHOG_HOST=${{ secrets.POSTHOG_HOST }}
641641
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
642642
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${{ secrets.STRIPE_PUBLISHABLE_KEY }}
643+
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=${{ vars.NEXT_PUBLIC_RECAPTCHA_SITE_KEY }}
643644
NEXT_PUBLIC_GTM_ENABLED=true
644645
NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED=true
645646
NEXT_PUBLIC_INCLUDE_ERROR_POPUP_SUPPORT_LINK=true
@@ -721,6 +722,7 @@ jobs:
721722
NEXT_PUBLIC_POSTHOG_HOST=${{ secrets.POSTHOG_HOST }}
722723
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
723724
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${{ secrets.STRIPE_PUBLISHABLE_KEY }}
725+
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=${{ vars.NEXT_PUBLIC_RECAPTCHA_SITE_KEY }}
724726
NEXT_PUBLIC_GTM_ENABLED=true
725727
NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED=true
726728
NEXT_PUBLIC_INCLUDE_ERROR_POPUP_SUPPORT_LINK=true

‎.github/workflows/pr-integration-tests.yml‎

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
timeout-minutes: 45
4747
outputs:
4848
test-dirs: ${{ steps.set-matrix.outputs.test-dirs }}
49+
editions: ${{ steps.set-editions.outputs.editions }}
4950
steps:
5051
- name: Checkout code
5152
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
@@ -72,6 +73,16 @@ jobs:
7273
all_dirs="[${all_dirs%,}]"
7374
echo "test-dirs=$all_dirs" >> $GITHUB_OUTPUT
7475
76+
- name: Determine editions to test
77+
id: set-editions
78+
run: |
79+
# On PRs, only run EE tests. On merge_group and tags, run both EE and MIT.
80+
if [ "${{ github.event_name }}" = "pull_request" ]; then
81+
echo 'editions=["ee"]' >> $GITHUB_OUTPUT
82+
else
83+
echo 'editions=["ee","mit"]' >> $GITHUB_OUTPUT
84+
fi
85+
7586
build-backend-image:
7687
runs-on:
7788
[
@@ -267,14 +278,15 @@ jobs:
267278
runs-on:
268279
- runs-on
269280
- runner=4cpu-linux-arm64
270-
- ${{ format('run-id={0}-integration-tests-job-{1}', github.run_id, strategy['job-index']) }}
281+
- ${{ format('run-id={0}-integration-tests-{1}-job-{2}', github.run_id, matrix.edition, strategy['job-index']) }}
271282
- extras=ecr-cache
272283
timeout-minutes: 45
273284

274285
strategy:
275286
fail-fast: false
276287
matrix:
277288
test-dir: ${{ fromJson(needs.discover-test-dirs.outputs.test-dirs) }}
289+
edition: ${{ fromJson(needs.discover-test-dirs.outputs.editions) }}
278290

279291
steps:
280292
- uses: runs-on/action@cd2b598b0515d39d78c38a02d529db87d2196d1e # ratchet:runs-on/action@v2
@@ -298,12 +310,11 @@ jobs:
298310
env:
299311
ECR_CACHE: ${{ env.RUNS_ON_ECR_CACHE }}
300312
RUN_ID: ${{ github.run_id }}
313+
EDITION: ${{ matrix.edition }}
301314
run: |
315+
# Base config shared by both editions
302316
cat <<EOF > deployment/docker_compose/.env
303317
COMPOSE_PROFILES=s3-filestore
304-
ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=true
305-
# TODO(Nik): https://linear.app/onyx-app/issue/ENG-1/update-test-infra-to-use-test-license
306-
LICENSE_ENFORCEMENT_ENABLED=false
307318
AUTH_TYPE=basic
308319
POSTGRES_POOL_PRE_PING=true
309320
POSTGRES_USE_NULL_POOL=true
@@ -312,11 +323,20 @@ jobs:
312323
ONYX_BACKEND_IMAGE=${ECR_CACHE}:integration-test-backend-test-${RUN_ID}
313324
ONYX_MODEL_SERVER_IMAGE=${ECR_CACHE}:integration-test-model-server-test-${RUN_ID}
314325
INTEGRATION_TESTS_MODE=true
315-
CHECK_TTL_MANAGEMENT_TASK_FREQUENCY_IN_HOURS=0.001
316-
AUTO_LLM_UPDATE_INTERVAL_SECONDS=10
317326
MCP_SERVER_ENABLED=true
327+
AUTO_LLM_UPDATE_INTERVAL_SECONDS=10
328+
EOF
329+
330+
# EE-only config
331+
if [ "$EDITION" = "ee" ]; then
332+
cat <<EOF >> deployment/docker_compose/.env
333+
ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=true
334+
# TODO(Nik): https://linear.app/onyx-app/issue/ENG-1/update-test-infra-to-use-test-license
335+
LICENSE_ENFORCEMENT_ENABLED=false
336+
CHECK_TTL_MANAGEMENT_TASK_FREQUENCY_IN_HOURS=0.001
318337
USE_LIGHTWEIGHT_BACKGROUND_WORKER=false
319338
EOF
339+
fi
320340
321341
- name: Start Docker containers
322342
run: |
@@ -379,14 +399,14 @@ jobs:
379399
docker compose -f docker-compose.mock-it-services.yml \
380400
-p mock-it-services-stack up -d
381401
382-
- name: Run Integration Tests for ${{ matrix.test-dir.name }}
402+
- name: Run Integration Tests (${{ matrix.edition }}) for ${{ matrix.test-dir.name }}
383403
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # ratchet:nick-fields/retry@v3
384404
with:
385405
timeout_minutes: 20
386406
max_attempts: 3
387407
retry_wait_seconds: 10
388408
command: |
389-
echo "Running integration tests for ${{ matrix.test-dir.path }}..."
409+
echo "Running ${{ matrix.edition }} integration tests for ${{ matrix.test-dir.path }}..."
390410
docker run --rm --network onyx_default \
391411
--name test-runner \
392412
-e POSTGRES_HOST=relational_db \
@@ -444,7 +464,7 @@ jobs:
444464
if: always()
445465
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
446466
with:
447-
name: docker-all-logs-${{ matrix.test-dir.name }}
467+
name: docker-all-logs-${{ matrix.edition }}-${{ matrix.test-dir.name }}
448468
path: ${{ github.workspace }}/docker-compose.log
449469
# ------------------------------------------------------------
450470

0 commit comments

Comments
 (0)