Skip to content

Commit 8fb9419

Browse files
committed
improvement(ci): run the large permission import e2e beside organization search
1 parent b3e928f commit 8fb9419

7 files changed

Lines changed: 26 additions & 12 deletions

File tree

‎.github/ci-suites.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"group": "organization-search",
2525
"task": "ci:e2e-organization-search"
2626
},
27+
{
28+
"group": "search-permissions",
29+
"task": "ci:e2e-search-permissions"
30+
},
2731
{
2832
"group": "browser-extension-navigation",
2933
"task": "ci:e2e-browser-extension"

‎.github/scripts/ci-plan.gql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ query($base: String!, $head: String!) {
33
affectedTasks(base: $base, head: $head, tasks: [
44
"test", "build", "type-check", "ci:integration", "ci:desktop-live",
55
"ci:e2e-scim", "ci:e2e-cli", "ci:e2e-stop-after", "ci:e2e-desktop-inbox",
6-
"ci:e2e-assistant-actions", "ci:e2e-organization-search",
6+
"ci:e2e-assistant-actions", "ci:e2e-organization-search", "ci:e2e-search-permissions",
77
"ci:e2e-docs-platform",
88
"ci:e2e-browser-extension", "ci:e2e-project-files", "ci:e2e-mobile", "ci:e2e-seo",
99
"ci:e2e-markdown-viewer", "ci:e2e-workflow-code-ui"

‎.github/scripts/http-e2e.sh‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# CI groups, which reuse the production build from `e2e-build`.
44
# The job extracts it into apps/sim/.next before running these suites.
55
#
6-
# Usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|markdown-viewer|workflow-code-ui|mobile|seo> (run from apps/sim)
6+
# Usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|search-permissions|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|markdown-viewer|workflow-code-ui|mobile|seo> (run from apps/sim)
77
#
88
# The job provides DATABASE_URL, BETTER_AUTH_SECRET and ENCRYPTION_KEY; each group sets the rest of
99
# its app's environment here. Reports and server logs land in $RUNNER_TEMP/e2e.
@@ -20,7 +20,7 @@
2020
# telemetry flush runs detached and still writes .next/dev).
2121
set -euo pipefail
2222

23-
group=${1:?usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|markdown-viewer|workflow-code-ui|mobile|seo>}
23+
group=${1:?usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|search-permissions|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|markdown-viewer|workflow-code-ui|mobile|seo>}
2424
report_dir="$RUNNER_TEMP/e2e"
2525
ready_timeout_seconds=600
2626
mkdir -p "$report_dir"
@@ -276,17 +276,18 @@ case "$group" in
276276
bun run test:workflow-stop-after:e2e
277277
;;
278278

279-
desktop-inbox|assistant-actions|organization-search)
279+
desktop-inbox|assistant-actions|organization-search|search-permissions)
280280
export REDIS_URL=redis://127.0.0.1:6379
281281
export NEXT_PUBLIC_FORCE_HOSTED=false
282282
export COPILOT_TOOL_PERMISSIONS_ENABLED=true
283283
export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
284284
export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
285-
if [ "$group" != desktop-inbox ]; then start_browser_install "$group" --only-shell chromium; fi
285+
case "$group" in assistant-actions|organization-search) needs_browser=true ;; *) needs_browser=false ;; esac
286+
if [ "$needs_browser" = true ]; then start_browser_install "$group" --only-shell chromium; fi
286287
export INTERNAL_API_SECRET=desktop-inbox-http-ci-local-secret-at-least-32-characters
287288
export DB_TX_TRIPWIRE=throw
288289
start_app "$group" 3019 "$group" record-http-status
289-
if [ "$group" != desktop-inbox ]; then wait_for_browsers; fi
290+
if [ "$needs_browser" = true ]; then wait_for_browsers; fi
290291
case "$group" in
291292
desktop-inbox)
292293
DESKTOP_INBOX_E2E_BASE_URL="$NEXT_PUBLIC_APP_URL" \
@@ -303,11 +304,15 @@ case "$group" in
303304
ASSISTANT_ACTIONS_E2E_REPORT_PATH="$report_dir/assistant-actions-ui-report.json" \
304305
bun --no-env-file scripts/test-assistant-actions-e2e.ts
305306
;;
306-
organization-search)
307+
# The 500,000-identity import uploads 700 parts in order, so it runs beside the browser
308+
# suite rather than ahead of it.
309+
search-permissions)
307310
GITLAB_CSV_E2E_BASE_URL="$local_app_url" \
308311
GITLAB_CSV_E2E_LARGE_IMPORT=1 \
309312
GITLAB_CSV_E2E_REPORT_PATH="$report_dir/gitlab-csv-permissions-http-report.json" \
310313
bun --no-env-file scripts/test-gitlab-csv-permissions-e2e.ts
314+
;;
315+
organization-search)
311316
ORGANIZATION_SEARCH_E2E_BASE_URL="$local_app_url" \
312317
ORGANIZATION_SEARCH_E2E_DATABASE_URL="$DATABASE_URL" \
313318
ORGANIZATION_SEARCH_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \

‎.github/workflows/checks.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ jobs:
231231
--health-retries 10
232232
# Desktop inbox, browser extension, and Project Files use Redis.
233233
redis:
234-
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' || '' }}
234+
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' || '' }}
235235
ports:
236236
- 6379:6379
237237
options: >-

‎apps/sim/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"ci:e2e-desktop-inbox": "bash ../../.github/scripts/http-e2e.sh desktop-inbox",
6161
"ci:e2e-assistant-actions": "bash ../../.github/scripts/http-e2e.sh assistant-actions",
6262
"ci:e2e-organization-search": "bash ../../.github/scripts/http-e2e.sh organization-search",
63+
"ci:e2e-search-permissions": "bash ../../.github/scripts/http-e2e.sh search-permissions",
6364
"ci:e2e-docs-platform": "bun --no-env-file scripts/test-docs-search-provider-e2e.ts",
6465
"ci:e2e-project-files": "bash ../../.github/scripts/http-e2e.sh project-files",
6566
"ci:e2e-mobile": "bash ../../.github/scripts/http-e2e.sh mobile",

‎apps/sim/turbo.json‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@
139139
},
140140
"ci:e2e-organization-search": {
141141
"dependsOn": ["ci:server", "ci:ui", "@sim/realtime#ci:runtime"],
142-
"inputs": [
143-
"scripts/test-organization-search-e2e.ts",
144-
"scripts/test-gitlab-csv-permissions-e2e.ts"
145-
],
142+
"inputs": ["scripts/test-organization-search-e2e.ts"],
143+
"cache": false
144+
},
145+
"ci:e2e-search-permissions": {
146+
"dependsOn": ["ci:server", "sim#ci:runtime"],
147+
"inputs": ["scripts/test-gitlab-csv-permissions-e2e.ts"],
146148
"cache": false
147149
},
148150
"ci:e2e-docs-platform": {

‎scripts/ci-changes.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ describe('CI task attribution through real Turborepo', () => {
497497
['test-desktop-inbox-e2e.ts', 'desktop-inbox'],
498498
['test-assistant-actions-e2e.ts', 'assistant-actions'],
499499
['test-organization-search-e2e.ts', 'organization-search'],
500+
['test-gitlab-csv-permissions-e2e.ts', 'search-permissions'],
500501
])('selects the owning organization acceptance job for %s', (file, group) => {
501502
const plan = classifyFiles([`apps/sim/scripts/${file}`])
502503
expect(plan.fallback).toBeUndefined()
@@ -560,6 +561,7 @@ describe('CI task attribution through real Turborepo', () => {
560561
'organization-search',
561562
'project-files',
562563
'scim',
564+
'search-permissions',
563565
'seo',
564566
'stop-after',
565567
'workflow-code-ui',

0 commit comments

Comments
 (0)