Skip to content

Commit 09455f1

Browse files
authored
chore: bump testcontainers-modules to 0.14 and remove testcontainers dep (#19620)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Supersedes #19010 ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> We don't actually need the dependency on `testcontainers` per their README: > **Note**: you don't need to explicitly depend on `testcontainers` as it's re-exported dependency of `testcontainers-modules` with aligned version between these crates. - https://github.com/testcontainers/testcontainers-rs-modules-community/blob/331abcc6e61d9d76e5f8e6ec91566ce874d8fc32/README.md It was causing some version conflict issues when we tried to bump `testcontainers-modules` so remove it and keep only modules, fixing the code to use the re-exports. ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Remove `testcontainers` dependency, amend imports to use re-exports of `testcontainers-modules`. Bump `testcontainers-modules` from 0.13 to 0.14. ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> CLI test suite compiles and runs. Ran the SLT postgres compat mode locally successfully: ```sh datafusion (testcontainers-0.14)$ PG_COMPAT=true PG_URI="postgresql://[email protected]/postgres" cargo test --features=postgres --test sqllogictests Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s Running bin/sqllogictests.rs (/Users/jeffrey/.cargo_target_cache/debug/deps/sqllogictests-223c346f75c524e2) Completed 6 test files in 0 seconds ``` ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> No. <!-- If there are any breaking changes to public APIs, please add the `api change` label. -->
1 parent 70daf88 commit 09455f1

File tree

6 files changed

+33
-36
lines changed

6 files changed

+33
-36
lines changed

Cargo.lock

Lines changed: 24 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ sqlparser = { version = "0.59.0", default-features = false, features = ["std", "
185185
strum = "0.27.2"
186186
strum_macros = "0.27.2"
187187
tempfile = "3"
188-
testcontainers = { version = "0.25.2", features = ["default"] }
189-
testcontainers-modules = { version = "0.13" }
188+
testcontainers-modules = { version = "0.14" }
190189
tokio = { version = "1.48", features = ["macros", "rt", "sync"] }
191190
url = "2.5.7"
192191
zstd = { version = "0.13", default-features = false }

datafusion-cli/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ ctor = { workspace = true }
7474
insta = { workspace = true }
7575
insta-cmd = "0.6.0"
7676
rstest = { workspace = true }
77-
testcontainers = { workspace = true }
7877
testcontainers-modules = { workspace = true, features = ["minio"] }

datafusion-cli/tests/cli_integration.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ use insta::{Settings, glob};
2424
use insta_cmd::{assert_cmd_snapshot, get_cargo_bin};
2525
use std::path::PathBuf;
2626
use std::{env, fs};
27-
use testcontainers::core::{CmdWaitFor, ExecCommand, Mount};
28-
use testcontainers::runners::AsyncRunner;
29-
use testcontainers::{ContainerAsync, ImageExt, TestcontainersError};
3027
use testcontainers_modules::minio;
28+
use testcontainers_modules::testcontainers::core::{CmdWaitFor, ExecCommand, Mount};
29+
use testcontainers_modules::testcontainers::runners::AsyncRunner;
30+
use testcontainers_modules::testcontainers::{
31+
ContainerAsync, ImageExt, TestcontainersError,
32+
};
3133

3234
fn cli() -> Command {
3335
Command::new(get_cargo_bin("datafusion-cli"))

datafusion/sqllogictest/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ rust_decimal = { version = "1.38.0", features = ["tokio-pg"] }
6363
sqllogictest = "0.28.4"
6464
sqlparser = { workspace = true }
6565
tempfile = { workspace = true }
66-
testcontainers = { workspace = true, optional = true }
6766
testcontainers-modules = { workspace = true, features = ["postgres"], optional = true }
6867
thiserror = "2.0.17"
6968
tokio = { workspace = true }
@@ -77,7 +76,6 @@ postgres = [
7776
"chrono",
7877
"postgres-types",
7978
"postgres-protocol",
80-
"testcontainers",
8179
"testcontainers-modules",
8280
"tokio-postgres",
8381
]

datafusion/sqllogictest/bin/postgres_container.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ use std::env::set_var;
2323
use std::future::Future;
2424
use std::sync::LazyLock;
2525
use std::{env, thread};
26-
use testcontainers::ImageExt;
27-
use testcontainers::core::IntoContainerPort;
28-
use testcontainers::runners::AsyncRunner;
2926
use testcontainers_modules::postgres;
27+
use testcontainers_modules::testcontainers::ImageExt;
28+
use testcontainers_modules::testcontainers::core::IntoContainerPort;
29+
use testcontainers_modules::testcontainers::runners::AsyncRunner;
3030
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
3131
use tokio::sync::{Mutex, mpsc};
3232

0 commit comments

Comments
 (0)