rdkafka 0.22.2 → 0.25.0
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 +38 -3
- data/Gemfile +9 -0
- data/README.md +17 -14
- data/bin/verify_kafka_warnings +37 -0
- data/dist/{librdkafka-2.8.0.tar.gz → librdkafka-2.12.1.tar.gz} +0 -0
- data/docker-compose-ssl.yml +35 -0
- data/docker-compose.yml +1 -1
- data/lib/rdkafka/abstract_handle.rb +23 -5
- data/lib/rdkafka/admin/acl_binding_result.rb +1 -1
- data/lib/rdkafka/admin/config_resource_binding_result.rb +1 -0
- data/lib/rdkafka/admin/create_acl_handle.rb +3 -0
- data/lib/rdkafka/admin/create_acl_report.rb +3 -0
- data/lib/rdkafka/admin/create_partitions_handle.rb +3 -0
- data/lib/rdkafka/admin/create_partitions_report.rb +1 -0
- data/lib/rdkafka/admin/create_topic_handle.rb +3 -0
- data/lib/rdkafka/admin/create_topic_report.rb +3 -0
- data/lib/rdkafka/admin/delete_acl_handle.rb +3 -0
- data/lib/rdkafka/admin/delete_acl_report.rb +3 -0
- data/lib/rdkafka/admin/delete_groups_handle.rb +5 -0
- data/lib/rdkafka/admin/delete_groups_report.rb +3 -0
- data/lib/rdkafka/admin/delete_topic_handle.rb +3 -0
- data/lib/rdkafka/admin/delete_topic_report.rb +3 -0
- data/lib/rdkafka/admin/describe_acl_handle.rb +3 -0
- data/lib/rdkafka/admin/describe_acl_report.rb +3 -0
- data/lib/rdkafka/admin/describe_configs_handle.rb +3 -0
- data/lib/rdkafka/admin/describe_configs_report.rb +6 -0
- data/lib/rdkafka/admin/incremental_alter_configs_handle.rb +3 -0
- data/lib/rdkafka/admin/incremental_alter_configs_report.rb +6 -0
- data/lib/rdkafka/admin.rb +108 -113
- data/lib/rdkafka/bindings.rb +76 -30
- data/lib/rdkafka/callbacks.rb +71 -11
- data/lib/rdkafka/config.rb +21 -12
- data/lib/rdkafka/consumer/headers.rb +3 -2
- data/lib/rdkafka/consumer/message.rb +7 -3
- data/lib/rdkafka/consumer/partition.rb +6 -2
- data/lib/rdkafka/consumer/topic_partition_list.rb +11 -7
- data/lib/rdkafka/consumer.rb +41 -29
- data/lib/rdkafka/defaults.rb +106 -0
- data/lib/rdkafka/error.rb +16 -1
- data/lib/rdkafka/helpers/oauth.rb +45 -12
- data/lib/rdkafka/metadata.rb +29 -5
- data/lib/rdkafka/native_kafka.rb +26 -2
- data/lib/rdkafka/producer/delivery_report.rb +8 -4
- data/lib/rdkafka/producer/partitions_count_cache.rb +24 -14
- data/lib/rdkafka/producer.rb +52 -26
- data/lib/rdkafka/version.rb +6 -3
- data/lib/rdkafka.rb +1 -0
- data/rdkafka.gemspec +35 -13
- data/renovate.json +6 -25
- metadata +23 -124
- data/.github/CODEOWNERS +0 -3
- data/.github/FUNDING.yml +0 -1
- data/.github/workflows/ci_linux_x86_64_gnu.yml +0 -271
- data/.github/workflows/ci_linux_x86_64_musl.yml +0 -194
- data/.github/workflows/ci_macos_arm64.yml +0 -284
- 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/verify-action-pins.yml +0 -16
- data/.gitignore +0 -14
- data/.rspec +0 -2
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.yardopts +0 -2
- data/ext/README.md +0 -19
- data/ext/build_common.sh +0 -361
- data/ext/build_linux_x86_64_gnu.sh +0 -306
- data/ext/build_linux_x86_64_musl.sh +0 -763
- data/ext/build_macos_arm64.sh +0 -550
- data/spec/rdkafka/abstract_handle_spec.rb +0 -117
- data/spec/rdkafka/admin/create_acl_handle_spec.rb +0 -56
- data/spec/rdkafka/admin/create_acl_report_spec.rb +0 -18
- data/spec/rdkafka/admin/create_topic_handle_spec.rb +0 -52
- data/spec/rdkafka/admin/create_topic_report_spec.rb +0 -16
- data/spec/rdkafka/admin/delete_acl_handle_spec.rb +0 -85
- data/spec/rdkafka/admin/delete_acl_report_spec.rb +0 -72
- data/spec/rdkafka/admin/delete_topic_handle_spec.rb +0 -52
- data/spec/rdkafka/admin/delete_topic_report_spec.rb +0 -16
- data/spec/rdkafka/admin/describe_acl_handle_spec.rb +0 -85
- data/spec/rdkafka/admin/describe_acl_report_spec.rb +0 -73
- data/spec/rdkafka/admin_spec.rb +0 -971
- data/spec/rdkafka/bindings_spec.rb +0 -199
- data/spec/rdkafka/callbacks_spec.rb +0 -20
- data/spec/rdkafka/config_spec.rb +0 -258
- data/spec/rdkafka/consumer/headers_spec.rb +0 -73
- data/spec/rdkafka/consumer/message_spec.rb +0 -139
- data/spec/rdkafka/consumer/partition_spec.rb +0 -57
- data/spec/rdkafka/consumer/topic_partition_list_spec.rb +0 -248
- data/spec/rdkafka/consumer_spec.rb +0 -1274
- data/spec/rdkafka/error_spec.rb +0 -89
- data/spec/rdkafka/metadata_spec.rb +0 -79
- data/spec/rdkafka/native_kafka_spec.rb +0 -130
- data/spec/rdkafka/producer/delivery_handle_spec.rb +0 -45
- data/spec/rdkafka/producer/delivery_report_spec.rb +0 -25
- data/spec/rdkafka/producer/partitions_count_cache_spec.rb +0 -359
- data/spec/rdkafka/producer_spec.rb +0 -1345
- data/spec/spec_helper.rb +0 -195
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rdkafka
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.25.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thijs Cadier
|
|
@@ -16,78 +16,36 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 1.17.1
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 1.17.1
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :runtime
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: mini_portile2
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '2.6'
|
|
48
|
-
type: :runtime
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '2.6'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: rake
|
|
28
|
+
name: json
|
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
|
58
30
|
requirements:
|
|
59
31
|
- - ">"
|
|
60
32
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
33
|
+
version: '2.0'
|
|
62
34
|
type: :runtime
|
|
63
35
|
prerelease: false
|
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
37
|
requirements:
|
|
66
38
|
- - ">"
|
|
67
39
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: ostruct
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
40
|
+
version: '2.0'
|
|
83
41
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
42
|
+
name: logger
|
|
85
43
|
requirement: !ruby/object:Gem::Requirement
|
|
86
44
|
requirements:
|
|
87
45
|
- - ">="
|
|
88
46
|
- !ruby/object:Gem::Version
|
|
89
47
|
version: '0'
|
|
90
|
-
type: :
|
|
48
|
+
type: :runtime
|
|
91
49
|
prerelease: false
|
|
92
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
51
|
requirements:
|
|
@@ -95,47 +53,33 @@ dependencies:
|
|
|
95
53
|
- !ruby/object:Gem::Version
|
|
96
54
|
version: '0'
|
|
97
55
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
56
|
+
name: mini_portile2
|
|
99
57
|
requirement: !ruby/object:Gem::Requirement
|
|
100
58
|
requirements:
|
|
101
59
|
- - "~>"
|
|
102
60
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
104
|
-
type: :
|
|
61
|
+
version: '2.6'
|
|
62
|
+
type: :runtime
|
|
105
63
|
prerelease: false
|
|
106
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
65
|
requirements:
|
|
108
66
|
- - "~>"
|
|
109
67
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
68
|
+
version: '2.6'
|
|
111
69
|
- !ruby/object:Gem::Dependency
|
|
112
70
|
name: rake
|
|
113
71
|
requirement: !ruby/object:Gem::Requirement
|
|
114
72
|
requirements:
|
|
115
|
-
- - "
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - ">="
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: simplecov
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - ">="
|
|
73
|
+
- - ">"
|
|
130
74
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
132
|
-
type: :
|
|
75
|
+
version: '12'
|
|
76
|
+
type: :runtime
|
|
133
77
|
prerelease: false
|
|
134
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
79
|
requirements:
|
|
136
|
-
- - "
|
|
80
|
+
- - ">"
|
|
137
81
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
82
|
+
version: '12'
|
|
139
83
|
description: Modern Kafka client library for Ruby based on librdkafka
|
|
140
84
|
email:
|
|
141
85
|
- contact@karafka.io
|
|
@@ -144,35 +88,17 @@ extensions:
|
|
|
144
88
|
- ext/Rakefile
|
|
145
89
|
extra_rdoc_files: []
|
|
146
90
|
files:
|
|
147
|
-
- ".github/CODEOWNERS"
|
|
148
|
-
- ".github/FUNDING.yml"
|
|
149
|
-
- ".github/workflows/ci_linux_x86_64_gnu.yml"
|
|
150
|
-
- ".github/workflows/ci_linux_x86_64_musl.yml"
|
|
151
|
-
- ".github/workflows/ci_macos_arm64.yml"
|
|
152
|
-
- ".github/workflows/push_linux_x86_64_gnu.yml"
|
|
153
|
-
- ".github/workflows/push_linux_x86_64_musl.yml"
|
|
154
|
-
- ".github/workflows/push_macos_arm64.yml"
|
|
155
|
-
- ".github/workflows/push_ruby.yml"
|
|
156
|
-
- ".github/workflows/verify-action-pins.yml"
|
|
157
|
-
- ".gitignore"
|
|
158
|
-
- ".rspec"
|
|
159
|
-
- ".ruby-gemset"
|
|
160
|
-
- ".ruby-version"
|
|
161
|
-
- ".yardopts"
|
|
162
91
|
- CHANGELOG.md
|
|
163
92
|
- Gemfile
|
|
164
93
|
- MIT-LICENSE
|
|
165
94
|
- README.md
|
|
166
95
|
- Rakefile
|
|
167
|
-
-
|
|
96
|
+
- bin/verify_kafka_warnings
|
|
97
|
+
- dist/librdkafka-2.12.1.tar.gz
|
|
168
98
|
- dist/patches/rdkafka_global_init.patch
|
|
99
|
+
- docker-compose-ssl.yml
|
|
169
100
|
- docker-compose.yml
|
|
170
|
-
- ext/README.md
|
|
171
101
|
- ext/Rakefile
|
|
172
|
-
- ext/build_common.sh
|
|
173
|
-
- ext/build_linux_x86_64_gnu.sh
|
|
174
|
-
- ext/build_linux_x86_64_musl.sh
|
|
175
|
-
- ext/build_macos_arm64.sh
|
|
176
102
|
- lib/rdkafka.rb
|
|
177
103
|
- lib/rdkafka/abstract_handle.rb
|
|
178
104
|
- lib/rdkafka/admin.rb
|
|
@@ -205,6 +131,7 @@ files:
|
|
|
205
131
|
- lib/rdkafka/consumer/message.rb
|
|
206
132
|
- lib/rdkafka/consumer/partition.rb
|
|
207
133
|
- lib/rdkafka/consumer/topic_partition_list.rb
|
|
134
|
+
- lib/rdkafka/defaults.rb
|
|
208
135
|
- lib/rdkafka/error.rb
|
|
209
136
|
- lib/rdkafka/helpers/oauth.rb
|
|
210
137
|
- lib/rdkafka/helpers/time.rb
|
|
@@ -217,34 +144,6 @@ files:
|
|
|
217
144
|
- lib/rdkafka/version.rb
|
|
218
145
|
- rdkafka.gemspec
|
|
219
146
|
- renovate.json
|
|
220
|
-
- spec/rdkafka/abstract_handle_spec.rb
|
|
221
|
-
- spec/rdkafka/admin/create_acl_handle_spec.rb
|
|
222
|
-
- spec/rdkafka/admin/create_acl_report_spec.rb
|
|
223
|
-
- spec/rdkafka/admin/create_topic_handle_spec.rb
|
|
224
|
-
- spec/rdkafka/admin/create_topic_report_spec.rb
|
|
225
|
-
- spec/rdkafka/admin/delete_acl_handle_spec.rb
|
|
226
|
-
- spec/rdkafka/admin/delete_acl_report_spec.rb
|
|
227
|
-
- spec/rdkafka/admin/delete_topic_handle_spec.rb
|
|
228
|
-
- spec/rdkafka/admin/delete_topic_report_spec.rb
|
|
229
|
-
- spec/rdkafka/admin/describe_acl_handle_spec.rb
|
|
230
|
-
- spec/rdkafka/admin/describe_acl_report_spec.rb
|
|
231
|
-
- spec/rdkafka/admin_spec.rb
|
|
232
|
-
- spec/rdkafka/bindings_spec.rb
|
|
233
|
-
- spec/rdkafka/callbacks_spec.rb
|
|
234
|
-
- spec/rdkafka/config_spec.rb
|
|
235
|
-
- spec/rdkafka/consumer/headers_spec.rb
|
|
236
|
-
- spec/rdkafka/consumer/message_spec.rb
|
|
237
|
-
- spec/rdkafka/consumer/partition_spec.rb
|
|
238
|
-
- spec/rdkafka/consumer/topic_partition_list_spec.rb
|
|
239
|
-
- spec/rdkafka/consumer_spec.rb
|
|
240
|
-
- spec/rdkafka/error_spec.rb
|
|
241
|
-
- spec/rdkafka/metadata_spec.rb
|
|
242
|
-
- spec/rdkafka/native_kafka_spec.rb
|
|
243
|
-
- spec/rdkafka/producer/delivery_handle_spec.rb
|
|
244
|
-
- spec/rdkafka/producer/delivery_report_spec.rb
|
|
245
|
-
- spec/rdkafka/producer/partitions_count_cache_spec.rb
|
|
246
|
-
- spec/rdkafka/producer_spec.rb
|
|
247
|
-
- spec/spec_helper.rb
|
|
248
147
|
licenses:
|
|
249
148
|
- MIT
|
|
250
149
|
metadata:
|
|
@@ -262,14 +161,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
262
161
|
requirements:
|
|
263
162
|
- - ">="
|
|
264
163
|
- !ruby/object:Gem::Version
|
|
265
|
-
version: '3.
|
|
164
|
+
version: '3.2'
|
|
266
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
166
|
requirements:
|
|
268
167
|
- - ">="
|
|
269
168
|
- !ruby/object:Gem::Version
|
|
270
169
|
version: '0'
|
|
271
170
|
requirements: []
|
|
272
|
-
rubygems_version:
|
|
171
|
+
rubygems_version: 4.0.3
|
|
273
172
|
specification_version: 4
|
|
274
173
|
summary: The rdkafka gem is a modern Kafka client library for Ruby based on librdkafka.
|
|
275
174
|
It wraps the production-ready C client using the ffi gem and targets Kafka 1.0+
|
data/.github/CODEOWNERS
DELETED
data/.github/FUNDING.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
custom: ['https://karafka.io/#become-pro']
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
# CI Strategy: Comprehensive Testing of Build and Precompiled Flows
|
|
2
|
-
#
|
|
3
|
-
# This workflow tests both compilation-from-source and precompiled binary distribution
|
|
4
|
-
# strategies across multiple Ubuntu and Ruby versions to ensure broad compatibility and
|
|
5
|
-
# reliability.
|
|
6
|
-
#
|
|
7
|
-
# WHY WE TEST BOTH UBUNTU 22.04 AND 24.04:
|
|
8
|
-
# - Different system library versions (OpenSSL, zlib, libsasl2, libzstd, etc.)
|
|
9
|
-
# - Different GCC compiler versions that affect native extension compilation
|
|
10
|
-
# - Different glibc versions that can impact binary compatibility
|
|
11
|
-
# - Real-world deployment scenarios where users run on various Ubuntu LTS versions
|
|
12
|
-
# - Different Ruby versions
|
|
13
|
-
#
|
|
14
|
-
# COMPILATION FLOW (build_install + specs_install):
|
|
15
|
-
# - Tests that librdkafka compiles correctly from source on each Ubuntu version
|
|
16
|
-
# - Validates that mini_portile2 can successfully build native dependencies
|
|
17
|
-
# - Ensures Ruby native extensions link properly with system libraries
|
|
18
|
-
# - Verifies that the same codebase works across different toolchain versions
|
|
19
|
-
#
|
|
20
|
-
# PRECOMPILED FLOW (build_precompiled + specs_precompiled):
|
|
21
|
-
# - Tests our precompiled static libraries work on different Ubuntu versions
|
|
22
|
-
# - Validates that statically-linked binaries are truly portable across environments
|
|
23
|
-
# - Ensures precompiled libraries don't have unexpected system dependencies
|
|
24
|
-
# - Verifies that removing build tools doesn't break precompiled binary usage
|
|
25
|
-
#
|
|
26
|
-
# ARTIFACT ISOLATION:
|
|
27
|
-
# - Each Ubuntu version gets separate artifacts (rdkafka-built-gem-22.04, etc.)
|
|
28
|
-
# - Prevents cross-contamination of OS-specific compiled extensions
|
|
29
|
-
# - Ensures test accuracy by matching build and test environments
|
|
30
|
-
#
|
|
31
|
-
# This comprehensive approach catches issues that single-platform testing would miss,
|
|
32
|
-
# such as system library incompatibilities, compiler-specific bugs, or static linking
|
|
33
|
-
# problems that only manifest on specific Ubuntu versions.
|
|
34
|
-
|
|
35
|
-
name: CI Linux x86_64 GNU
|
|
36
|
-
|
|
37
|
-
concurrency:
|
|
38
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
39
|
-
cancel-in-progress: true
|
|
40
|
-
|
|
41
|
-
on:
|
|
42
|
-
pull_request:
|
|
43
|
-
branches: [ main, master ]
|
|
44
|
-
push:
|
|
45
|
-
branches: [ main, master ]
|
|
46
|
-
schedule:
|
|
47
|
-
- cron: '0 1 * * *'
|
|
48
|
-
|
|
49
|
-
permissions:
|
|
50
|
-
contents: read
|
|
51
|
-
|
|
52
|
-
env:
|
|
53
|
-
BUNDLE_RETRY: 6
|
|
54
|
-
BUNDLE_JOBS: 4
|
|
55
|
-
|
|
56
|
-
jobs:
|
|
57
|
-
specs_install:
|
|
58
|
-
timeout-minutes: 30
|
|
59
|
-
strategy:
|
|
60
|
-
fail-fast: false
|
|
61
|
-
matrix:
|
|
62
|
-
ruby:
|
|
63
|
-
- '3.5.0-preview1'
|
|
64
|
-
- '3.4'
|
|
65
|
-
- '3.3'
|
|
66
|
-
- '3.2'
|
|
67
|
-
- '3.1'
|
|
68
|
-
- 'jruby-10.0'
|
|
69
|
-
ubuntu-version: ['22.04', '24.04']
|
|
70
|
-
include:
|
|
71
|
-
- ruby: '3.4'
|
|
72
|
-
coverage: 'true'
|
|
73
|
-
- ruby: 'jruby-10.0'
|
|
74
|
-
continue-on-error: true
|
|
75
|
-
runs-on: ubuntu-${{ matrix.ubuntu-version }}
|
|
76
|
-
steps:
|
|
77
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
78
|
-
with:
|
|
79
|
-
fetch-depth: 0
|
|
80
|
-
- name: Set up Ruby
|
|
81
|
-
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
|
|
82
|
-
with:
|
|
83
|
-
ruby-version: ${{matrix.ruby}}
|
|
84
|
-
bundler-cache: false
|
|
85
|
-
- name: Start Kafka with Docker Compose
|
|
86
|
-
run: |
|
|
87
|
-
docker compose up -d
|
|
88
|
-
echo "Waiting for Kafka to be ready..."
|
|
89
|
-
|
|
90
|
-
sleep 10
|
|
91
|
-
|
|
92
|
-
echo "=== Container status ==="
|
|
93
|
-
docker compose ps kafka
|
|
94
|
-
|
|
95
|
-
for i in {1..30}; do
|
|
96
|
-
echo "=== Attempt $i/30 ==="
|
|
97
|
-
|
|
98
|
-
echo "Testing kafka-topics command..."
|
|
99
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
|
100
|
-
echo "Kafka topics command succeeded!"
|
|
101
|
-
break
|
|
102
|
-
else
|
|
103
|
-
echo "Kafka topics command failed (exit code: $?)"
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
echo "Sleeping 2 seconds..."
|
|
107
|
-
sleep 2
|
|
108
|
-
done
|
|
109
|
-
- name: Install dependencies
|
|
110
|
-
env:
|
|
111
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
|
112
|
-
run: |
|
|
113
|
-
# Only install gems that aren't Ruby-version specific
|
|
114
|
-
bundle install
|
|
115
|
-
- name: Build gem with mini_portile
|
|
116
|
-
run: |
|
|
117
|
-
set -e
|
|
118
|
-
cd ext && bundle exec rake
|
|
119
|
-
cd ..
|
|
120
|
-
- name: Run all specs
|
|
121
|
-
env:
|
|
122
|
-
GITHUB_COVERAGE: ${{matrix.coverage}}
|
|
123
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
|
124
|
-
continue-on-error: ${{ matrix.continue-on-error || false }}
|
|
125
|
-
run: |
|
|
126
|
-
bundle exec rspec
|
|
127
|
-
|
|
128
|
-
build_precompiled:
|
|
129
|
-
timeout-minutes: 30
|
|
130
|
-
# We precompile on older Ubuntu and check compatibility by running specs since we aim to
|
|
131
|
-
# release only one precompiled version for all supported Ubuntu versions
|
|
132
|
-
# This is why we do not want Renovate to update it automatically
|
|
133
|
-
runs-on: ubuntu-22.04 # renovate: ignore
|
|
134
|
-
steps:
|
|
135
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
136
|
-
with:
|
|
137
|
-
fetch-depth: 0
|
|
138
|
-
- name: Install build dependencies
|
|
139
|
-
run: |
|
|
140
|
-
sudo apt-get update
|
|
141
|
-
sudo apt-get install -y --no-install-recommends \
|
|
142
|
-
build-essential \
|
|
143
|
-
gcc \
|
|
144
|
-
g++ \
|
|
145
|
-
make \
|
|
146
|
-
tar \
|
|
147
|
-
gzip \
|
|
148
|
-
wget \
|
|
149
|
-
curl \
|
|
150
|
-
file \
|
|
151
|
-
pkg-config \
|
|
152
|
-
autoconf \
|
|
153
|
-
automake \
|
|
154
|
-
libtool \
|
|
155
|
-
python3 \
|
|
156
|
-
git \
|
|
157
|
-
ca-certificates \
|
|
158
|
-
patch \
|
|
159
|
-
libsasl2-dev \
|
|
160
|
-
libssl-dev \
|
|
161
|
-
zlib1g-dev \
|
|
162
|
-
libzstd-dev \
|
|
163
|
-
bison \
|
|
164
|
-
flex \
|
|
165
|
-
perl \
|
|
166
|
-
binutils-dev
|
|
167
|
-
- name: Cache build-tmp directory
|
|
168
|
-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
169
|
-
with:
|
|
170
|
-
path: ext/build-tmp
|
|
171
|
-
key: build-tmp-${{ runner.os }}-${{ hashFiles('ext/*.sh', 'ext/Rakefile') }}-v2
|
|
172
|
-
- name: Build precompiled librdkafka.so
|
|
173
|
-
run: |
|
|
174
|
-
cd ext
|
|
175
|
-
./build_linux_x86_64_gnu.sh
|
|
176
|
-
- name: Upload precompiled library
|
|
177
|
-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
178
|
-
with:
|
|
179
|
-
name: librdkafka-precompiled-linux
|
|
180
|
-
path: ext/
|
|
181
|
-
retention-days: 1
|
|
182
|
-
|
|
183
|
-
specs_precompiled:
|
|
184
|
-
timeout-minutes: 30
|
|
185
|
-
needs: build_precompiled
|
|
186
|
-
strategy:
|
|
187
|
-
fail-fast: false
|
|
188
|
-
matrix:
|
|
189
|
-
ruby:
|
|
190
|
-
- '3.5.0-preview1'
|
|
191
|
-
- '3.4'
|
|
192
|
-
- '3.3'
|
|
193
|
-
- '3.2'
|
|
194
|
-
- '3.1'
|
|
195
|
-
ubuntu-version: ['22.04', '24.04']
|
|
196
|
-
include:
|
|
197
|
-
- ruby: '3.4'
|
|
198
|
-
ubuntu-version: '24.04'
|
|
199
|
-
coverage: 'true'
|
|
200
|
-
|
|
201
|
-
runs-on: ubuntu-${{ matrix.ubuntu-version }}
|
|
202
|
-
steps:
|
|
203
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
204
|
-
with:
|
|
205
|
-
fetch-depth: 0
|
|
206
|
-
- name: Download precompiled library
|
|
207
|
-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
208
|
-
with:
|
|
209
|
-
name: librdkafka-precompiled-linux
|
|
210
|
-
path: ext/
|
|
211
|
-
- name: Set up Ruby
|
|
212
|
-
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
|
|
213
|
-
with:
|
|
214
|
-
ruby-version: ${{ matrix.ruby }}
|
|
215
|
-
bundler-cache: false
|
|
216
|
-
- name: Start Kafka with Docker Compose
|
|
217
|
-
run: |
|
|
218
|
-
docker compose up -d
|
|
219
|
-
echo "Waiting for Kafka to be ready..."
|
|
220
|
-
|
|
221
|
-
sleep 10
|
|
222
|
-
|
|
223
|
-
echo "=== Container status ==="
|
|
224
|
-
docker compose ps kafka
|
|
225
|
-
for i in {1..30}; do
|
|
226
|
-
echo "=== Attempt $i/30 ==="
|
|
227
|
-
|
|
228
|
-
echo "Testing kafka-topics command..."
|
|
229
|
-
if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
|
|
230
|
-
echo "Kafka topics command succeeded!"
|
|
231
|
-
break
|
|
232
|
-
else
|
|
233
|
-
echo "Kafka topics command failed (exit code: $?)"
|
|
234
|
-
fi
|
|
235
|
-
|
|
236
|
-
echo "Sleeping 2 seconds..."
|
|
237
|
-
sleep 2
|
|
238
|
-
done
|
|
239
|
-
- name: Install bundle with precompiled library
|
|
240
|
-
env:
|
|
241
|
-
GITHUB_COVERAGE: ${{ matrix.coverage }}
|
|
242
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
|
243
|
-
run: |
|
|
244
|
-
bundle install
|
|
245
|
-
echo "Bundle install completed with precompiled library"
|
|
246
|
-
- name: Remove build dependencies to test static linking
|
|
247
|
-
continue-on-error: true
|
|
248
|
-
run: |
|
|
249
|
-
echo "Removing build dependencies to verify precompiled library is truly self-contained..."
|
|
250
|
-
|
|
251
|
-
# Remove packages one by one to avoid dependency conflicts
|
|
252
|
-
packages_to_remove="build-essential gcc g++ make patch tar wget libsasl2-dev libssl-dev zlib1g-dev libzstd-dev"
|
|
253
|
-
|
|
254
|
-
for package in $packages_to_remove; do
|
|
255
|
-
if dpkg -l | grep -q "^ii.*$package "; then
|
|
256
|
-
echo "Removing $package..."
|
|
257
|
-
sudo dpkg --remove --force-depends $package 2>/dev/null || echo "Could not remove $package"
|
|
258
|
-
else
|
|
259
|
-
echo "$package is not installed"
|
|
260
|
-
fi
|
|
261
|
-
done
|
|
262
|
-
|
|
263
|
-
echo "Build dependencies removal completed"
|
|
264
|
-
echo "Remaining build tools:"
|
|
265
|
-
which gcc g++ make 2>/dev/null || echo "No build tools found in PATH (good!)"
|
|
266
|
-
- name: Run specs with precompiled library
|
|
267
|
-
env:
|
|
268
|
-
GITHUB_COVERAGE: ${{ matrix.coverage }}
|
|
269
|
-
RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
|
|
270
|
-
run: |
|
|
271
|
-
bundle exec rspec
|