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.73k stars 262 forks source link

[Bug]: IOutputConsumer is never invoked #1030

Closed goldsam closed 10 months ago

goldsam commented 10 months ago

Testcontainers version

3.3.0

Using the latest Testcontainers version?

No

Host OS

Windows

Host arch

x64

.NET version

7.0.304

Docker version

3.3.0

Docker info

Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:32:48 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.24.2 (124339)
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:32:16 2023
  OS/Arch:          linux/amd64
  Experimental:     false

What happened?

Created a customer IOutputConsumer implementation and placed breakpoints on every public property. None of these properties are ever invoked and nothing is ever written to StdOut or StdErr properties.

Relevant log output

No response

Additional information

I am unable to use a newer version that 3.3.0 due to #980. Although this feature was marked obsolete in this release, it was later reintroduced by #959

HofmeisterAn commented 10 months ago

I think this is already fixed (#959), please try the latest version.

goldsam commented 10 months ago

Unfortunately, I'm blocked due to the regression in ARG handling. I updated the original comment, but I think you had already responded by then. Quick response time 😊

HofmeisterAn commented 10 months ago

Argh, that is annoying. I ran your Dockerfile, and indeed, it throws the same error - unexpected 😬. I am very sorry for the inconvenience. I have already improved resolving the base images in the develop branch, to finalize the resolution of the ARGs in upcoming versions (I thought your comment was related to pre-pull images that contains ARGs). Could you please test the develop branch with your Dockerfile? Please note that it will not pull the SDK; the image must be cached to complete the build (behaves like 3.3.0).

Regarding this issue, I am not sure how we should proceed. I do not intend to work on a patch version, aka 3.3.1. I prefer to release a new minor version that addresses your issue. In the meantime, you can set the Docker image version instead of relying on ARGs.

HofmeisterAn commented 10 months ago

@goldsam, do you mind testing the recent changes in the develop branch? It should behave like 3.3.0 again, and be able to pre-pull images without variables (images with variables are still skipped). Then I can prepare a release and work on pre-pulling images with variables afterward.