Skip to content

Conversation

@0xced
Copy link
Contributor

@0xced 0xced commented Sep 19, 2024

What does this PR do?

This pull request improves error handling while reading the Docker context configuration file. It throws a new DockerConfigurationException instead of silently failing.

Also, since GetCurrentEndpoint() can't return null anymore there's no need to try the default GetSocketPathFromHomeDesktopDir() and GetSocketPathFromHomeRunDir() socket paths.

Why is it important?

Silently returning null instead of throwing proper exceptions makes it harder to diagnose issues.

Related issues

How to test this PR

The DockerConfigTests were updated and a new ThrowsWhenDockerConfigEndpointNotFound test was added.

@netlify
Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 65e6a72
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/68260199d6165900089055d8
😎 Deploy Preview https://deploy-preview-1263--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.

@0xced 0xced force-pushed the improve-docker-config-errors branch 7 times, most recently from f5a5f7a to 1e95bea Compare November 26, 2024 14:15
@0xced 0xced force-pushed the improve-docker-config-errors branch from 1e95bea to 11cf6cc Compare November 26, 2024 16:29
@0xced 0xced force-pushed the improve-docker-config-errors branch from 11cf6cc to a527375 Compare December 20, 2024 13:39
@0xced 0xced force-pushed the improve-docker-config-errors branch from a527375 to beaa485 Compare February 17, 2025 08:50
@0xced 0xced force-pushed the improve-docker-config-errors branch from beaa485 to 43b87e5 Compare February 24, 2025 19:11
@0xced 0xced force-pushed the improve-docker-config-errors branch from 43b87e5 to 6641034 Compare March 27, 2025 14:47
@HofmeisterAn HofmeisterAn added the enhancement New feature or request label May 15, 2025
@HofmeisterAn HofmeisterAn changed the title Improve error reporting when loading the Docker configuration file feat: Improve error reporting when loading the Docker configuration file May 15, 2025
@HofmeisterAn HofmeisterAn merged commit 1854677 into testcontainers:develop May 15, 2025
70 checks passed
@0xced 0xced deleted the improve-docker-config-errors branch May 15, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants