-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
[Bug]: System.MissingMethodException after upgrade from 3.6.0 to 3.7.0 #1096
Comments
I think version 1.5.46 of WireMock.Net.Testcontainers is not compatible with Testcontainers version 3.7.0. The constructor for It is probably a good idea to pin the Testcontainers version for upcoming WireMock releases. You will likely run into similar issues with version 3.8.0, which introduces the reuse feature that extends the configuration constructor as well. |
Yes, in issue WireMock-Net/WireMock.Net#1059 this is indeed described by the user : Testcontainers.CosmosDb version 3.7.0 is used. |
@HofmeisterAn I've some follow-up questions on this topic: 1]Is it allowed (according to your design) to inherit from the ContainerConfiguration class?
2]Pinning the version to 3.7.0 will work fine when no other Testcontainer is used except for WireMock.Net, if another is used and that one is using version 3.6.0 (and only 3.6.0 exists) then there is again NuGet version conflict. 3]If you expect breaking changes configuration constructor in the next version; isn't there a way to keep the existing constructor the same? |
What about the other issue?
Yes, it is allowed. We are doing it as well.
It is not really a breaking change. There is nothing to do or to consider when switching from version 3.6.0 to 3.7.0. In your case, users are mixing (overwriting) versions that may not be (are) compatible with each other. This can also happen with other (transitive) dependencies. WireMock can specify compatible version ranges. Maybe we can do the same for all modules, requiring the same Testcontainers base version per module (then you do not need to do it). But I need to look into this first.
Usually, we try to avoid breaking changes as much as we can. If it is not possible, we mention it in the release notes, but in this case, I do not really count it as a breaking change. Otherwise, we wouldn't be able to properly ship new versions. Mixing versions was never intended. But I can understand that the situation is not really great. I hope we can pin our modules to the base version. Then this issue should not happen again. |
I don't know yet, I'm waiting on the user to respond... I'll keep you updated. |
@HofmeisterAn So for now I'll pin the version in WireMock.Net to |
I kept thinking about this issue and did not come up with another solution. If you have any other ideas, I am happy to discuss them. However, since the users overwrite the dependency with a new version, I do not know what else I/we should do. |
It would be interesting if we can do the same for the |
Normally, users are allowed to use a newer version. This is also the case when I want to use a newer version from a Microsoft dependency. |
FYI: a new NuGet from WireMock.Net has been released which pins the version from testcontainers to 3.7.0 |
I did some research, but unfortunately, I have not found a lot of useful information except that pinning project references is not supported right now. There is a "hacky" workaround which I have not looked into closely. I will close this issue because I have no plans to add the workaround. In case you find other information or want to continue discussing this issue and behavior, do not hesitate to reopen the issue. Thanks for the awareness and creating the issue. |
Testcontainers version
3.7.0
Using the latest Testcontainers version?
Yes
Host OS
Windows
Host arch
x86
.NET version
8
Docker version
Client: Cloud integration: v1.0.35+desktop.5 Version: 24.0.7 API version: 1.43 Go version: go1.20.10 Git commit: afdd53b Built: Thu Oct 26 09:08:44 2023 OS/Arch: windows/amd64 Context: default Server: Docker Desktop 4.26.1 (131620) Engine: Version: 24.0.7 API version: 1.43 (minimum version 1.12) Go version: go1.20.10 Git commit: 311b9ff Built: Thu Oct 26 09:08:02 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.25 GitCommit: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f runc: Version: 1.1.10 GitCommit: v1.1.10-0-g18a0cb0 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
System.MissingMethodException when upgrading from 3.6.0 to 3.7.0
Was there a breaking change in 3.7.0 or when using .NET 8 ?
Relevant log output
Exceptions:
Additional information
Related bugs reported:
The text was updated successfully, but these errors were encountered: