Skip to content

Conversation

@breskeby
Copy link
Contributor

@breskeby breskeby commented Nov 25, 2025

Update testcontainer library due to docker incompatibility

  • rely on transitive dependencies here for resolving docker java api
  • wrap for junit4 support
  • fix hdfsfixtures silently failing

@breskeby breskeby added >non-issue :Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team labels Nov 25, 2025
@breskeby breskeby requested a review from a team as a code owner November 25, 2025 20:03
@breskeby breskeby added auto-backport Automatically create backport pull requests when merged v9.3.0 v9.2.2 v8.19.8 v9.1.8 labels Nov 25, 2025
@breskeby breskeby self-assigned this Nov 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

components.withModule("org.subethamail:subethasmtp", ExcludeAllTransitivesRule.class);

// Testcontainers dependencies
components.withModule("org.testcontainers:testcontainers", ExcludeAllTransitivesRule.class);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We lately have removed our requirement for no transitive dependencies. lets rely on transitives here for docker java etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wow, we did?

testImplementation project(':test:framework')
api "junit:junit:${versions.junit}"
api project(':test:fixtures:testcontainer-utils')
api("org.testcontainers:testcontainers:${versions.testcontainer}") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

some more dependency cleanup

api("org.testcontainers:testcontainers:${versions.testcontainer}") {
transitive = false
}
implementation("commons-io:commons-io:2.15.1")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we rely on IOUtils which we previously used a shaded class shipped with testcontainer

super(image);
}

@Override
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wrap this in a junit4 rule api

import org.junit.runners.model.Statement;
import org.testcontainers.containers.Network;

public class Junit4NetworkRule implements TestRule {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Util class to keep support for Network as rule

@prdoyle
Copy link
Contributor

prdoyle commented Nov 25, 2025

Is anything needed for serverless? Or is this everything?

@breskeby breskeby force-pushed the update-testcontainer-version branch from 3e7102c to 6f76ccc Compare November 25, 2025 22:10
@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Nov 25, 2025
@breskeby breskeby force-pushed the update-testcontainer-version branch 2 times, most recently from f510430 to d3506c4 Compare November 26, 2025 11:12
@breskeby
Copy link
Contributor Author

Is anything needed for serverless? Or is this everything?

Yes, we have a linked PR addressing these

@breskeby breskeby force-pushed the update-testcontainer-version branch 2 times, most recently from 2fabf10 to 6f59bf2 Compare November 28, 2025 19:02
@breskeby breskeby force-pushed the update-testcontainer-version branch from bc1cd2d to 97a9cd7 Compare November 29, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Delivery/Build Build or test infrastructure >non-issue serverless-linked Added by automation, don't add manually Team:Delivery Meta label for Delivery team v8.19.9 v9.1.9 v9.2.3 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants