Skip to content

Update MsSql image to 2025-RTM-ubuntu-22.04#1595

Closed
XmlmXmlmX wants to merge 2 commits intotestcontainers:developfrom
XmlmXmlmX:patch-1
Closed

Update MsSql image to 2025-RTM-ubuntu-22.04#1595
XmlmXmlmX wants to merge 2 commits intotestcontainers:developfrom
XmlmXmlmX:patch-1

Conversation

@XmlmXmlmX
Copy link
Copy Markdown

@XmlmXmlmX XmlmXmlmX commented Dec 2, 2025

What does this PR do?

I changed the docker container version to mcr.microsoft.com/mssql/server:2025-RTM-ubuntu-22.04.

Why is it important?

The current version 2022-CU14-ubuntu-22.04 does not support the latest features like json columns.

Azure SQL Image 2022 does not support json column type

Related issues

How to test this PR

Create a entity configration and use .ToJson() in EntityTypeBuilder.


SQL Server 2025 Breaking Changes – Summary

Use this change note when planning upgrades or reviewing PRs that involve SQL Server 2025 compatibility.
For details, see the official documentation and migration guides linked throughout.

Major Breaking Changes

  1. Linked Server Connections

    • The default is now to require encryption (Encrypt parameter) and valid TLS certificates; legacy/unsecured connections may break.
    • Microsoft Docs: Breaking Changes
  2. Replication & Log Shipping

    • Replication roles and log shipping monitoring may fail unless service accounts and encryption use modern standards; trusted certificates are now mandatory for remote distributors.
    • Migration Risks Overview
  3. Legacy Feature Removal

    • Master Data Services (MDS) and Data Quality Services (DQS) are officially retired.
    • Features like Hot-Add CPU, Lightweight Pooling, and extended stored procedures are deprecated or fully unsupported.
    • Migration Guide: Deprecated Features
  4. Security Defaults

    • "Encrypt by Default" enforced for all client connections; legacy drivers/apps may lose access unless updated for TLS 1.2+.
    • Hardened credential storage and authentication for replication/log shipping.
    • Breaking Changes - Security
  5. Database Engine & Query Processing

    • Collation and Unicode normalization now matches UTF-8 standards, affecting string comparisons/sorting.
    • Query optimizer changes may break legacy workloads (join order, trace flag behavior, estimated row counts).
    • What's New in SQL Server 2025
  6. Automation & .NET Providers

    • Integration Services (SSIS) automation now requires Microsoft.Data.SqlClient—the old System.Data.SqlClient provider is unsupported and must be replaced.
    • Critical Breaking Changes for DBAs

Key Takeaway:
SQL Server 2025 enforces stricter security defaults, retires multiple legacy features, and updates data provider compatibility. Review all code and deployment tools for compatibility before upgrading.

Reference Links:

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 2, 2025

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 094fa67
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/692edd9c8697d000082a9cf3
😎 Deploy Preview https://deploy-preview-1595--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 2, 2025

Summary by CodeRabbit

  • Chores
    • Updated SQL Server container to version 2025 RTM for improved compatibility and testing performance.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Updated the MsSqlBuilder.MsSqlImage constant to reference the SQL Server 2025 RTM Ubuntu container image instead of the previous 2022 CU14 image. No other code, logic, or error handling changed.

Changes

Cohort / File(s) Summary
MsSql image version update
src/Testcontainers.MsSql/MsSqlBuilder.cs
Changed public const string MsSqlImage from mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 to mcr.microsoft.com/mssql/server:2025-RTM-ubuntu-22.04.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • Verify the mcr.microsoft.com/mssql/server:2025-RTM-ubuntu-22.04 tag exists and is correct.
  • Run the test suite or a representative MsSql container startup to confirm compatibility.
  • Review any project documentation or examples that reference the old image tag.

Possibly related issues

Poem

🐰
I hopped from twenty-two to twenty‑five,
A container tucked and freshly alive,
New image pulled, I give a cheer—
Tests will run and logs appear,
A carrot-shaped build, bright and spry 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: updating the MsSql Docker image version to 2025-RTM-ubuntu-22.04, which accurately reflects the changeset.
Description check ✅ Passed The description includes all required sections: 'What does this PR do?' explaining the change, 'Why is it important?' providing clear rationale about JSON column support, related issues, and testing instructions.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5f6a01 and 094fa67.

📒 Files selected for processing (1)
  • src/Testcontainers.MsSql/MsSqlBuilder.cs (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: diegosasw
Repo: testcontainers/testcontainers-dotnet PR: 1583
File: src/Testcontainers.KurrentDb/Testcontainers.KurrentDb.csproj:7-7
Timestamp: 2025-11-17T17:58:43.958Z
Learning: In the testcontainers-dotnet repository, JetBrains.Annotations should use version 2023.3.0 to maintain consistency with the main Testcontainers csproj, rather than always using the latest available version.
📚 Learning: 2025-11-17T17:58:43.958Z
Learnt from: diegosasw
Repo: testcontainers/testcontainers-dotnet PR: 1583
File: src/Testcontainers.KurrentDb/Testcontainers.KurrentDb.csproj:7-7
Timestamp: 2025-11-17T17:58:43.958Z
Learning: In the testcontainers-dotnet repository, JetBrains.Annotations should use version 2023.3.0 to maintain consistency with the main Testcontainers csproj, rather than always using the latest available version.

Applied to files:

  • src/Testcontainers.MsSql/MsSqlBuilder.cs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: collect-test-projects
  • GitHub Check: analyze (csharp)

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8aa6520 and f5f6a01.

📒 Files selected for processing (1)
  • src/Testcontainers.MsSql/MsSqlBuilder.cs (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: diegosasw
Repo: testcontainers/testcontainers-dotnet PR: 1583
File: src/Testcontainers.KurrentDb/Testcontainers.KurrentDb.csproj:7-7
Timestamp: 2025-11-17T17:58:43.958Z
Learning: In the testcontainers-dotnet repository, JetBrains.Annotations should use version 2023.3.0 to maintain consistency with the main Testcontainers csproj, rather than always using the latest available version.
📚 Learning: 2025-11-17T17:58:43.958Z
Learnt from: diegosasw
Repo: testcontainers/testcontainers-dotnet PR: 1583
File: src/Testcontainers.KurrentDb/Testcontainers.KurrentDb.csproj:7-7
Timestamp: 2025-11-17T17:58:43.958Z
Learning: In the testcontainers-dotnet repository, JetBrains.Annotations should use version 2023.3.0 to maintain consistency with the main Testcontainers csproj, rather than always using the latest available version.

Applied to files:

  • src/Testcontainers.MsSql/MsSqlBuilder.cs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: ci (Testcontainers, ubuntu-24.04)
  • GitHub Check: ci (Testcontainers.MsSql, ubuntu-24.04)
  • GitHub Check: analyze (csharp)

Comment thread src/Testcontainers.MsSql/MsSqlBuilder.cs Outdated
@XmlmXmlmX XmlmXmlmX changed the title Update MsSql image to 2025-latest Update MsSql image to 2025-RTM-ubuntu-22.04 Dec 2, 2025
@HofmeisterAn
Copy link
Copy Markdown
Collaborator

We don't update image versions for modules unless it's absolutely necessary to prevent introducing breaking changes. We recommend that developers overwrite and pin their required versions instead. We're even considering removing the default image to encourage developers to set the image explicitly.

@XmlmXmlmX
Copy link
Copy Markdown
Author

XmlmXmlmX commented Dec 2, 2025

We don't update image versions for modules unless it's absolutely necessary to prevent introducing breaking changes. We recommend that developers overwrite and pin their required versions instead. We're even considering removing the default image to encourage developers to set the image explicitly.

Ok, understand. So the solution is to use:

new MsSqlBuilder().WithImage("mcr.microsoft.com/mssql/server:2025-latest").Build();

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.

2 participants