-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Bump MSSQL image version, remove Azure SQL Edge and Papercut module #1265
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
That is fair enough on removing the Papercut module I do use it so would be happy to support and take ownership of it can you point me to the logs for the problem to take a look @HofmeisterAn |
@TechLiam Initially, it failed with the following error:
I tried several changes to stabilize it, but unfortunately, nothing worked. I switched to So basically, what I tried was this: diff --git a/tests/Testcontainers.Papercut.Tests/PapercutContainerTest.cs b/tests/Testcontainers.Papercut.Tests/PapercutContainerTest.cs
index 6feba9c..5ed6add 100644
--- a/tests/Testcontainers.Papercut.Tests/PapercutContainerTest.cs
+++ b/tests/Testcontainers.Papercut.Tests/PapercutContainerTest.cs
@@ -23,17 +23,19 @@ public sealed class PapercutContainerTest : IAsyncLifetime
Message[] messages;
+ using var timeoutCts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
+
using var httpClient = new HttpClient();
httpClient.BaseAddress = new Uri(_papercutContainer.GetBaseAddress());
using var smtpClient = new SmtpClient(_papercutContainer.Hostname, _papercutContainer.SmtpPort);
// When
- smtpClient.Send("[email protected]", "[email protected]", subject, "A test message");
+ smtpClient.SendAsync("[email protected]", "[email protected]", subject, "A test message", null);
do
{
- var messagesJson = await httpClient.GetStringAsync("/api/messages")
+ var messagesJson = await httpClient.GetStringAsync("/api/messages", timeoutCts.Token)
.ConfigureAwait(true);
var jsonDocument = JsonDocument.Parse(messagesJson); The pipeline failed after 30 seconds with the following error:
Then I reduced the HTTP client timeout to 1 second and retried getting the message, but this didn’t work either (receiving timeout). Right now, I believe there is an issue where Papercut is not receiving or processing the message correctly. Maybe the wait strategy indicates readiness too early, and we send the message too soon—I'm not sure. |
Issued a PR to reintroduce the module #1268 |
Encountered this issue again on Azure DevOps pipeline with a self-hosted agent image even when using the suggested Image info:
|
What does this PR do?
With the recent VM image update (
Ubuntu-22.04
) for GitHub-hosted runners and Microsoft-hosted agents, we encounter issues where the MSSQL and Azure SQL Edge modules crash during container startup. We experienced similar issues withUbuntu-24.04
.We need to update the MSSQL version to one that is compatible with the new VM image:
mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
. Usually, we try to avoid updating module image versions to prevent breaking changes, and we recommend that developers pin the image version. If you encounter this issue, please use the container builder API (WithImage(string)
) to update the image accordingly:Unfortunately, we also need to remove the Azure SQL Edge module and mark the NuGet dependency as deprecated. There is no new version available, and the image is EOL anyway.
@TechLiam I decided to remove the Papercut module as well. The pipeline frequently fails when sending or receiving SMTP messages. We can add the module again if it becomes stable and someone takes responsibility for addressing the issues/module.
I am really sorry for the inconvenience, especially since this is the second issue with the MSSQL module in such a short time. I want to stress that both issues were caused by upstream changes, and we are working to address them and provide fixes/workaround quickly.
🚩 FYI: We saw other images failing too, but these are the two we are using in Testcontainers for .NET.
Why is it important?
Our CI pipeline keeps failing. We need to address the issue to get it running again.
Related issues