Skip to content

Conversation

@Marwes
Copy link
Contributor

@Marwes Marwes commented Nov 5, 2025

Mainly want to see an update to to the re-connection issue on 2.10. Changes the test kafka to bitnamilegacy/kafka as all images were moved
here. Seems to be a risk that these images will also be removed at some point so finding another source for running kafka for testing would be good.

Closes #789

actgardner and others added 2 commits November 5, 2025 14:41
Mainly want to see an update to to the reconnection issue on 2.10. Changes the test kafka to bitnamilegacy/kafka as all images were moved
here. Seems to be a risk that these images will also be removed at some point so finding another source for running kafka for testing would be good.

Closes fede1024#789
@thalesfragoso
Copy link

Any idea on what's wrong with CI? I see a cmake command close to the failure with "-DWITH_CURL=0", which is weird in a build with --features curl-static.

@Marwes
Copy link
Contributor Author

Marwes commented Nov 10, 2025

I don't believe it is running with curl-static? ./test_suite.sh doesn't run with that feature.

@thalesfragoso
Copy link

@Marwes I think the CI is from .github/workflows/ci.yml.

@Marwes
Copy link
Contributor Author

Marwes commented Nov 11, 2025

The apt install fixed the version test jobs as they didn't specify static curl, but the check step is run with curl-static so why that one fails is more of a mystery.

@thalesfragoso
Copy link

Looking at the cmake command in the CI we have:

LC_ALL="C" "cmake" "/home/runner/work/rust-rdkafka/rust-rdkafka/rdkafka-sys/librdkafka" "-DRDKAFKA_BUILD_STATIC=1" "-DRDKAFKA_BUILD_TESTS=0" "-DRDKAFKA_BUILD_EXAMPLES=0" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" "-DWITH_ZLIB=1" "-DWITH_CURL=0" "-DWITH_SSL=1" "-DWITH_SASL_SCRAM=1" "-DWITH_SASL_OAUTHBEARER=1" "-DWITH_SASL=1" "-DWITH_ZSTD=1" "-DENABLE_LZ4_EXT=0" "-DCMAKE_INSTALL_PREFIX=/home/runner/work/rust-rdkafka/rust-rdkafka/target/debug/build/rdkafka-sys-ebb484974c2b2f31/out" "-DCMAKE_C_FLAGS= -I/home/runner/work/rust-rdkafka/rust-rdkafka/target/debug/build/sasl2-sys-b9d3f63562930dce/out/install/include -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -I/home/runner/work/rust-rdkafka/rust-rdkafka/target/debug/build/sasl2-sys-b9d3f63562930dce/out/install/include -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"

We can see that it included the paths for sasl but not curl, and it has -DWITH_CURL=0, so it's hitting the else branch in

if env::var("CARGO_FEATURE_CURL").is_ok() {
config.define("WITH_CURL", "1");
config.register_dep("curl");
if let Ok(curl_root) = env::var("DEP_CURL_ROOT") {
config.define("CURL_STATICLIB", "1");
cmake_library_paths.push(format!("{}/lib", curl_root));
config.cflag("-DCURL_STATICLIB");
config.cxxflag("-DCURL_STATICLIB");
config.cflag(format!("-I{}/include", curl_root));
config.cxxflag(format!("-I{}/include", curl_root));
config.cflag(format!("-L{}/lib", curl_root));
config.cxxflag(format!("-L{}/lib", curl_root));
//FIXME: Upstream should be copying this in their build.rs
fs::copy(
format!("{}/build/libcurl.a", curl_root),
format!("{}/lib/libcurl.a", curl_root),
)
.unwrap();
}
} else {
config.define("WITH_CURL", "0");
}

It shouldn't though, due to the feature being enable. However, librdkafka shouldn't try to build curl with -DWITH_CURL=0, so maybe that changed in these last releases...

My guess is that that code in build.rs always hit the else branch and didn't test the curl feature. But it was okay because librdkafka was playing ball.

Can you try also enabling the curl feature in CI, as opposed to just curl-static. Actually, the proper fix might be to change the if in build.rs:

- if env::var("CARGO_FEATURE_CURL").is_ok() {
+ if env::var("CARGO_FEATURE_CURL").is_ok() || env::var("CARGO_FEATURE_CURL_STATIC").is_ok() {

@thalesfragoso
Copy link

Oh, the regression is probably due to the new OAUTHBEARER OIDC feature:

https://github.com/confluentinc/librdkafka/blob/616fb6e8074e82e0302f1c7d2896d7e577f8eb9b/src/rdkafka_conf.c#L59-L61

I wonder if it's enabled by default...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants