diff --git a/.github/ci-suites.json b/.github/ci-suites.json index 787003ff190..bbd2f26d1c7 100644 --- a/.github/ci-suites.json +++ b/.github/ci-suites.json @@ -24,6 +24,10 @@ "group": "organization-search", "task": "ci:e2e-organization-search" }, + { + "group": "search-permissions", + "task": "ci:e2e-search-permissions" + }, { "group": "browser-extension-navigation", "task": "ci:e2e-browser-extension" diff --git a/.github/scripts/ci-plan.gql b/.github/scripts/ci-plan.gql index 0198e02d1a0..e3551074557 100644 --- a/.github/scripts/ci-plan.gql +++ b/.github/scripts/ci-plan.gql @@ -3,7 +3,7 @@ query($base: String!, $head: String!) { affectedTasks(base: $base, head: $head, tasks: [ "test", "build", "type-check", "ci:integration", "ci:desktop-live", "ci:e2e-scim", "ci:e2e-cli", "ci:e2e-stop-after", "ci:e2e-desktop-inbox", - "ci:e2e-assistant-actions", "ci:e2e-organization-search", + "ci:e2e-assistant-actions", "ci:e2e-organization-search", "ci:e2e-search-permissions", "ci:e2e-docs-platform", "ci:e2e-browser-extension", "ci:e2e-project-files", "ci:e2e-mobile", "ci:e2e-seo", "ci:e2e-markdown-viewer", "ci:e2e-workflow-code-ui" diff --git a/.github/scripts/http-e2e.sh b/.github/scripts/http-e2e.sh index 3b492bea3ca..4e8e4256524 100755 --- a/.github/scripts/http-e2e.sh +++ b/.github/scripts/http-e2e.sh @@ -3,7 +3,7 @@ # CI groups, which reuse the production build from `e2e-build`. # The job extracts it into apps/sim/.next before running these suites. # -# Usage: http-e2e.sh (run from apps/sim) +# Usage: http-e2e.sh (run from apps/sim) # # The job provides DATABASE_URL, BETTER_AUTH_SECRET and ENCRYPTION_KEY; each group sets the rest of # its app's environment here. Reports and server logs land in $RUNNER_TEMP/e2e. @@ -20,7 +20,7 @@ # telemetry flush runs detached and still writes .next/dev). set -euo pipefail -group=${1:?usage: http-e2e.sh } +group=${1:?usage: http-e2e.sh } report_dir="$RUNNER_TEMP/e2e" ready_timeout_seconds=600 mkdir -p "$report_dir" @@ -276,17 +276,18 @@ case "$group" in bun run test:workflow-stop-after:e2e ;; - desktop-inbox|assistant-actions|organization-search) + desktop-inbox|assistant-actions|organization-search|search-permissions) export REDIS_URL=redis://127.0.0.1:6379 export NEXT_PUBLIC_FORCE_HOSTED=false export COPILOT_TOOL_PERMISSIONS_ENABLED=true export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true - if [ "$group" != desktop-inbox ]; then start_browser_install "$group" --only-shell chromium; fi + case "$group" in assistant-actions|organization-search) needs_browser=true ;; *) needs_browser=false ;; esac + if [ "$needs_browser" = true ]; then start_browser_install "$group" --only-shell chromium; fi export INTERNAL_API_SECRET=desktop-inbox-http-ci-local-secret-at-least-32-characters export DB_TX_TRIPWIRE=throw start_app "$group" 3019 "$group" record-http-status - if [ "$group" != desktop-inbox ]; then wait_for_browsers; fi + if [ "$needs_browser" = true ]; then wait_for_browsers; fi case "$group" in desktop-inbox) DESKTOP_INBOX_E2E_BASE_URL="$NEXT_PUBLIC_APP_URL" \ @@ -303,11 +304,15 @@ case "$group" in ASSISTANT_ACTIONS_E2E_REPORT_PATH="$report_dir/assistant-actions-ui-report.json" \ bun --no-env-file scripts/test-assistant-actions-e2e.ts ;; - organization-search) + # The 500,000-identity import uploads 700 parts in order, so it runs beside the browser + # suite rather than ahead of it. + search-permissions) GITLAB_CSV_E2E_BASE_URL="$local_app_url" \ GITLAB_CSV_E2E_LARGE_IMPORT=1 \ GITLAB_CSV_E2E_REPORT_PATH="$report_dir/gitlab-csv-permissions-http-report.json" \ bun --no-env-file scripts/test-gitlab-csv-permissions-e2e.ts + ;; + organization-search) ORGANIZATION_SEARCH_E2E_BASE_URL="$local_app_url" \ ORGANIZATION_SEARCH_E2E_DATABASE_URL="$DATABASE_URL" \ ORGANIZATION_SEARCH_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \ diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 44d83e2b409..7e4d4502862 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -231,7 +231,7 @@ jobs: --health-retries 10 # Desktop inbox, browser extension, and Project Files use Redis. redis: - image: ${{ (matrix.group == 'desktop-inbox' || matrix.group == 'assistant-actions' || matrix.group == 'organization-search' || startsWith(matrix.group, 'browser-extension-') || matrix.group == 'project-files') && 'redis:8.2-alpine' || '' }} + image: ${{ (matrix.group == 'desktop-inbox' || matrix.group == 'assistant-actions' || matrix.group == 'organization-search' || matrix.group == 'search-permissions' || startsWith(matrix.group, 'browser-extension-') || matrix.group == 'project-files') && 'redis:8.2-alpine' || '' }} ports: - 6379:6379 options: >- diff --git a/apps/sim/package.json b/apps/sim/package.json index 49583277d68..88dbe16f6ba 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -60,6 +60,7 @@ "ci:e2e-desktop-inbox": "bash ../../.github/scripts/http-e2e.sh desktop-inbox", "ci:e2e-assistant-actions": "bash ../../.github/scripts/http-e2e.sh assistant-actions", "ci:e2e-organization-search": "bash ../../.github/scripts/http-e2e.sh organization-search", + "ci:e2e-search-permissions": "bash ../../.github/scripts/http-e2e.sh search-permissions", "ci:e2e-docs-platform": "bun --no-env-file scripts/test-docs-search-provider-e2e.ts", "ci:e2e-project-files": "bash ../../.github/scripts/http-e2e.sh project-files", "ci:e2e-mobile": "bash ../../.github/scripts/http-e2e.sh mobile", diff --git a/apps/sim/turbo.json b/apps/sim/turbo.json index 11dec672657..40bcd6a7669 100644 --- a/apps/sim/turbo.json +++ b/apps/sim/turbo.json @@ -139,10 +139,12 @@ }, "ci:e2e-organization-search": { "dependsOn": ["ci:server", "ci:ui", "@sim/realtime#ci:runtime"], - "inputs": [ - "scripts/test-organization-search-e2e.ts", - "scripts/test-gitlab-csv-permissions-e2e.ts" - ], + "inputs": ["scripts/test-organization-search-e2e.ts"], + "cache": false + }, + "ci:e2e-search-permissions": { + "dependsOn": ["ci:server", "sim#ci:runtime"], + "inputs": ["scripts/test-gitlab-csv-permissions-e2e.ts"], "cache": false }, "ci:e2e-docs-platform": { diff --git a/scripts/ci-changes.test.ts b/scripts/ci-changes.test.ts index 8819bbce000..553ba40eac8 100644 --- a/scripts/ci-changes.test.ts +++ b/scripts/ci-changes.test.ts @@ -497,6 +497,7 @@ describe('CI task attribution through real Turborepo', () => { ['test-desktop-inbox-e2e.ts', 'desktop-inbox'], ['test-assistant-actions-e2e.ts', 'assistant-actions'], ['test-organization-search-e2e.ts', 'organization-search'], + ['test-gitlab-csv-permissions-e2e.ts', 'search-permissions'], ])('selects the owning organization acceptance job for %s', (file, group) => { const plan = classifyFiles([`apps/sim/scripts/${file}`]) expect(plan.fallback).toBeUndefined() @@ -560,6 +561,7 @@ describe('CI task attribution through real Turborepo', () => { 'organization-search', 'project-files', 'scim', + 'search-permissions', 'seo', 'stop-after', 'workflow-code-ui', @@ -593,10 +595,10 @@ describe('CI task attribution through real Turborepo', () => { expect(plan.fallback).toBeTruthy() expect(Object.values(plan.flags).every(Boolean)).toBe(true) }) - it('keeps the implicit CLI embed dependency in HTTP acceptance', () => { + it('keeps the implicit CLI embed dependency in every acceptance group that runs the CLI', () => { const plan = classifyFiles(['packages/sim-cli/src/embed.ts']) expect(plan.fallback).toBeUndefined() - expect(groups(plan)).toEqual(['cli']) + expect(groups(plan)).toEqual(['cli', 'search-permissions']) expect(plan.testPackages).toEqual(['sim']) expect(plan.flags).toMatchObject({ e2e_build: true, integration: false, desktop_live: false }) })