feat: Require explicit container image when creating container builder#1584
feat: Require explicit container image when creating container builder#1584HofmeisterAn merged 35 commits intotestcontainers:developfrom
Conversation
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 193 files out of 300 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Again random Elastic test failure. Need to merge #1593 first I think. |
|
Small overview: Added two new constructors to each module. Added xml docs to point where image tags can be located, usually Added same two new constructors and deprecated old constructor in Added |
|
Wow, this looks great! Thanks for your hard work. The only issue I noticed is with the xUnit.net module. It won't work anymore in the future. We probably need to use reflection here, even though I try to avoid it as much as possible. We need to think about whether there's another way. WDYT? |
Yes, this is valid problem, I think we need to make a new issue for it, and make a separate PR. We could for example pass a factory or "creator" delegate if reflection is not an option. Or maybe even use |
tests/Testcontainers.Toxiproxy.Tests/Testcontainers.Toxiproxy.Tests.csproj
Outdated
Show resolved
Hide resolved
tests/Testcontainers.Toxiproxy.Tests/Testcontainers.Toxiproxy.Tests.csproj
Show resolved
Hide resolved
|
Unrelated, but looks like Kafka tests also randomly fail. I already had this failure happen twice in this PR (for unrelated changes). |
The best way is to test flaky modules in GH Codespaces with a script that runs the specific module tests indefinitely. I just took a quick look: the Kafka tests (seems to) finish in about a minute, but the overall test process doesn't exit and gets cancelled after five minutes. |
|
@HofmeisterAn |
|
My dockerfile parsing code in |
Ah, I just saw your comment, no worries. I've set the images in the Dockerfile to the versions used in the builder classes for now. We should update the images in a follow-up PR (65a2fc0). OK? |
Yes, but maybe let dependabot update them instead? :) As a sidenote, while I was searching for latest images I encountered some obstacles such as:
|
|
I've reviewed everything and made a couple of small changes. LMKWYT. If you're okay with them, we can merge the PR.
👍 Ideally, we can use Dependabot (for most of the images) and rely on its auto-update capabilities.
Yeah, unfortunately there isn't much we can do here. There just aren't strict guidelines for images.
Yes, that's expected. It's one of the reasons we're doing this. These are the follow-ups we should add as TODOs to the issue so we don't forget:
Again, thanks for the work 💪! |
I think it's ready for merge. 👍 |
Follow-up to testcontainers#1584 When the parameterless constructors are actually removed 1. Remove the `new()` constraint on ContainerLifetime, ContainerFixture, ContainerTest, DbContainerFixture and DbContainerTest 2. Make ContainerFixture abstract 3. Change `protected virtual TBuilderEntity Configure() => new();` to `protected abstract TBuilderEntity Configure();` on ContainerLifetime 4. Delete the obsolete methods: `protected virtual TBuilderEntity Configure(TBuilderEntity builder)`
What does this PR do?
See #1540
Why is it important?
See #1540