karafka-rdkafka 0.21.0-x86_64-linux-musl → 0.22.0-x86_64-linux-musl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -0
- data/ext/librdkafka.so +0 -0
- data/karafka-rdkafka.gemspec +33 -6
- data/lib/rdkafka/version.rb +3 -3
- data/renovate.json +5 -17
- metadata +2 -67
- data/.github/CODEOWNERS +0 -3
- data/.github/FUNDING.yml +0 -1
- data/.github/workflows/ci_linux_alpine_x86_64_musl.yml +0 -197
- data/.github/workflows/ci_linux_alpine_x86_64_musl_complementary.yml +0 -264
- data/.github/workflows/ci_linux_debian_x86_64_gnu.yml +0 -271
- data/.github/workflows/ci_linux_debian_x86_64_gnu_complementary.yml +0 -334
- data/.github/workflows/ci_linux_ubuntu_aarch64_gnu.yml +0 -271
- data/.github/workflows/ci_linux_ubuntu_aarch64_gnu_complementary.yml +0 -295
- data/.github/workflows/ci_linux_ubuntu_x86_64_gnu.yml +0 -281
- data/.github/workflows/ci_linux_ubuntu_x86_64_gnu_complementary.yml +0 -294
- data/.github/workflows/ci_macos_arm64.yml +0 -284
- data/.github/workflows/push_linux_aarch64_gnu.yml +0 -65
- data/.github/workflows/push_linux_x86_64_gnu.yml +0 -65
- data/.github/workflows/push_linux_x86_64_musl.yml +0 -79
- data/.github/workflows/push_macos_arm64.yml +0 -54
- data/.github/workflows/push_ruby.yml +0 -37
- data/.github/workflows/trigger-wiki-refresh.yml +0 -30
- data/.github/workflows/verify-action-pins.yml +0 -16
- data/.gitignore +0 -16
- data/.rspec +0 -3
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.yardopts +0 -2
- data/dist/cyrus-sasl-2.1.28.tar.gz +0 -0
- data/dist/krb5-1.21.3.tar.gz +0 -0
- data/dist/openssl-3.0.16.tar.gz +0 -0
- data/dist/zlib-1.3.1.tar.gz +0 -0
- data/dist/zstd-1.5.7.tar.gz +0 -0
- data/ext/README.md +0 -19
- data/ext/Rakefile +0 -131
- data/ext/build_common.sh +0 -376
- data/ext/build_linux_aarch64_gnu.sh +0 -326
- data/ext/build_linux_x86_64_gnu.sh +0 -317
- data/ext/build_linux_x86_64_musl.sh +0 -773
- data/ext/build_macos_arm64.sh +0 -557
- data/ext/generate-ssl-certs.sh +0 -109
- data/spec/integrations/ssl_stress_spec.rb +0 -121
- data/spec/lib/rdkafka/abstract_handle_spec.rb +0 -117
- data/spec/lib/rdkafka/admin/create_acl_handle_spec.rb +0 -56
- data/spec/lib/rdkafka/admin/create_acl_report_spec.rb +0 -18
- data/spec/lib/rdkafka/admin/create_topic_handle_spec.rb +0 -54
- data/spec/lib/rdkafka/admin/create_topic_report_spec.rb +0 -16
- data/spec/lib/rdkafka/admin/delete_acl_handle_spec.rb +0 -85
- data/spec/lib/rdkafka/admin/delete_acl_report_spec.rb +0 -72
- data/spec/lib/rdkafka/admin/delete_topic_handle_spec.rb +0 -54
- data/spec/lib/rdkafka/admin/delete_topic_report_spec.rb +0 -16
- data/spec/lib/rdkafka/admin/describe_acl_handle_spec.rb +0 -85
- data/spec/lib/rdkafka/admin/describe_acl_report_spec.rb +0 -73
- data/spec/lib/rdkafka/admin_spec.rb +0 -982
- data/spec/lib/rdkafka/bindings_spec.rb +0 -198
- data/spec/lib/rdkafka/callbacks_spec.rb +0 -20
- data/spec/lib/rdkafka/config_spec.rb +0 -258
- data/spec/lib/rdkafka/consumer/headers_spec.rb +0 -73
- data/spec/lib/rdkafka/consumer/message_spec.rb +0 -139
- data/spec/lib/rdkafka/consumer/partition_spec.rb +0 -57
- data/spec/lib/rdkafka/consumer/topic_partition_list_spec.rb +0 -248
- data/spec/lib/rdkafka/consumer_spec.rb +0 -1343
- data/spec/lib/rdkafka/error_spec.rb +0 -95
- data/spec/lib/rdkafka/metadata_spec.rb +0 -79
- data/spec/lib/rdkafka/native_kafka_spec.rb +0 -130
- data/spec/lib/rdkafka/producer/delivery_handle_spec.rb +0 -60
- data/spec/lib/rdkafka/producer/delivery_report_spec.rb +0 -25
- data/spec/lib/rdkafka/producer/partitions_count_cache_spec.rb +0 -359
- data/spec/lib/rdkafka/producer_spec.rb +0 -1527
- data/spec/spec_helper.rb +0 -230
@@ -1,294 +0,0 @@
|
|
1
|
-
# CI Strategy: Complementary Testing for Ubuntu Precompiled Binaries and Extended Compatibility
|
2
|
-
#
|
3
|
-
# This workflow runs complementary tests that don't need to block PRs but are essential
|
4
|
-
# for catching regressions in precompiled binary distribution, edge case Ruby versions,
|
5
|
-
# and system library compatibility. It complements the main CI by testing scenarios
|
6
|
-
# that are stable-but-critical on a nightly schedule.
|
7
|
-
#
|
8
|
-
# WHY COMPLEMENTARY TESTING:
|
9
|
-
# - Precompiled binary testing is stable (rarely breaks from code changes)
|
10
|
-
# - Edge Ruby versions (3.1, 3.5-preview, JRuby) need testing but shouldn't block PRs
|
11
|
-
# - Integration specs test OS library compatibility, which changes with system updates
|
12
|
-
# - These tests catch regressions from external changes (system libs, Ruby updates)
|
13
|
-
# - Running every 3 days to prevent these slower tests from blocking PR velocity
|
14
|
-
# - Manual triggering allows testing workflow changes before they go into schedule
|
15
|
-
#
|
16
|
-
# PRECOMPILED BINARY TESTING (build_precompiled + specs_precompiled):
|
17
|
-
# - Tests static library distribution works across Ubuntu versions
|
18
|
-
# - Validates precompiled libraries don't have unexpected system dependencies
|
19
|
-
# - Ensures binary compatibility between different Ubuntu LTS versions
|
20
|
-
# - Tests SSL/TLS connectivity with precompiled binaries
|
21
|
-
# - Validates that removing build tools doesn't break precompiled usage
|
22
|
-
#
|
23
|
-
# EXTENDED COMPATIBILITY TESTING:
|
24
|
-
# - Edge case Ruby versions: 3.1, 3.5.0-preview1, JRuby-10.0
|
25
|
-
# - Integration specs testing system library compatibility
|
26
|
-
# - Both compilation and precompiled flows for comprehensive coverage
|
27
|
-
# - Cross-platform compatibility validation
|
28
|
-
#
|
29
|
-
# SCHEDULING STRATEGY:
|
30
|
-
# - Runs every 3 days at 2 AM to catch system/library changes from base image updates
|
31
|
-
# - Triggers on workflow file changes to validate CI modifications
|
32
|
-
# - Manual dispatch available for ad-hoc regression testing
|
33
|
-
# - Separate artifact naming prevents interference with main CI
|
34
|
-
#
|
35
|
-
# This approach ensures comprehensive coverage while keeping PR CI fast and focused
|
36
|
-
# on code-related issues rather than infrastructure/system regressions.
|
37
|
-
|
38
|
-
name: CI Linux Complementary Ubuntu x86_64 GNU
|
39
|
-
|
40
|
-
concurrency:
|
41
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
42
|
-
cancel-in-progress: true
|
43
|
-
|
44
|
-
on:
|
45
|
-
schedule:
|
46
|
-
- cron: '0 2 */3 * *'
|
47
|
-
workflow_dispatch:
|
48
|
-
push:
|
49
|
-
paths:
|
50
|
-
- '.github/workflows/ci_linux_ubuntu_x86_64_gnu_complementary.yml'
|
51
|
-
branches: [ main, master ]
|
52
|
-
pull_request:
|
53
|
-
paths:
|
54
|
-
- '.github/workflows/ci_linux_ubuntu_x86_64_gnu_complementary.yml'
|
55
|
-
branches: [ main, master ]
|
56
|
-
|
57
|
-
permissions:
|
58
|
-
contents: read
|
59
|
-
|
60
|
-
env:
|
61
|
-
BUNDLE_RETRY: 6
|
62
|
-
BUNDLE_JOBS: 4
|
63
|
-
|
64
|
-
jobs:
|
65
|
-
build_precompiled:
|
66
|
-
timeout-minutes: 30
|
67
|
-
# We precompile on older Ubuntu and check compatibility by running specs since we aim to
|
68
|
-
# release only one precompiled version for all supported Ubuntu versions
|
69
|
-
# This is why we do not want Renovate to update it automatically
|
70
|
-
runs-on: ubuntu-22.04 # renovate: ignore
|
71
|
-
steps:
|
72
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
73
|
-
with:
|
74
|
-
fetch-depth: 0
|
75
|
-
- name: Install build dependencies
|
76
|
-
run: |
|
77
|
-
sudo apt-get update
|
78
|
-
sudo apt-get install -y --no-install-recommends \
|
79
|
-
build-essential \
|
80
|
-
gcc \
|
81
|
-
g++ \
|
82
|
-
make \
|
83
|
-
tar \
|
84
|
-
gzip \
|
85
|
-
wget \
|
86
|
-
curl \
|
87
|
-
file \
|
88
|
-
pkg-config \
|
89
|
-
autoconf \
|
90
|
-
automake \
|
91
|
-
libtool \
|
92
|
-
python3 \
|
93
|
-
git \
|
94
|
-
ca-certificates \
|
95
|
-
patch \
|
96
|
-
libsasl2-dev \
|
97
|
-
libssl-dev \
|
98
|
-
zlib1g-dev \
|
99
|
-
libzstd-dev \
|
100
|
-
bison \
|
101
|
-
flex \
|
102
|
-
perl \
|
103
|
-
binutils-dev
|
104
|
-
- name: Cache build-tmp directory
|
105
|
-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
106
|
-
with:
|
107
|
-
path: ext/build-tmp
|
108
|
-
key: build-tmp-${{ runner.os }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2
|
109
|
-
- name: Build precompiled librdkafka.so
|
110
|
-
run: |
|
111
|
-
cd ext
|
112
|
-
./build_linux_x86_64_gnu.sh
|
113
|
-
- name: Upload precompiled library
|
114
|
-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
115
|
-
with:
|
116
|
-
name: librdkafka-precompiled-ubuntu-complementary
|
117
|
-
path: ext/
|
118
|
-
retention-days: 1
|
119
|
-
|
120
|
-
specs_install:
|
121
|
-
timeout-minutes: 50
|
122
|
-
strategy:
|
123
|
-
fail-fast: false
|
124
|
-
matrix:
|
125
|
-
ruby:
|
126
|
-
- '3.5.0-preview1'
|
127
|
-
- '3.4'
|
128
|
-
- '3.3'
|
129
|
-
- '3.2'
|
130
|
-
- '3.1'
|
131
|
-
- 'jruby-10.0'
|
132
|
-
ubuntu-version: ['22.04', '24.04']
|
133
|
-
include:
|
134
|
-
- ruby: '3.4'
|
135
|
-
coverage: 'true'
|
136
|
-
- ruby: 'jruby-10.0'
|
137
|
-
continue-on-error: true
|
138
|
-
runs-on: ubuntu-${{ matrix.ubuntu-version }}
|
139
|
-
steps:
|
140
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
141
|
-
with:
|
142
|
-
fetch-depth: 0
|
143
|
-
- name: Set up Ruby
|
144
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
145
|
-
with:
|
146
|
-
ruby-version: ${{matrix.ruby}}
|
147
|
-
bundler-cache: false
|
148
|
-
- name: Start Kafka with Docker Compose
|
149
|
-
run: |
|
150
|
-
./ext/generate-ssl-certs.sh
|
151
|
-
docker compose -f docker-compose-ssl.yml up -d
|
152
|
-
echo "Waiting for Kafka to be ready..."
|
153
|
-
|
154
|
-
sleep 10
|
155
|
-
|
156
|
-
echo "=== Container status ==="
|
157
|
-
docker compose ps kafka
|
158
|
-
|
159
|
-
for i in {1..30}; do
|
160
|
-
echo "=== Attempt $i/30 ==="
|
161
|
-
|
162
|
-
echo "Testing kafka-topics command..."
|
163
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
164
|
-
echo "Kafka topics command succeeded!"
|
165
|
-
break
|
166
|
-
else
|
167
|
-
echo "Kafka topics command failed (exit code: $?)"
|
168
|
-
fi
|
169
|
-
|
170
|
-
echo "Sleeping 2 seconds..."
|
171
|
-
sleep 2
|
172
|
-
done
|
173
|
-
- name: Install dependencies
|
174
|
-
env:
|
175
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
176
|
-
continue-on-error: ${{ matrix.continue-on-error || false }}
|
177
|
-
run: |
|
178
|
-
bundle install
|
179
|
-
- name: Build gem with mini_portile
|
180
|
-
continue-on-error: ${{ matrix.continue-on-error || false }}
|
181
|
-
run: |
|
182
|
-
set -e
|
183
|
-
cd ext && bundle exec rake
|
184
|
-
cd ..
|
185
|
-
- name: Run all specs in SSL (compiled flow)
|
186
|
-
env:
|
187
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
188
|
-
KAFKA_SSL_ENABLED: "true"
|
189
|
-
continue-on-error: ${{ matrix.continue-on-error || false }}
|
190
|
-
run: |
|
191
|
-
bundle exec rspec
|
192
|
-
|
193
|
-
- name: Run integration specs (compiled flow)
|
194
|
-
continue-on-error: ${{ matrix.continue-on-error || false }}
|
195
|
-
run: |
|
196
|
-
for file in $(ls spec/integrations/*_spec.rb); do
|
197
|
-
echo "Running $file with Ruby ${{ matrix.ruby }}";
|
198
|
-
bundle exec ruby "$file" || exit 1;
|
199
|
-
done
|
200
|
-
|
201
|
-
specs_precompiled:
|
202
|
-
timeout-minutes: 30
|
203
|
-
needs: build_precompiled
|
204
|
-
strategy:
|
205
|
-
fail-fast: false
|
206
|
-
matrix:
|
207
|
-
ruby:
|
208
|
-
- '3.5.0-preview1'
|
209
|
-
- '3.4'
|
210
|
-
- '3.3'
|
211
|
-
- '3.2'
|
212
|
-
- '3.1'
|
213
|
-
ubuntu-version: ['22.04', '24.04']
|
214
|
-
|
215
|
-
runs-on: ubuntu-${{ matrix.ubuntu-version }}
|
216
|
-
steps:
|
217
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
218
|
-
with:
|
219
|
-
fetch-depth: 0
|
220
|
-
- name: Download precompiled library
|
221
|
-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
222
|
-
with:
|
223
|
-
name: librdkafka-precompiled-ubuntu-complementary
|
224
|
-
path: ext/
|
225
|
-
- name: Set up Ruby
|
226
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
227
|
-
with:
|
228
|
-
ruby-version: ${{ matrix.ruby }}
|
229
|
-
bundler-cache: false
|
230
|
-
- name: Start Kafka with Docker Compose
|
231
|
-
run: |
|
232
|
-
./ext/generate-ssl-certs.sh
|
233
|
-
docker compose -f docker-compose-ssl.yml up -d
|
234
|
-
echo "Waiting for Kafka to be ready..."
|
235
|
-
|
236
|
-
sleep 10
|
237
|
-
|
238
|
-
echo "=== Container status ==="
|
239
|
-
docker compose ps kafka
|
240
|
-
for i in {1..30}; do
|
241
|
-
echo "=== Attempt $i/30 ==="
|
242
|
-
|
243
|
-
echo "Testing kafka-topics command..."
|
244
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
245
|
-
echo "Kafka topics command succeeded!"
|
246
|
-
break
|
247
|
-
else
|
248
|
-
echo "Kafka topics command failed (exit code: $?)"
|
249
|
-
fi
|
250
|
-
|
251
|
-
echo "Sleeping 2 seconds..."
|
252
|
-
sleep 2
|
253
|
-
done
|
254
|
-
- name: Install bundle with precompiled library
|
255
|
-
env:
|
256
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
257
|
-
run: |
|
258
|
-
bundle install
|
259
|
-
echo "Bundle install completed with precompiled library"
|
260
|
-
- name: Remove build dependencies to test static linking
|
261
|
-
continue-on-error: true
|
262
|
-
run: |
|
263
|
-
echo "Removing build dependencies to verify precompiled library is truly self-contained..."
|
264
|
-
|
265
|
-
# Remove packages one by one to avoid dependency conflicts
|
266
|
-
packages_to_remove="build-essential gcc g++ make patch tar wget libsasl2-dev libssl-dev zlib1g-dev libzstd-dev"
|
267
|
-
|
268
|
-
for package in $packages_to_remove; do
|
269
|
-
if dpkg -l | grep -q "^ii.*$package "; then
|
270
|
-
echo "Removing $package..."
|
271
|
-
sudo dpkg --remove --force-depends $package 2>/dev/null || echo "Could not remove $package"
|
272
|
-
else
|
273
|
-
echo "$package is not installed"
|
274
|
-
fi
|
275
|
-
done
|
276
|
-
|
277
|
-
echo "Build dependencies removal completed"
|
278
|
-
echo "Remaining build tools:"
|
279
|
-
which gcc g++ make 2>/dev/null || echo "No build tools found in PATH (good!)"
|
280
|
-
- name: Run specs with precompiled library and SSL
|
281
|
-
env:
|
282
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
283
|
-
KAFKA_SSL_ENABLED: "true"
|
284
|
-
run: |
|
285
|
-
bundle exec rspec
|
286
|
-
|
287
|
-
- name: Run integration specs (precompiled flow)
|
288
|
-
env:
|
289
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
290
|
-
run: |
|
291
|
-
for file in $(ls spec/integrations/*_spec.rb); do
|
292
|
-
echo "Running $file with Ruby ${{ matrix.ruby }} (precompiled)";
|
293
|
-
bundle exec ruby "$file" || exit 1;
|
294
|
-
done
|
@@ -1,284 +0,0 @@
|
|
1
|
-
name: CI macOS ARM64
|
2
|
-
|
3
|
-
concurrency:
|
4
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
5
|
-
cancel-in-progress: true
|
6
|
-
|
7
|
-
on:
|
8
|
-
pull_request:
|
9
|
-
branches: [ main, master ]
|
10
|
-
push:
|
11
|
-
branches: [ main, master ]
|
12
|
-
schedule:
|
13
|
-
- cron: '0 1 * * *'
|
14
|
-
|
15
|
-
permissions:
|
16
|
-
contents: read
|
17
|
-
|
18
|
-
env:
|
19
|
-
BUNDLE_RETRY: 6
|
20
|
-
BUNDLE_JOBS: 4
|
21
|
-
# Renovate can track and update this version
|
22
|
-
CONFLUENT_VERSION: "8.0.0"
|
23
|
-
|
24
|
-
jobs:
|
25
|
-
specs_install:
|
26
|
-
timeout-minutes: 45
|
27
|
-
strategy:
|
28
|
-
fail-fast: false
|
29
|
-
matrix:
|
30
|
-
ruby:
|
31
|
-
- '3.5.0-preview1'
|
32
|
-
- '3.4'
|
33
|
-
- '3.3'
|
34
|
-
- '3.2'
|
35
|
-
- '3.1'
|
36
|
-
macos-version:
|
37
|
-
- 'macos-14' # macOS 14 Sonoma (ARM64)
|
38
|
-
- 'macos-15' # macOS 15 Sequoia (ARM64)
|
39
|
-
include:
|
40
|
-
- ruby: '3.4'
|
41
|
-
macos-version: 'macos-15'
|
42
|
-
coverage: 'true'
|
43
|
-
exclude:
|
44
|
-
- ruby: '3.5.0-preview1'
|
45
|
-
macos-version: 'macos-14'
|
46
|
-
runs-on: ${{ matrix.macos-version }}
|
47
|
-
steps:
|
48
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
49
|
-
with:
|
50
|
-
fetch-depth: 0
|
51
|
-
- name: Install Bash 4+ and Kerberos
|
52
|
-
run: |
|
53
|
-
brew install bash
|
54
|
-
brew list krb5 &>/dev/null || brew install krb5
|
55
|
-
echo "/opt/homebrew/bin" >> $GITHUB_PATH
|
56
|
-
- name: Set up Ruby
|
57
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
58
|
-
with:
|
59
|
-
ruby-version: ${{matrix.ruby}}
|
60
|
-
bundler-cache: false
|
61
|
-
- name: Install and Start Confluent Community Kafka (KRaft)
|
62
|
-
run: |
|
63
|
-
brew install openjdk@17
|
64
|
-
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
|
65
|
-
export JAVA_HOME="/opt/homebrew/opt/openjdk@17"
|
66
|
-
|
67
|
-
curl -O "https://packages.confluent.io/archive/8.0/confluent-community-${CONFLUENT_VERSION}.tar.gz"
|
68
|
-
tar -xzf "confluent-community-${CONFLUENT_VERSION}.tar.gz"
|
69
|
-
|
70
|
-
export CONFLUENT_HOME="$(pwd)/confluent-${CONFLUENT_VERSION}"
|
71
|
-
export PATH="$CONFLUENT_HOME/bin:$PATH"
|
72
|
-
cd "$CONFLUENT_HOME"
|
73
|
-
|
74
|
-
# Find the correct server config
|
75
|
-
KRAFT_CONFIG=""
|
76
|
-
for config in "etc/kafka/kraft/server.properties" "config/kraft/server.properties" "etc/kafka/server.properties"; do
|
77
|
-
if [ -f "$config" ]; then
|
78
|
-
KRAFT_CONFIG="$config"
|
79
|
-
echo "Found config: $KRAFT_CONFIG"
|
80
|
-
break
|
81
|
-
fi
|
82
|
-
done
|
83
|
-
|
84
|
-
if [ -z "$KRAFT_CONFIG" ]; then
|
85
|
-
echo "❌ No server config found"
|
86
|
-
exit 1
|
87
|
-
fi
|
88
|
-
|
89
|
-
# Configure KRaft for single-node setup
|
90
|
-
cat >> "$KRAFT_CONFIG" << 'EOF'
|
91
|
-
|
92
|
-
# KRaft mode configuration for single-node setup
|
93
|
-
process.roles=broker,controller
|
94
|
-
node.id=1
|
95
|
-
controller.quorum.voters=1@127.0.0.1:9093
|
96
|
-
listeners=PLAINTEXT://127.0.0.1:9092,CONTROLLER://127.0.0.1:9093
|
97
|
-
controller.listener.names=CONTROLLER
|
98
|
-
inter.broker.listener.name=PLAINTEXT
|
99
|
-
log.dirs=/tmp/kraft-combined-logs
|
100
|
-
|
101
|
-
# Enable simple ACL authorization for testing
|
102
|
-
authorizer.class.name=org.apache.kafka.metadata.authorizer.StandardAuthorizer
|
103
|
-
super.users=User:ANONYMOUS
|
104
|
-
allow.everyone.if.no.acl.found=true
|
105
|
-
EOF
|
106
|
-
|
107
|
-
echo "Updated KRaft configuration"
|
108
|
-
|
109
|
-
CLUSTER_ID=$(bin/kafka-storage random-uuid)
|
110
|
-
bin/kafka-storage format -t "$CLUSTER_ID" -c "$KRAFT_CONFIG"
|
111
|
-
bin/kafka-server-start "$KRAFT_CONFIG" &
|
112
|
-
|
113
|
-
sleep 20
|
114
|
-
|
115
|
-
for i in {1..30}; do
|
116
|
-
if bin/kafka-topics --bootstrap-server 127.0.0.1:9092 --list >/dev/null 2>&1; then
|
117
|
-
echo "✅ Confluent Community ${CONFLUENT_VERSION} (KRaft) is ready!"
|
118
|
-
break
|
119
|
-
fi
|
120
|
-
[ $i -eq 30 ] && { echo "❌ Kafka failed to start"; exit 1; }
|
121
|
-
sleep 2
|
122
|
-
done
|
123
|
-
- name: Install dependencies
|
124
|
-
env:
|
125
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
126
|
-
run: |
|
127
|
-
bundle install
|
128
|
-
- name: Build gem with mini_portile
|
129
|
-
run: |
|
130
|
-
set -e
|
131
|
-
cd ext && bundle exec rake
|
132
|
-
cd ..
|
133
|
-
- name: Run all specs
|
134
|
-
env:
|
135
|
-
GITHUB_COVERAGE: ${{matrix.coverage}}
|
136
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
137
|
-
run: |
|
138
|
-
bundle exec rspec
|
139
|
-
|
140
|
-
build_precompiled:
|
141
|
-
timeout-minutes: 45
|
142
|
-
runs-on: macos-14
|
143
|
-
steps:
|
144
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
145
|
-
with:
|
146
|
-
fetch-depth: 0
|
147
|
-
- name: Install Bash 4+ and Kerberos
|
148
|
-
run: |
|
149
|
-
brew install bash
|
150
|
-
brew list krb5 &>/dev/null || brew install krb5
|
151
|
-
echo "/opt/homebrew/bin" >> $GITHUB_PATH
|
152
|
-
- name: Cache build-tmp directory
|
153
|
-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
154
|
-
with:
|
155
|
-
path: ext/build-tmp-macos
|
156
|
-
key: build-tmp-${{ runner.os }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2
|
157
|
-
- name: Build precompiled librdkafka for macOS ARM64
|
158
|
-
run: |
|
159
|
-
cd ext
|
160
|
-
/opt/homebrew/bin/bash ./build_macos_arm64.sh
|
161
|
-
- name: Upload precompiled library
|
162
|
-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
163
|
-
with:
|
164
|
-
name: librdkafka-precompiled-macos
|
165
|
-
path: ext/
|
166
|
-
retention-days: 1
|
167
|
-
|
168
|
-
specs_precompiled:
|
169
|
-
timeout-minutes: 30
|
170
|
-
needs: build_precompiled
|
171
|
-
strategy:
|
172
|
-
fail-fast: false
|
173
|
-
matrix:
|
174
|
-
ruby:
|
175
|
-
- '3.5.0-preview1'
|
176
|
-
- '3.4'
|
177
|
-
- '3.3'
|
178
|
-
- '3.2'
|
179
|
-
- '3.1'
|
180
|
-
macos-version:
|
181
|
-
- 'macos-14'
|
182
|
-
- 'macos-15'
|
183
|
-
include:
|
184
|
-
- ruby: '3.4'
|
185
|
-
macos-version: 'macos-15'
|
186
|
-
coverage: 'true'
|
187
|
-
exclude:
|
188
|
-
- ruby: '3.5.0-preview1'
|
189
|
-
macos-version: 'macos-14'
|
190
|
-
runs-on: ${{ matrix.macos-version }}
|
191
|
-
steps:
|
192
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
193
|
-
with:
|
194
|
-
fetch-depth: 0
|
195
|
-
- name: Download precompiled library
|
196
|
-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
197
|
-
with:
|
198
|
-
name: librdkafka-precompiled-macos
|
199
|
-
path: ext/
|
200
|
-
- name: Set up Ruby
|
201
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
202
|
-
with:
|
203
|
-
ruby-version: ${{ matrix.ruby }}
|
204
|
-
bundler-cache: false
|
205
|
-
- name: Install Bash 4+ and Kerberos
|
206
|
-
run: |
|
207
|
-
brew install bash
|
208
|
-
brew list krb5 &>/dev/null || brew install krb5
|
209
|
-
echo "/opt/homebrew/bin" >> $GITHUB_PATH
|
210
|
-
- name: Install and Start Confluent Community Kafka (KRaft)
|
211
|
-
run: |
|
212
|
-
brew install openjdk@17
|
213
|
-
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
|
214
|
-
export JAVA_HOME="/opt/homebrew/opt/openjdk@17"
|
215
|
-
|
216
|
-
curl -O "https://packages.confluent.io/archive/8.0/confluent-community-${CONFLUENT_VERSION}.tar.gz"
|
217
|
-
tar -xzf "confluent-community-${CONFLUENT_VERSION}.tar.gz"
|
218
|
-
|
219
|
-
export CONFLUENT_HOME="$(pwd)/confluent-${CONFLUENT_VERSION}"
|
220
|
-
export PATH="$CONFLUENT_HOME/bin:$PATH"
|
221
|
-
cd "$CONFLUENT_HOME"
|
222
|
-
|
223
|
-
# Find the correct server config
|
224
|
-
KRAFT_CONFIG=""
|
225
|
-
for config in "etc/kafka/kraft/server.properties" "config/kraft/server.properties" "etc/kafka/server.properties"; do
|
226
|
-
if [ -f "$config" ]; then
|
227
|
-
KRAFT_CONFIG="$config"
|
228
|
-
echo "Found config: $KRAFT_CONFIG"
|
229
|
-
break
|
230
|
-
fi
|
231
|
-
done
|
232
|
-
|
233
|
-
if [ -z "$KRAFT_CONFIG" ]; then
|
234
|
-
echo "❌ No server config found"
|
235
|
-
exit 1
|
236
|
-
fi
|
237
|
-
|
238
|
-
# Configure KRaft for single-node setup
|
239
|
-
cat >> "$KRAFT_CONFIG" << 'EOF'
|
240
|
-
|
241
|
-
# KRaft mode configuration for single-node setup
|
242
|
-
process.roles=broker,controller
|
243
|
-
node.id=1
|
244
|
-
controller.quorum.voters=1@127.0.0.1:9093
|
245
|
-
listeners=PLAINTEXT://127.0.0.1:9092,CONTROLLER://127.0.0.1:9093
|
246
|
-
controller.listener.names=CONTROLLER
|
247
|
-
inter.broker.listener.name=PLAINTEXT
|
248
|
-
log.dirs=/tmp/kraft-combined-logs
|
249
|
-
|
250
|
-
# Enable simple ACL authorization for testing
|
251
|
-
authorizer.class.name=org.apache.kafka.metadata.authorizer.StandardAuthorizer
|
252
|
-
super.users=User:ANONYMOUS
|
253
|
-
allow.everyone.if.no.acl.found=true
|
254
|
-
EOF
|
255
|
-
|
256
|
-
echo "Updated KRaft configuration"
|
257
|
-
|
258
|
-
CLUSTER_ID=$(bin/kafka-storage random-uuid)
|
259
|
-
bin/kafka-storage format -t "$CLUSTER_ID" -c "$KRAFT_CONFIG"
|
260
|
-
bin/kafka-server-start "$KRAFT_CONFIG" &
|
261
|
-
|
262
|
-
sleep 20
|
263
|
-
|
264
|
-
for i in {1..30}; do
|
265
|
-
if bin/kafka-topics --bootstrap-server 127.0.0.1:9092 --list >/dev/null 2>&1; then
|
266
|
-
echo "✅ Confluent Community ${CONFLUENT_VERSION} (KRaft) is ready!"
|
267
|
-
break
|
268
|
-
fi
|
269
|
-
[ $i -eq 30 ] && { echo "❌ Kafka failed to start"; exit 1; }
|
270
|
-
sleep 2
|
271
|
-
done
|
272
|
-
- name: Install bundle with precompiled library
|
273
|
-
env:
|
274
|
-
GITHUB_COVERAGE: ${{ matrix.coverage }}
|
275
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
276
|
-
run: |
|
277
|
-
bundle install
|
278
|
-
echo "Bundle install completed with precompiled library"
|
279
|
-
- name: Run specs with precompiled library
|
280
|
-
env:
|
281
|
-
GITHUB_COVERAGE: ${{ matrix.coverage }}
|
282
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
283
|
-
run: |
|
284
|
-
bundle exec rspec
|
@@ -1,65 +0,0 @@
|
|
1
|
-
name: Push Linux aarch64 GNU Platform Gem
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
tags:
|
6
|
-
- v*
|
7
|
-
|
8
|
-
permissions:
|
9
|
-
contents: read
|
10
|
-
|
11
|
-
env:
|
12
|
-
BUNDLE_RETRY: 6
|
13
|
-
BUNDLE_JOBS: 4
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
push:
|
17
|
-
if: github.repository_owner == 'karafka'
|
18
|
-
timeout-minutes: 30
|
19
|
-
# Same as CI, we build on the oldest possible for ABI compatibility
|
20
|
-
runs-on: ubuntu-22.04-arm # renovate: ignore
|
21
|
-
environment: deployment
|
22
|
-
permissions:
|
23
|
-
contents: write
|
24
|
-
id-token: write
|
25
|
-
steps:
|
26
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
27
|
-
with:
|
28
|
-
fetch-depth: 0
|
29
|
-
- name: Install build dependencies
|
30
|
-
run: |
|
31
|
-
sudo apt-get update
|
32
|
-
sudo apt-get install -y --no-install-recommends \
|
33
|
-
build-essential \
|
34
|
-
gcc \
|
35
|
-
make \
|
36
|
-
patch \
|
37
|
-
tar \
|
38
|
-
wget \
|
39
|
-
ca-certificates \
|
40
|
-
libsasl2-dev \
|
41
|
-
libssl-dev \
|
42
|
-
zlib1g-dev \
|
43
|
-
libzstd-dev
|
44
|
-
- name: Cache build-tmp directory
|
45
|
-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
46
|
-
with:
|
47
|
-
path: ext/build-tmp
|
48
|
-
key: build-tmp-${{ runner.os }}-${{ hashFiles('ext/*.sh') }}
|
49
|
-
- name: Set up Ruby
|
50
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
51
|
-
with:
|
52
|
-
ruby-version: '3.4'
|
53
|
-
bundler-cache: false
|
54
|
-
- name: Build precompiled librdkafka.so
|
55
|
-
run: |
|
56
|
-
cd ext
|
57
|
-
./build_linux_aarch64_gnu.sh
|
58
|
-
- name: Configure trusted publishing credentials
|
59
|
-
uses: rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44 # v1.0.0
|
60
|
-
- name: Build and push platform-specific gem
|
61
|
-
run: |
|
62
|
-
gem build *.gemspec
|
63
|
-
gem push *.gem
|
64
|
-
env:
|
65
|
-
RUBY_PLATFORM: 'aarch64-linux-gnu'
|
@@ -1,65 +0,0 @@
|
|
1
|
-
name: Push Linux x86_64 GNU Platform Gem
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
tags:
|
6
|
-
- v*
|
7
|
-
|
8
|
-
permissions:
|
9
|
-
contents: read
|
10
|
-
|
11
|
-
env:
|
12
|
-
BUNDLE_RETRY: 6
|
13
|
-
BUNDLE_JOBS: 4
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
push:
|
17
|
-
if: github.repository_owner == 'karafka'
|
18
|
-
timeout-minutes: 30
|
19
|
-
# Same as CI, we build on the oldest possible for ABI compatibility
|
20
|
-
runs-on: ubuntu-22.04 # renovate: ignore
|
21
|
-
environment: deployment
|
22
|
-
permissions:
|
23
|
-
contents: write
|
24
|
-
id-token: write
|
25
|
-
steps:
|
26
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
27
|
-
with:
|
28
|
-
fetch-depth: 0
|
29
|
-
- name: Install build dependencies
|
30
|
-
run: |
|
31
|
-
sudo apt-get update
|
32
|
-
sudo apt-get install -y --no-install-recommends \
|
33
|
-
build-essential \
|
34
|
-
gcc \
|
35
|
-
make \
|
36
|
-
patch \
|
37
|
-
tar \
|
38
|
-
wget \
|
39
|
-
ca-certificates \
|
40
|
-
libsasl2-dev \
|
41
|
-
libssl-dev \
|
42
|
-
zlib1g-dev \
|
43
|
-
libzstd-dev
|
44
|
-
- name: Cache build-tmp directory
|
45
|
-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
46
|
-
with:
|
47
|
-
path: ext/build-tmp
|
48
|
-
key: build-tmp-${{ runner.os }}-${{ hashFiles('ext/*.sh') }}
|
49
|
-
- name: Set up Ruby
|
50
|
-
uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
51
|
-
with:
|
52
|
-
ruby-version: '3.4'
|
53
|
-
bundler-cache: false
|
54
|
-
- name: Build precompiled librdkafka.so
|
55
|
-
run: |
|
56
|
-
cd ext
|
57
|
-
./build_linux_x86_64_gnu.sh
|
58
|
-
- name: Configure trusted publishing credentials
|
59
|
-
uses: rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44 # v1.0.0
|
60
|
-
- name: Build and push platform-specific gem
|
61
|
-
run: |
|
62
|
-
gem build *.gemspec
|
63
|
-
gem push *.gem
|
64
|
-
env:
|
65
|
-
RUBY_PLATFORM: 'x86_64-linux-gnu'
|