testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
https://dotnet.testcontainers.org
MIT License
3.65k stars 250 forks source link

fix: Prevent a `NullReferenceException` when pulling uncached base images to build an image #1126

Closed tom-englert closed 4 months ago

tom-englert commented 4 months ago

What does this PR do?

Fix a possible null reference exception when the RepoTags property of the ImagesListResponse is null.

Why is it important?

Repeated crashes in tests when the docker instance in not empty makes it unusable

Related issues

How to test this PR

Unfortunately I could not find a public reproducible way, only with some company internal images. However the fix is minimal and self explaining, just adding a null check.

netlify[bot] commented 4 months ago

Deploy Preview for testcontainers-dotnet ready!

Name Link
Latest commit 487481d90726e398f4360e5819098246b8ccf01a
Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/65d9c4ad71986e0008a7c8e3
Deploy Preview https://deploy-preview-1126--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 site configuration.

tom-englert commented 4 months ago

Any chance to get a release or at least a beta with this fix?

HofmeisterAn commented 4 months ago

I would like to include the builder logging API in the next release as well. I can publish a pre-release as soon as the pull request is merged. I am waiting for some feedback.

HofmeisterAn commented 3 months ago

Here you are. Sorry for the delay; I wanted to ship the logging API changes in the beta version too.