Skip to content

meta(mssql): ensure sequential run to fix flaky test - #18037

Merged
WikiRik merged 2 commits into
sequelize:mainfrom
SippieCup:18036-fix-mssql-test-failure
Oct 22, 2025
Merged

WikiRik merged 2 commits into
sequelize:mainfrom
SippieCup:18036-fix-mssql-test-failure

Conversation

@SippieCup

@SippieCup SippieCup commented Oct 22, 2025 •

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description of Changes

Switch from promise all to a series of await calls to ensure order insertion.

fixes: #18036

List of Breaking Changes

None

Summary by CodeRabbit

  • Chores

    • Removed changelog documentation files across multiple packages
  • Tests

    • Updated test execution pattern to sequential processing in database dialect tests

Copilot AI review requested due to automatic review settings October 22, 2025 13:34
@SippieCup
SippieCup requested a review from a team as a code owner October 22, 2025 13:34
@SippieCup
SippieCup requested review from WikiRik and sdepold October 22, 2025 13:34

Copilot AI 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.

Pull Request Overview

This PR fixes a concurrency issue in MSSQL tests by ensuring sequential execution of login operations instead of parallel execution via Promise.all(). The change addresses potential race conditions or database state issues that can occur when multiple login logs are created simultaneously in MSSQL.

Key Changes

  • Changed parallel login creation (Promise.all()) to sequential await calls in MSSQL regression tests
  • Removed CHANGELOG.md files (likely generated files that should not be version controlled)

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/test/integration/dialects/mssql/regressions.test.js Changed from parallel to sequential execution of createLoginLog() calls to fix MSSQL-specific race conditions
CHANGELOG.md Removed generated changelog file
packages/core/CHANGELOG.md Removed generated changelog file
packages/utils/CHANGELOG.md Removed generated changelog file
packages/validator-js/CHANGELOG.md Removed generated changelog file

@coderabbitai

coderabbitai Bot commented Oct 22, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Multiple CHANGELOG.md files across the monorepo root and package directories had their entire content removed. Additionally, a test file was modified to convert parallel LoginLog creation using Promise.all into sequential execution via individual await statements.

Changes

Cohort / File(s) Change Summary
CHANGELOG Removals
CHANGELOG.md, packages/core/CHANGELOG.md, packages/utils/CHANGELOG.md, packages/validator-js/CHANGELOG.md
Deleted entire CHANGELOG file contents across multiple packages, removing versioned release notes and documentation entries.
Test Control Flow Modification
packages/core/test/integration/dialects/mssql/regressions.test.js
Changed LoginLog creation from parallel execution (Promise.all) to sequential execution (individual await calls).

Sequence Diagram

sequenceDiagram
    participant Test
    participant DB as Database
    
    rect rgb(255, 230, 200)
    Note over Test,DB: Before (Parallel)
    Test->>DB: Promise.all([create LoginLog 1, 2, 3, 4])
    par
        DB-->>Test: LoginLog 1 created
        DB-->>Test: LoginLog 2 created
        DB-->>Test: LoginLog 3 created
        DB-->>Test: LoginLog 4 created
    and
        Note over DB: Parallel execution
    end
    end
    
    rect rgb(230, 245, 255)
    Note over Test,DB: After (Sequential)
    Test->>DB: await create LoginLog 1
    DB-->>Test: LoginLog 1 created
    Test->>DB: await create LoginLog 2
    DB-->>Test: LoginLog 2 created
    Test->>DB: await create LoginLog 3
    DB-->>Test: LoginLog 3 created
    Test->>DB: await create LoginLog 4
    DB-->>Test: LoginLog 4 created
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 The changelogs took flight, now they're gone without a trace,
And LoginLogs march one by one—a sequential pace,
From chaos to order, our tests now align,
Cleanup and patience—chef's kiss, divine! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title "meta(mssql): ensure sequential run to fix flaky test" accurately describes the main functional change in the pull request. The primary code modification is in packages/core/test/integration/dialects/mssql/regressions.test.js, which converts LoginLog creation from parallel (Promise.all) to sequential (individual await calls) execution—exactly what the title indicates. While the changeset also includes removal of four CHANGELOG.md files, these are documentation/housekeeping changes that appear secondary to the core test fix objective. The title is specific, clear, and concise enough that a teammate reviewing the history would understand the primary change purpose.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@WikiRik

WikiRik commented Oct 22, 2025

Copy link
Copy Markdown
Member

Just to check; this is the same fix as #17986 right? I'm happy to close that one in favor of this so I can approve and merge it

@WikiRik WikiRik changed the title fix(mssql): ensure sequential run of login. meta(mssql): ensure sequential run of login. Oct 22, 2025
@WikiRik WikiRik changed the title meta(mssql): ensure sequential run of login. meta(mssql): ensure sequential run to fix flaky test Oct 22, 2025
@WikiRik
WikiRik merged commit 67965e8 into sequelize:main Oct 22, 2025
@WikiRik WikiRik mentioned this pull request Oct 22, 2025
2 of 5 tasks
@SippieCup

Copy link
Copy Markdown
Contributor Author

Just to check; this is the same fix as #17986 right? I'm happy to close that one in favor of this so I can approve and merge it

oh wow. didnt see that one but yeah. doesnt matter either way. cheers for merge.

@SippieCup
SippieCup deleted the 18036-fix-mssql-test-failure branch October 22, 2025 20:17
papandreou added a commit to papandreou/sequelize that referenced this pull request Oct 26, 2025
* main: (55 commits)
  v7.0.0-alpha.47
  fix(core): correct subquery join resolution & use alias minification for join references (sequelize#18012)
  meta(mssql): ensure sequential run to fix flaky test (sequelize#18037)
  meta: update dependency eslint-plugin-jsdoc to v61.1.5
  meta: update dependency eslint-plugin-jsdoc to v61 (sequelize#18025)
  meta: update amannn/action-semantic-pull-request action to v6 (sequelize#18022)
  meta: update actions/stale action to v10 (sequelize#18021)
  meta: update actions/setup-node action to v6 (sequelize#18020)
  meta: update actions/github-script action to v8 (sequelize#18019)
  meta: update actions/checkout action to v5 (sequelize#18018)
  meta: update yarn to v4.10.3
  meta: update dependency nx to v21.6.5 (sequelize#18016)
  meta: update dependency node-gyp to v11.5.0
  meta: update dependency @oclif/core to ^4.5.6
  meta: update dependency esbuild to v0.25.11
  meta: update dependency zod to ^4.1.12
  meta: update dependency @inquirer/select to ^4.4.0
  meta: update dependency @inquirer/checkbox to ^4.3.0
  meta: update dependency @inquirer/input to ^4.2.5
  meta: update dependency @inquirer/confirm to ^5.1.19
  ...
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.

[bug] MSSQL CI Tests random failures

3 participants