Skip to content

CI: run dev tests single-worker#1153

Merged
BilalG1 merged 7 commits into
external-db-syncfrom
external-db-sync-a-3
Feb 3, 2026
Merged

CI: run dev tests single-worker#1153
BilalG1 merged 7 commits into
external-db-syncfrom
external-db-sync-a-3

Conversation

@BilalG1

@BilalG1 BilalG1 commented Feb 3, 2026

Copy link
Copy Markdown
Collaborator

Runs dev-focused CI test suites with a single Vitest worker to reduce load and avoid external DB sync timeouts.

@vercel

vercel Bot commented Feb 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-backend Ready Ready Preview, Comment Feb 3, 2026 2:40am
stack-dashboard Ready Ready Preview, Comment Feb 3, 2026 2:40am
stack-demo Ready Ready Preview, Comment Feb 3, 2026 2:40am
stack-docs Ready Ready Preview, Comment Feb 3, 2026 2:40am

@coderabbitai

coderabbitai Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch external-db-sync-a-3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@BilalG1 BilalG1 marked this pull request as ready for review February 3, 2026 02:32
@BilalG1 BilalG1 merged commit 5192875 into external-db-sync Feb 3, 2026
13 of 24 checks passed
@BilalG1 BilalG1 deleted the external-db-sync-a-3 branch February 3, 2026 02:32
@greptile-apps

greptile-apps Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Reverts the poolMatchGlobs approach in vitest config and instead splits test execution at the CI workflow level to serialize external DB sync tests. All workflow files now exclude external DB sync tests in the main test run, then execute them separately with --min-workers=1 --max-workers=1 to prevent timeout issues.

Key changes:

  • Regular tests run with default parallelism (or single-worker for prod mode in some workflows)
  • External DB sync tests run in a separate step with single-worker constraint to avoid Undici header timeout issues
  • Main/dev branches run each test suite 3 times total (original + 2 stability reruns)
  • Documentation updated to explain both mitigation approaches (vitest config vs CI splitting)

This approach is simpler than the previous poolMatchGlobs solution and provides better visibility in CI logs by separating the test runs into distinct steps.

Confidence Score: 5/5

  • Safe to merge - straightforward CI configuration changes with clear intent and consistent application
  • All changes are isolated to CI workflow configuration files and documentation. The pattern is consistently applied across all 7 workflow files, and the approach is well-documented. The changes address a specific performance issue (external DB sync timeouts) by serializing those tests while keeping other tests parallel.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/e2e-api-tests.yaml Splits test execution into two steps: regular tests (with optional single-worker for prod mode) and external DB sync tests (always single-worker), running each up to 3 times on main/dev branches
.github/workflows/e2e-custom-base-port-api-tests.yaml Applies same test splitting pattern: excludes external DB sync tests in main run, then runs them separately with single worker, with 3 total attempts on main/dev
.github/workflows/e2e-source-of-truth-api-tests.yaml Mirrors the test splitting approach: separates external DB sync tests to run with single worker while keeping other tests parallel
claude/CLAUDE-KNOWLEDGE.md Documents external DB sync timeout issues in dev mode and two mitigation strategies: poolMatchGlobs with forks pool, or splitting CI runs with --exclude and single-worker flags

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Vitest as Vitest Runner
    participant RegTests as Regular Tests
    participant ExtDBTests as External DB Sync Tests
    participant DB as Database

    Note over GHA,DB: CI Workflow Execution

    GHA->>Vitest: Run tests (--exclude "**/external-db-sync*.test.ts")
    Vitest->>RegTests: Execute regular tests (parallel/multi-worker)
    RegTests->>DB: Access database
    RegTests-->>Vitest: Results
    Vitest-->>GHA: Test results (regular tests)

    GHA->>Vitest: Run tests (--min-workers=1 --max-workers=1 **/external-db-sync*.test.ts)
    Vitest->>ExtDBTests: Execute external DB sync tests (single worker)
    ExtDBTests->>DB: Access database sequentially
    ExtDBTests-->>Vitest: Results
    Vitest-->>GHA: Test results (external DB sync)

    alt On main/dev branches
        Note over GHA,ExtDBTests: Repeat both test runs 2 more times
        GHA->>Vitest: Run regular tests again (attempt 1)
        Vitest->>RegTests: Execute
        RegTests-->>GHA: Results
        
        GHA->>Vitest: Run external DB sync tests again (attempt 1)
        Vitest->>ExtDBTests: Execute (single worker)
        ExtDBTests-->>GHA: Results
        
        GHA->>Vitest: Run regular tests again (attempt 2)
        Vitest->>RegTests: Execute
        RegTests-->>GHA: Results
        
        GHA->>Vitest: Run external DB sync tests again (attempt 2)
        Vitest->>ExtDBTests: Execute (single worker)
        ExtDBTests-->>GHA: Results
    end
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant