Skip to content
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: Prevent a NullReferenceException when pulling uncached base images to build an image #1126

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

tom-englert
Copy link
Contributor

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.

Copy link

netlify bot commented Feb 23, 2024

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 487481d
🔍 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.

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

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

Thank you for making us aware of the issue and immediately providing a pull request incl. a fix 🙏. I have a minor suggestion and would prefer to stick to LINQ (the IEnumerable<T> API). WDYT?

@HofmeisterAn HofmeisterAn changed the title Fix #1125: Occasional NullRefecenceExceptions when trying to create an image fix: Prevent a NullReferenceException when pulling uncached base images to build an image Feb 23, 2024
@HofmeisterAn HofmeisterAn added the bug Something isn't working label Feb 23, 2024
@HofmeisterAn HofmeisterAn merged commit 5c677d9 into testcontainers:develop Feb 24, 2024
11 checks passed
@tom-englert
Copy link
Contributor Author

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

@HofmeisterAn
Copy link
Collaborator

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
Copy link
Collaborator

HofmeisterAn commented Mar 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: IFutureDockerImage crashes with NullReferenceException
2 participants