-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix OAuthBearer OIDC preprocessor directive when using CMake without CURL #5136
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
Merged
Emanuele Sabellico (emasab)
merged 9 commits into
master
from
dev_fix_oauthbearer_oidc_check
Jun 25, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
659c053
Fix compilation with CMake and without CURL
emasab e3f0994
Run build configuration tests with cmake,
emasab d8e21ca
Skip tests 0066 if dlopen is unsupported
emasab e0f3898
Set specific version
emasab 3dd9186
Fix rd_atomic{32,64}_set returning the new value in CMake builds
emasab 4c4485e
Add changelog entries for CMake CURL and atomics fixes
emasab 6a90668
Fix rd_atomic64_cas preprocessor branch ordering for available atomics
emasab b2f6dc2
set HAVE_ATOMICS_32 and HAVE_ATOMICS_64 to yes when one the options i…
emasab b279cff
Fix flaky do_test_fast_metadata_refresh by widening metadata request …
emasab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,3 +24,5 @@ user_scram | |
| list_offsets | ||
| elect_leaders | ||
| share_consumer | ||
| share_consumer_commit_async | ||
| share_consumer_commit_sync | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| FROM alpine:3.16.9 | ||
|
|
||
| ARG UID | ||
|
|
||
| RUN apk add bash gcc g++ make cmake git bsd-compat-headers | ||
| RUN mkdir -p /home/user | ||
| WORKDIR /home/user | ||
| RUN chown -R ${UID} /home/user | ||
| USER ${UID} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| FROM quay.io/pypa/manylinux_2_28_x86_64:2024.07.01-1 | ||
|
|
||
| ARG UID | ||
|
|
||
| RUN mkdir -p /home/user | ||
| WORKDIR /home/user | ||
| RUN chown -R ${UID} /home/user | ||
| USER ${UID} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,48 @@ | ||
| #!/bin/bash | ||
| #!/bin/sh | ||
| set -e | ||
| build_tool="$1" | ||
| docker_image_tag="$2" | ||
|
|
||
| if [ -n "$docker_image_tag" ]; then | ||
| echo "Running in docker image tag: $docker_image_tag" | ||
| # Running on the host, spin up the docker builder. | ||
| ./packaging/tools/run-in-docker.sh $docker_image_tag ./packaging/tools/build-configurations-checks.sh $build_tool | ||
| # Only reached on exec error | ||
| exit $? | ||
| fi | ||
|
|
||
| if [ -z "$build_tool" ]; then | ||
| # Default to using make if no build tool is specified. | ||
| build_tool="make" | ||
| fi | ||
|
|
||
| # Clone the repo so other builds are unaffected of what we're doing | ||
| # and we get a pristine build tree. | ||
| git clone /librdkafka /home/user/librdkafka | ||
|
|
||
| cd /home/user/librdkafka | ||
|
|
||
| # Disable all flags to make sure it | ||
| # compiles correctly in all cases | ||
| ./configure --install-deps --disable-ssl --disable-gssapi \ | ||
| if [ "$build_tool" = "make" ]; then | ||
| ./configure --disable-ssl --disable-gssapi \ | ||
| --disable-curl --disable-zlib \ | ||
| --disable-zstd --disable-lz4-ext --disable-regex-ext \ | ||
| --disable-c11threads --disable-syslog \ | ||
| --enable-werror --enable-devel | ||
| cat ./config.h | ||
| else | ||
| cmake -DWITH_SSL=OFF -DWITH_SASL_CYRUS=OFF \ | ||
| -DWITH_CURL=OFF -DWITH_ZLIB=OFF \ | ||
| -DWITH_ZSTD=OFF -DHAVE_REGEX=OFF -DWITH_C11THREADS=OFF \ | ||
| -DWITH_LIBDL=OFF | ||
| cat ./generated/config.h | ||
| fi | ||
| make -j | ||
|
|
||
| export CI=true | ||
| if [ "0$build_tool" = "0make" ]; then | ||
| make -j -C tests run_local_quick | ||
| else | ||
| ctest -VV -R RdKafkaTestBrokerLessQuick --output-on-failure | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Isn't this branch a dead code in case of CMake and eventually ending up using
#elsebranch which is safe though because lock would be defined given HAVE_ATOMICS_32 is 0?CMake ends up setting only HAVE_ATOMICS_32_SYNC reference and not HAVE_ATOMICS_32. They both seem mutually exclusive in case of CMake. So this branch would never be entered right?
Should we change to something like below which seems to handle all scenarios and isn't based on the invariant
HAVE_ATOMICS_32_ATOMICThe only tradeoff I see is that default assumes
__atomicis available.Uh oh!
There was an error while loading. Please reload this page.
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.
I was uniforming cmake in this PR to set the same values as mklove, so
HAVE_ATOMICS_32for example is set to 1 in both cases and then eitherHAVE_ATOMICS_32_ATOMICorHAVE_ATOMICS_32_SYNCis set to 1.Just there's a case when using
try_compile(HAVE_ATOMICS_32_SYNCwhereHAVE_ATOMICS_32isn't set to true. I've pushed the cmake change. In mklove instead there are cases whereHAVE_ATOMICS_32_SYNCorHAVE_ATOMICS_32_ATOMICaren't defined ifHAVE_ATOMICS_32is false.