-
Notifications
You must be signed in to change notification settings - Fork 206
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
chore: Update Testcontainers for .NET to version 2.3.0 #1953
chore: Update Testcontainers for .NET to version 2.3.0 #1953
Conversation
💚 CLA has been signed |
👋 @HofmeisterAn Thanks a lot for your contribution! It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it. Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it. |
Hi @HofmeisterAn, thanks for your contribution! |
run elasticsearch-ci/docs |
Hi @HofmeisterAn, unfortunately, a couple of tests are not passing anymore with your changes applied. Could you please have a look and let me know whether we should proceed with this PR? Thanks |
Those tests failed right? I can take a look at them. |
Yes, thank you! |
… resolve the Hostname property to localhost (it varies accordingly to the Docker environment)
@z1c0 I've applied two fixes.
BTW, are there any best practices to configure Docker (using WSL2) in combination with the |
thank you so much for opening this! Just a side-note: In the related issue (#1936), I meant that in the This PR already provides value without that, so I think we'll be fine merging without that. Just wanted to let you know, in case you have bandwidth for it. :) Thanks again! |
@gregkalapos Yep, I can create a follow-up PR, but it looks like you are using a slightly different configuration: Does it make sense to add those changes to the upstream repository? |
None of that is critical. Next line just makes sure elasticsearch is up and running before we run the test - that's already included in the upstream if I remember correctly. Only thing we'll need is to make sure we can run elasticsearch version 7.x (latest is 8.x, here we ideally wanna test against 7.x). |
Upstream just checks the availability of the port.
Overriding the image version is not a problem. |
@z1c0 @gregkalapos regarding the latest build failures I need your help. What is the correct image for the apm-agent-dotnet/test/Elastic.Clients.Elasticsearch.Tests/ElasticsearchTestFixture.cs Lines 23 to 24 in 7bfcf46
Previous the build pulled For the Oracle tests I am not sure if the test assertions are right, this line fails: Line 66 in 89cd545
OC, removing the addition of |
@gregkalapos do you have any experience with those Oracle tests? Are the span counts supposed to change? I would assume not. |
Yeah, any
Me neither - those should not change. I'm looking into this. |
I assume
|
Is that locally on your machine? We have it already in our code. I suspect it worked for me locally, because my local docker was logged in and we have the credentials in CI. In any case, I don't think it's related to this PR. We can use any So if it's only locally for you, I'd suggest ignore it for now and maybe file an issue (I agree it's not ideal), or switch to a public image. |
For the local tests I switched to the public repository, which runs fine. But it fails on your Jenkins too. See the Docker config path (
Not sure if PRs have access. |
I see. But I still don't understand why it doesn't work now and why it worked before. We use
PR branch should not make a difference. |
It worked before, because it NOT used the private Docker registry |
Really? Ok, I did not know that. So you say this line overwrites the line before with
Yes, we are fine with that, all I wanted to make sure in those tests is that we pull any Yeah, so in general, we don't care about the exact version and where the image is coming from. All we want is any |
Yep, excatly 😀 The new module API will make it much more convenient in the future — looking forward to finish it next year. Then I will remove it and we pull the image from Docker Hub 👍. |
…meisterAn/apm-agent-dotnet into feature/update-testcontainers-dotnet
I looked into the failing oracle tests - I think our original intuition was wrong: the number of spans changes indeed and that seems to be ok to me. So, how to proceed with that part?
The behavior in Oracle seems to change and we can adjust our asserts. Just remove Here are my findings: I attached the test-case to a real APM setup. On the left side you see As you can see there are a whole bunch of spans called
This does not seem to come from our test application - looks like some generated query and it has something to do with This is the code (including the comment) which counts these additional spans:
I suspect TC updated the oracle version in the new release (so it pulls another image with a newer oracle version) and this oracle version does not generate these db queries. The rest of the asserts and the generated spans all look good to me. So let's just remove |
…dSpans span count
Yes, TC for .NET updated Oracle from
I removed it and pushed the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @HofmeisterAn!
What does this PR do?
Updates the Testcontainers for .NET NuGet dependency to its latest release 2.3.0.
Why is it important?
I noticed you are using an outdated version. The old versions are not compatible with Docker Desktop anymore.
Related issues