@platformatic/rdkafka 4.0.0 → 4.1.0-alpha.1

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.
Files changed (293) hide show
  1. package/README.md +5 -5
  2. package/bench/seed.sh +0 -0
  3. package/binding.gyp +3 -3
  4. package/ci/prepublish.js +4 -3
  5. package/ci/update-version.js +123 -0
  6. package/config.d.ts +126 -10
  7. package/configure +0 -0
  8. package/deps/librdkafka/.semaphore/run-all-tests.yml +77 -0
  9. package/deps/librdkafka/.semaphore/semaphore-integration.yml +250 -0
  10. package/deps/librdkafka/.semaphore/semaphore.yml +67 -44
  11. package/deps/librdkafka/.semaphore/verify-linux-packages.yml +41 -0
  12. package/deps/librdkafka/CHANGELOG.md +471 -1
  13. package/deps/librdkafka/CONFIGURATION.md +29 -9
  14. package/deps/librdkafka/INTRODUCTION.md +909 -601
  15. package/deps/librdkafka/Makefile +2 -1
  16. package/deps/librdkafka/configure +0 -0
  17. package/deps/librdkafka/debian/rules +0 -0
  18. package/deps/librdkafka/dev-conf.sh +0 -0
  19. package/deps/librdkafka/examples/consumer.c +18 -8
  20. package/deps/librdkafka/examples/describe_consumer_groups.c +25 -6
  21. package/deps/librdkafka/examples/incremental_alter_configs.c +4 -5
  22. package/deps/librdkafka/examples/kafkatest_verifiable_client.cpp +26 -42
  23. package/deps/librdkafka/examples/openssl_engine_example.cpp +3 -4
  24. package/deps/librdkafka/examples/producer.cpp +2 -2
  25. package/deps/librdkafka/examples/user_scram.c +4 -5
  26. package/deps/librdkafka/examples/win_ssl_cert_store.cpp +4 -3
  27. package/deps/librdkafka/lds-gen.py +0 -0
  28. package/deps/librdkafka/mklove/Makefile.base +0 -0
  29. package/deps/librdkafka/packaging/RELEASE.md +8 -0
  30. package/deps/librdkafka/packaging/alpine/build-alpine.sh +0 -0
  31. package/deps/librdkafka/packaging/cp/README.md +4 -1
  32. package/deps/librdkafka/packaging/cp/check_features.c +12 -4
  33. package/deps/librdkafka/packaging/cp/verify-deb.sh +6 -6
  34. package/deps/librdkafka/packaging/cp/verify-packages.sh +52 -31
  35. package/deps/librdkafka/packaging/cp/verify-rpm.sh +6 -13
  36. package/deps/librdkafka/packaging/debian/docs +5 -0
  37. package/deps/librdkafka/packaging/debian/rules +0 -0
  38. package/deps/librdkafka/packaging/get_version.py +0 -0
  39. package/deps/librdkafka/packaging/homebrew/brew-update-pr.sh +0 -0
  40. package/deps/librdkafka/packaging/mingw-w64/{travis-before-install.sh → export-variables.sh} +0 -7
  41. package/deps/librdkafka/packaging/mingw-w64/semaphoreci-build.sh +1 -1
  42. package/deps/librdkafka/packaging/nuget/artifact.py +0 -0
  43. package/deps/librdkafka/packaging/nuget/cleanup-s3.py +0 -0
  44. package/deps/librdkafka/packaging/nuget/nuget.sh +0 -0
  45. package/deps/librdkafka/packaging/nuget/packaging.py +0 -0
  46. package/deps/librdkafka/packaging/nuget/push-to-nuget.sh +0 -0
  47. package/deps/librdkafka/packaging/nuget/release.py +0 -0
  48. package/deps/librdkafka/packaging/nuget/requirements.txt +3 -3
  49. package/deps/librdkafka/packaging/rpm/mock-on-docker.sh +0 -0
  50. package/deps/librdkafka/packaging/rpm/tests/run-test.sh +0 -0
  51. package/deps/librdkafka/packaging/rpm/tests/test-on-docker.sh +0 -0
  52. package/deps/librdkafka/packaging/tools/build-configurations-checks.sh +3 -1
  53. package/deps/librdkafka/packaging/tools/build-deb-package.sh +0 -0
  54. package/deps/librdkafka/packaging/tools/build-debian.sh +0 -0
  55. package/deps/librdkafka/packaging/tools/build-manylinux.sh +0 -0
  56. package/deps/librdkafka/packaging/tools/build-release-artifacts.sh +0 -0
  57. package/deps/librdkafka/packaging/tools/distro-build.sh +0 -0
  58. package/deps/librdkafka/packaging/tools/gh-release-checksums.py +0 -0
  59. package/deps/librdkafka/packaging/tools/rdutcoverage.sh +0 -0
  60. package/deps/librdkafka/packaging/tools/run-in-docker.sh +28 -0
  61. package/deps/librdkafka/packaging/tools/run-integration-tests.sh +31 -0
  62. package/deps/librdkafka/packaging/tools/run-style-check.sh +4 -0
  63. package/deps/librdkafka/packaging/tools/style-format.sh +6 -5
  64. package/deps/librdkafka/packaging/tools/update_rpcs_max_versions.py +100 -0
  65. package/deps/librdkafka/service.yml +154 -0
  66. package/deps/librdkafka/src/generate_proto.sh +0 -0
  67. package/deps/librdkafka/src/rd.h +145 -2
  68. package/deps/librdkafka/src/rdaddr.h +6 -7
  69. package/deps/librdkafka/src/rdatomic.h +15 -11
  70. package/deps/librdkafka/src/rdavg.h +3 -2
  71. package/deps/librdkafka/src/rdbase64.c +33 -2
  72. package/deps/librdkafka/src/rdbase64.h +2 -0
  73. package/deps/librdkafka/src/rdendian.h +10 -9
  74. package/deps/librdkafka/src/rdhttp.c +418 -100
  75. package/deps/librdkafka/src/rdhttp.h +23 -5
  76. package/deps/librdkafka/src/rdkafka.c +299 -145
  77. package/deps/librdkafka/src/rdkafka.h +89 -6
  78. package/deps/librdkafka/src/rdkafka_admin.c +482 -105
  79. package/deps/librdkafka/src/rdkafka_admin.h +42 -0
  80. package/deps/librdkafka/src/rdkafka_broker.c +463 -312
  81. package/deps/librdkafka/src/rdkafka_broker.h +68 -10
  82. package/deps/librdkafka/src/rdkafka_buf.c +8 -5
  83. package/deps/librdkafka/src/rdkafka_buf.h +4 -3
  84. package/deps/librdkafka/src/rdkafka_cert.c +25 -1
  85. package/deps/librdkafka/src/rdkafka_cert.h +4 -3
  86. package/deps/librdkafka/src/rdkafka_cgrp.c +468 -143
  87. package/deps/librdkafka/src/rdkafka_cgrp.h +36 -2
  88. package/deps/librdkafka/src/rdkafka_conf.c +526 -102
  89. package/deps/librdkafka/src/rdkafka_conf.h +68 -4
  90. package/deps/librdkafka/src/rdkafka_feature.c +472 -35
  91. package/deps/librdkafka/src/rdkafka_feature.h +2 -0
  92. package/deps/librdkafka/src/rdkafka_fetcher.c +22 -2
  93. package/deps/librdkafka/src/rdkafka_fetcher.h +2 -2
  94. package/deps/librdkafka/src/rdkafka_int.h +84 -46
  95. package/deps/librdkafka/src/rdkafka_metadata.c +221 -136
  96. package/deps/librdkafka/src/rdkafka_metadata.h +15 -11
  97. package/deps/librdkafka/src/rdkafka_metadata_cache.c +279 -73
  98. package/deps/librdkafka/src/rdkafka_mock.c +795 -19
  99. package/deps/librdkafka/src/rdkafka_mock.h +119 -0
  100. package/deps/librdkafka/src/rdkafka_mock_cgrp.c +1298 -132
  101. package/deps/librdkafka/src/rdkafka_mock_handlers.c +345 -49
  102. package/deps/librdkafka/src/rdkafka_mock_int.h +180 -61
  103. package/deps/librdkafka/src/rdkafka_msg.c +35 -19
  104. package/deps/librdkafka/src/rdkafka_msg.h +3 -3
  105. package/deps/librdkafka/src/rdkafka_msgset_writer.c +14 -10
  106. package/deps/librdkafka/src/rdkafka_offset.c +33 -5
  107. package/deps/librdkafka/src/rdkafka_op.c +1 -1
  108. package/deps/librdkafka/src/rdkafka_op.h +45 -21
  109. package/deps/librdkafka/src/rdkafka_partition.c +118 -23
  110. package/deps/librdkafka/src/rdkafka_partition.h +16 -7
  111. package/deps/librdkafka/src/rdkafka_proto.h +4 -1
  112. package/deps/librdkafka/src/rdkafka_protocol.h +1 -0
  113. package/deps/librdkafka/src/rdkafka_queue.c +125 -48
  114. package/deps/librdkafka/src/rdkafka_queue.h +19 -0
  115. package/deps/librdkafka/src/rdkafka_range_assignor.c +1 -1
  116. package/deps/librdkafka/src/rdkafka_request.c +336 -64
  117. package/deps/librdkafka/src/rdkafka_request.h +24 -1
  118. package/deps/librdkafka/src/rdkafka_sasl.c +5 -3
  119. package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.c +14 -10
  120. package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.c +1166 -89
  121. package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.h +13 -3
  122. package/deps/librdkafka/src/rdkafka_sasl_plain.c +3 -3
  123. package/deps/librdkafka/src/rdkafka_sasl_scram.c +4 -3
  124. package/deps/librdkafka/src/rdkafka_ssl.c +306 -81
  125. package/deps/librdkafka/src/rdkafka_ssl.h +22 -0
  126. package/deps/librdkafka/src/rdkafka_sticky_assignor.c +4 -0
  127. package/deps/librdkafka/src/rdkafka_telemetry.c +80 -23
  128. package/deps/librdkafka/src/rdkafka_telemetry_encode.c +5 -1
  129. package/deps/librdkafka/src/rdkafka_telemetry_encode.h +20 -20
  130. package/deps/librdkafka/src/rdkafka_topic.c +220 -137
  131. package/deps/librdkafka/src/rdkafka_topic.h +14 -8
  132. package/deps/librdkafka/src/rdkafka_transport.c +59 -47
  133. package/deps/librdkafka/src/rdkafka_transport.h +5 -0
  134. package/deps/librdkafka/src/rdkafka_txnmgr.c +6 -1
  135. package/deps/librdkafka/src/rdmap.c +6 -1
  136. package/deps/librdkafka/src/rdrand.c +11 -1
  137. package/deps/librdkafka/src/rdtime.h +48 -17
  138. package/deps/librdkafka/src/rdunittest.c +42 -25
  139. package/deps/librdkafka/src/rdunittest.h +2 -0
  140. package/deps/librdkafka/src/rdwin32.h +1 -1
  141. package/deps/librdkafka/src/regexp.c +47 -42
  142. package/deps/librdkafka/src/tinycthread_extra.c +45 -21
  143. package/deps/librdkafka/src/tinycthread_extra.h +7 -3
  144. package/deps/librdkafka/src-cpp/rdkafkacpp.h +28 -2
  145. package/deps/librdkafka/tests/0001-multiobj.c +4 -0
  146. package/deps/librdkafka/tests/0004-conf.c +103 -36
  147. package/deps/librdkafka/tests/0009-mock_cluster.c +1 -0
  148. package/deps/librdkafka/tests/0011-produce_batch.c +2 -1
  149. package/deps/librdkafka/tests/0016-client_swname.c +18 -3
  150. package/deps/librdkafka/tests/0017-compression.c +6 -8
  151. package/deps/librdkafka/tests/0018-cgrp_term.c +8 -3
  152. package/deps/librdkafka/tests/0021-rkt_destroy.c +1 -0
  153. package/deps/librdkafka/tests/0022-consume_batch.c +4 -1
  154. package/deps/librdkafka/tests/0026-consume_pause.c +12 -14
  155. package/deps/librdkafka/tests/0028-long_topicnames.c +1 -1
  156. package/deps/librdkafka/tests/0029-assign_offset.c +6 -8
  157. package/deps/librdkafka/tests/0030-offset_commit.c +2 -2
  158. package/deps/librdkafka/tests/0033-regex_subscribe.c +33 -17
  159. package/deps/librdkafka/tests/0034-offset_reset.c +25 -4
  160. package/deps/librdkafka/tests/0036-partial_fetch.c +1 -0
  161. package/deps/librdkafka/tests/0038-performance.c +1 -0
  162. package/deps/librdkafka/tests/0040-io_event.c +11 -5
  163. package/deps/librdkafka/tests/0041-fetch_max_bytes.c +1 -0
  164. package/deps/librdkafka/tests/0044-partition_cnt.c +3 -2
  165. package/deps/librdkafka/tests/0045-subscribe_update.c +284 -20
  166. package/deps/librdkafka/tests/0047-partial_buf_tmout.c +1 -0
  167. package/deps/librdkafka/tests/0048-partitioner.c +1 -1
  168. package/deps/librdkafka/tests/0050-subscribe_adds.c +1 -0
  169. package/deps/librdkafka/tests/0051-assign_adds.c +1 -0
  170. package/deps/librdkafka/tests/0052-msg_timestamps.c +22 -4
  171. package/deps/librdkafka/tests/0053-stats_cb.cpp +12 -20
  172. package/deps/librdkafka/tests/0055-producer_latency.c +176 -3
  173. package/deps/librdkafka/tests/0056-balanced_group_mt.c +6 -2
  174. package/deps/librdkafka/tests/0058-log.cpp +3 -3
  175. package/deps/librdkafka/tests/0059-bsearch.cpp +8 -4
  176. package/deps/librdkafka/tests/0061-consumer_lag.cpp +25 -5
  177. package/deps/librdkafka/tests/0067-empty_topic.cpp +3 -0
  178. package/deps/librdkafka/tests/0068-produce_timeout.c +21 -23
  179. package/deps/librdkafka/tests/0069-consumer_add_parts.c +3 -7
  180. package/deps/librdkafka/tests/0075-retry.c +38 -1
  181. package/deps/librdkafka/tests/0076-produce_retry.c +2 -0
  182. package/deps/librdkafka/tests/0077-compaction.c +8 -2
  183. package/deps/librdkafka/tests/0080-admin_ut.c +34 -4
  184. package/deps/librdkafka/tests/0081-admin.c +455 -155
  185. package/deps/librdkafka/tests/0082-fetch_max_bytes.cpp +4 -0
  186. package/deps/librdkafka/tests/0083-cb_event.c +8 -3
  187. package/deps/librdkafka/tests/0084-destroy_flags.c +14 -18
  188. package/deps/librdkafka/tests/0085-headers.cpp +4 -0
  189. package/deps/librdkafka/tests/0086-purge.c +40 -7
  190. package/deps/librdkafka/tests/0088-produce_metadata_timeout.c +1 -1
  191. package/deps/librdkafka/tests/0089-max_poll_interval.c +12 -7
  192. package/deps/librdkafka/tests/0090-idempotence.c +1 -2
  193. package/deps/librdkafka/tests/0091-max_poll_interval_timeout.c +5 -7
  194. package/deps/librdkafka/tests/0092-mixed_msgver.c +6 -0
  195. package/deps/librdkafka/tests/0093-holb.c +8 -5
  196. package/deps/librdkafka/tests/0094-idempotence_msg_timeout.c +1 -0
  197. package/deps/librdkafka/tests/0097-ssl_verify.cpp +262 -70
  198. package/deps/librdkafka/tests/0098-consumer-txn.cpp +16 -16
  199. package/deps/librdkafka/tests/0099-commit_metadata.c +1 -1
  200. package/deps/librdkafka/tests/0101-fetch-from-follower.cpp +1 -1
  201. package/deps/librdkafka/tests/0102-static_group_rebalance.c +317 -16
  202. package/deps/librdkafka/tests/0103-transactions.c +7 -7
  203. package/deps/librdkafka/tests/0104-fetch_from_follower_mock.c +1 -0
  204. package/deps/librdkafka/tests/0105-transactions_mock.c +18 -11
  205. package/deps/librdkafka/tests/0106-cgrp_sess_timeout.c +35 -14
  206. package/deps/librdkafka/tests/0107-topic_recreate.c +2 -2
  207. package/deps/librdkafka/tests/0109-auto_create_topics.cpp +86 -26
  208. package/deps/librdkafka/tests/0110-batch_size.cpp +1 -2
  209. package/deps/librdkafka/tests/0112-assign_unknown_part.c +3 -14
  210. package/deps/librdkafka/tests/0113-cooperative_rebalance.cpp +248 -104
  211. package/deps/librdkafka/tests/0114-sticky_partitioning.cpp +3 -3
  212. package/deps/librdkafka/tests/0115-producer_auth.cpp +4 -1
  213. package/deps/librdkafka/tests/0116-kafkaconsumer_close.cpp +7 -5
  214. package/deps/librdkafka/tests/0117-mock_errors.c +15 -5
  215. package/deps/librdkafka/tests/0118-commit_rebalance.c +41 -8
  216. package/deps/librdkafka/tests/0119-consumer_auth.cpp +20 -1
  217. package/deps/librdkafka/tests/0120-asymmetric_subscription.c +8 -3
  218. package/deps/librdkafka/tests/0125-immediate_flush.c +1 -1
  219. package/deps/librdkafka/tests/0126-oauthbearer_oidc.c +323 -8
  220. package/deps/librdkafka/tests/0129-fetch_aborted_msgs.c +1 -0
  221. package/deps/librdkafka/tests/0132-strategy_ordering.c +12 -4
  222. package/deps/librdkafka/tests/0133-ssl_keys.c +28 -6
  223. package/deps/librdkafka/tests/0137-barrier_batch_consume.c +24 -14
  224. package/deps/librdkafka/tests/0139-offset_validation_mock.c +510 -2
  225. package/deps/librdkafka/tests/0140-commit_metadata.cpp +1 -1
  226. package/deps/librdkafka/tests/0142-reauthentication.c +37 -17
  227. package/deps/librdkafka/tests/0143-exponential_backoff_mock.c +39 -40
  228. package/deps/librdkafka/tests/0146-metadata_mock.c +76 -15
  229. package/deps/librdkafka/tests/0147-consumer_group_consumer_mock.c +952 -0
  230. package/deps/librdkafka/tests/0148-offset_fetch_commit_error_mock.c +563 -0
  231. package/deps/librdkafka/tests/0149-broker-same-host-port.c +140 -0
  232. package/deps/librdkafka/tests/0150-telemetry_mock.c +9 -6
  233. package/deps/librdkafka/tests/0151-purge-brokers.c +566 -0
  234. package/deps/librdkafka/tests/0152-rebootstrap.c +59 -0
  235. package/deps/librdkafka/tests/0153-memberid.c +128 -0
  236. package/deps/librdkafka/tests/CMakeLists.txt +6 -0
  237. package/deps/librdkafka/tests/LibrdkafkaTestApp.py +34 -9
  238. package/deps/librdkafka/tests/autotest.sh +0 -0
  239. package/deps/librdkafka/tests/broker_version_tests.py +0 -0
  240. package/deps/librdkafka/tests/buildbox.sh +0 -0
  241. package/deps/librdkafka/tests/cleanup-checker-tests.sh +0 -0
  242. package/deps/librdkafka/tests/cluster_testing.py +0 -0
  243. package/deps/librdkafka/tests/delete-test-topics.sh +0 -0
  244. package/deps/librdkafka/tests/fixtures/oauthbearer/jwt_assertion_template.json +10 -0
  245. package/deps/librdkafka/tests/fixtures/ssl/client.keystore.intermediate.p12 +0 -0
  246. package/deps/librdkafka/tests/fixtures/ssl/client.keystore.p12 +0 -0
  247. package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.intermediate.pem +72 -0
  248. package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.pem +42 -101
  249. package/deps/librdkafka/tests/fixtures/ssl/client2.intermediate.key +46 -0
  250. package/deps/librdkafka/tests/fixtures/ssl/client2.key +41 -29
  251. package/deps/librdkafka/tests/fixtures/ssl/create_keys.sh +112 -37
  252. package/deps/librdkafka/tests/gen-ssl-certs.sh +0 -0
  253. package/deps/librdkafka/tests/interactive_broker_version.py +0 -0
  254. package/deps/librdkafka/tests/java/Makefile +2 -1
  255. package/deps/librdkafka/tests/java/run-class.sh +0 -0
  256. package/deps/librdkafka/tests/lz4_manual_test.sh +0 -0
  257. package/deps/librdkafka/tests/multi-broker-version-test.sh +0 -0
  258. package/deps/librdkafka/tests/parse-refcnt.sh +0 -0
  259. package/deps/librdkafka/tests/performance_plot.py +0 -0
  260. package/deps/librdkafka/tests/requirements.txt +1 -1
  261. package/deps/librdkafka/tests/run-all-tests.sh +79 -0
  262. package/deps/librdkafka/tests/run-consumer-tests.sh +0 -0
  263. package/deps/librdkafka/tests/run-producer-tests.sh +0 -0
  264. package/deps/librdkafka/tests/run-test-batches.py +157 -0
  265. package/deps/librdkafka/tests/run-test.sh +0 -0
  266. package/deps/librdkafka/tests/sasl_test.py +0 -0
  267. package/deps/librdkafka/tests/test.c +478 -18
  268. package/deps/librdkafka/tests/test.h +62 -13
  269. package/deps/librdkafka/tests/testcpp.cpp +6 -1
  270. package/deps/librdkafka/tests/testcpp.h +30 -2
  271. package/deps/librdkafka/tests/testshared.h +16 -2
  272. package/deps/librdkafka/tests/tools/stats/graph.py +0 -0
  273. package/deps/librdkafka/tests/tools/stats/to_csv.py +1 -1
  274. package/deps/librdkafka/tests/trivup/trivup-0.14.0.tar.gz +0 -0
  275. package/deps/librdkafka/tests/until-fail.sh +0 -0
  276. package/deps/librdkafka/tests/xxxx-metadata.cpp +1 -1
  277. package/deps/librdkafka/vcpkg.json +1 -1
  278. package/deps/librdkafka/win32/setup-msys2.ps1 +24 -8
  279. package/deps/librdkafka/win32/setup-vcpkg.ps1 +28 -6
  280. package/deps/librdkafka/win32/tests/tests.vcxproj +6 -0
  281. package/deps/librdkafka/win32/wingetopt.h +5 -4
  282. package/errors.d.ts +27 -1
  283. package/lib/error.js +29 -3
  284. package/make_docs.sh +0 -0
  285. package/package.json +12 -13
  286. package/run_docker.sh +0 -0
  287. package/src/callbacks.cc +6 -9
  288. package/src/callbacks.h +1 -5
  289. package/test/kafka-consumer-worker.js +10 -7
  290. package/test/kafka-consumer.spec.js +32 -21
  291. package/deps/librdkafka/.semaphore/project.yml +0 -43
  292. package/deps/librdkafka/.semaphore/project_public.yml +0 -20
  293. package/deps/librdkafka/win32/install-openssl.ps1 +0 -33
@@ -17,7 +17,7 @@ fi
17
17
 
18
18
  archive="${PWD}/$1"
19
19
 
20
- source ./packaging/mingw-w64/travis-before-install.sh
20
+ source ./packaging/mingw-w64/export-variables.sh
21
21
 
22
22
  if [[ $linkage == "static" ]]; then
23
23
  ./packaging/mingw-w64/configure-build-msys2-mingw-static.sh
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
- boto3==1.18.45
2
- rpmfile==1.0.8
3
- filemagic==1.6
1
+ boto3~=1.38
2
+ rpmfile~=1.1
3
+ filemagic~=1.6
File without changes
File without changes
@@ -1,10 +1,12 @@
1
1
  #!/bin/bash
2
2
  set -e
3
+
3
4
  # Disable all flags to make sure it
4
5
  # compiles correctly in all cases
5
6
  ./configure --install-deps --disable-ssl --disable-gssapi \
6
7
  --disable-curl --disable-zlib \
7
8
  --disable-zstd --disable-lz4-ext --disable-regex-ext \
8
- --disable-c11threads --disable-syslog
9
+ --disable-c11threads --disable-syslog \
10
+ --enable-werror --enable-devel
9
11
  make -j
10
12
  make -j -C tests run_local_quick
File without changes
File without changes
File without changes
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+
3
+ if [ "$#" -lt 2 ]; then
4
+ echo "Usage: $0 <docker-image> [<args>...]"
5
+ exit 1
6
+ fi
7
+
8
+ IMAGE=$1
9
+ SCRIPT_DIR=$(dirname "$0")
10
+ ENTRYPOINT=${2}
11
+ REST=${@:3}
12
+
13
+ if [ $(which cache) ]; then
14
+ cache restore ${IMAGE}.tar
15
+ fi
16
+ if [ ! -f ./${IMAGE}.tar ]; then
17
+ docker build -f $SCRIPT_DIR/Dockerfile -t $IMAGE --build-arg UID=$UID .
18
+ docker save $IMAGE -o ./${IMAGE}.tar
19
+
20
+ if [ $(which cache) ]; then
21
+ cache store ${IMAGE}.tar ./${IMAGE}.tar
22
+ fi
23
+ else
24
+ docker load -i ./${IMAGE}.tar
25
+ fi
26
+
27
+ docker run --rm --entrypoint $ENTRYPOINT \
28
+ -v .:/librdkafka -w /librdkafka -e CI -u $UID:$UID ${IMAGE} ${REST}
@@ -0,0 +1,31 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ if [ "$#" -lt 2 ]; then
5
+ echo "Usage: $0 <kafka-version> <cp-version> [<consumer_group_protocol>]"
6
+ echo "Example: $0 3.9.0 7.9.0"
7
+ exit 1
8
+ fi
9
+
10
+ KAFKA_VERSION=$1
11
+ CP_VERSION=$2
12
+ if [ -n "$3" ]; then
13
+ export TEST_CONSUMER_GROUP_PROTOCOL=$3
14
+ fi
15
+
16
+ source /home/user/venv/bin/activate
17
+ ./configure --install-deps --enable-werror --enable-devel
18
+ ./packaging/tools/rdutcoverage.sh
19
+ make copyright-check
20
+ make -j all examples check
21
+ echo "Verifying that CONFIGURATION.md does not have manual changes"
22
+ git diff --exit-code CONFIGURATION.md
23
+ examples/rdkafka_example -X builtin.features
24
+ ldd src/librdkafka.so.1
25
+ ldd src-cpp/librdkafka++.so.1
26
+ make -j -C tests build
27
+ make -C tests run_local_quick
28
+ DESTDIR="$PWD/dest" make install
29
+ (cd tests && python3 -m trivup.clusters.KafkaCluster --kraft \
30
+ --version ${KAFKA_VERSION} \
31
+ --cpversion ${CP_VERSION} --cmd 'make quick')
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ set -e
3
+ source /home/user/venv/bin/activate
4
+ make style-check
@@ -3,11 +3,12 @@
3
3
  # Check or apply/fix the project coding style to all files passed as arguments.
4
4
  # Uses clang-format for C/C++ and flake8 for Python.
5
5
  #
6
- # Requires clang-format version 10 (apt install clang-format-10).
7
- #
8
6
 
9
7
 
10
- CLANG_FORMAT=${CLANG_FORMAT:-clang-format}
8
+
9
+ # Requires clang-format version 18 (apt install clang-format-18).
10
+ CLANG_FORMAT=${CLANG_FORMAT:-clang-format-18}
11
+ CLANG_FORMAT_REQUIRED_VERSION=18
11
12
 
12
13
  set -e
13
14
 
@@ -27,8 +28,8 @@ else
27
28
  fi
28
29
 
29
30
  clang_format_version=$(${CLANG_FORMAT} --version | sed -Ee 's/.*version ([[:digit:]]+)\.[[:digit:]]+\.[[:digit:]]+.*/\1/')
30
- if [[ $clang_format_version != "10" ]] ; then
31
- echo "$0: clang-format version 10, '$clang_format_version' detected"
31
+ if [[ $clang_format_version != "$CLANG_FORMAT_REQUIRED_VERSION" ]] ; then
32
+ echo "$0: clang-format version ${CLANG_FORMAT_REQUIRED_VERSION}, '$clang_format_version' detected"
32
33
  exit 1
33
34
  fi
34
35
 
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env python
2
+ import json
3
+ import sys
4
+ import re
5
+
6
+ # This script updates the Apache Kafka RPCs max versions.
7
+ # It reads the input from `input_file`, which should be a table
8
+ # looking like the table in `INTRODUCTION.md`.
9
+ # Should look like this (without the first space after the comment):
10
+ # | 0 | Produce | 12 | 10 |
11
+ # | 1 | Fetch | 17 | 16 |
12
+ # | 2 | ListOffsets | 10 | 7 |
13
+ # | 3 | Metadata | 13 | 12 |
14
+ # | 8 | OffsetCommit | 9 | 9 |
15
+ # | 9 | OffsetFetch | 9 | 9 |
16
+ # | 10 | FindCoordinator | 6 | 2 |
17
+ # | 11 | JoinGroup | 9 | 5 |
18
+ # | 12 | Heartbeat | 4 | 3 |
19
+ # | 13 | LeaveGroup | 5 | 1 |
20
+ # | 14 | SyncGroup | 5 | 3 |
21
+ # | 15 | DescribeGroups | 6 | 4 |
22
+ # | 16 | ListGroups | 5 | 4 |
23
+ # | 17 | SaslHandshake | 1 | 1 |
24
+ # | 18 | ApiVersions | 4 | 3 |
25
+ # | 19 | CreateTopics | 7 | 4 |
26
+ # | 20 | DeleteTopics | 6 | 1 |
27
+ # | 21 | DeleteRecords | 2 | 1 |
28
+ # | 22 | InitProducerId | 5 | 4 |
29
+ # | 23 | OffsetForLeaderEpoch | 4 | 2 |
30
+ # | 24 | AddPartitionsToTxn | 5 | 0 |
31
+ # | 25 | AddOffsetsToTxn | 4 | 0 |
32
+ # | 26 | EndTxn | 5 | 1 |
33
+ # | 28 | TxnOffsetCommit | 5 | 3 |
34
+ # | 29 | DescribeAcls | 3 | 1 |
35
+ # | 30 | CreateAcls | 3 | 1 |
36
+ # | 31 | DeleteAcls | 3 | 1 |
37
+ # | 32 | DescribeConfigs | 4 | 1 |
38
+ # | 33 | AlterConfigs | 2 | 2 |
39
+ # | 36 | SaslAuthenticate | 2 | 1 |
40
+ # | 37 | CreatePartitions | 3 | 0 |
41
+ # | 42 | DeleteGroups | 2 | 1 |
42
+ # | 43 | ElectLeaders | 2 | 2 |
43
+ # | 44 | IncrementalAlterConfigs | 1 | 1 |
44
+ # | 47 | OffsetDelete | 0 | 0 |
45
+ # | 50 | DescribeUserScramCredentials | 0 | 0 |
46
+ # | 51 | AlterUserScramCredentials | 0 | 0 |
47
+ # | 68 | ConsumerGroupHeartbeat | 1 | 1 |
48
+ # | 69 | ConsumerGroupDescribe | 1 | 0 |
49
+ # | 71 | GetTelemetrySubscriptions | 0 | 0 |
50
+ # | 72 | PushTelemetry | 0 | 0 |
51
+ #
52
+ # Output will be the same with max versions updated
53
+ # Should pass Apache Kafka root folder as first argument and the input file
54
+ # as second argument.
55
+ ak_folder = sys.argv[1]
56
+ input_file = sys.argv[2]
57
+
58
+ if len(sys.argv) != 3:
59
+ print("Usage: python3 update_rpcs_max_versions.py <kafka_folder> "
60
+ "<input_file>")
61
+ sys.exit(1)
62
+
63
+ with open(input_file, 'r') as input:
64
+ lines = input.readlines()
65
+ max_first_column = 0
66
+ max_second_column = 0
67
+ max_third_column = 0
68
+ apis = []
69
+ for line in lines:
70
+ line = re.sub('^\\s*\\|\\s*', '', line)
71
+ pipe_char = line.find('|')
72
+ max_first_column = max(max_first_column, pipe_char)
73
+ api_num = int(line[0:pipe_char])
74
+ line = line[pipe_char + 1:]
75
+ line = re.sub('^\\s*', '', line)
76
+ pipe_char = line.find('|')
77
+ max_second_column = max(max_second_column, pipe_char)
78
+ api = line[0:pipe_char].strip()
79
+ line = line[pipe_char + 1:].lstrip()
80
+ pipe_char = line.find('|')
81
+ max_third_column = max(max_third_column, pipe_char)
82
+ rest = line[pipe_char + 1:].strip()
83
+ apis.append((api_num, api, rest))
84
+
85
+ for api_num, api, rest in apis:
86
+ with open(f'{ak_folder}/clients/src/main/resources/common/message/'
87
+ f'{api}Request.json',
88
+ 'r') as f:
89
+ text = f.readlines()
90
+ text = "".join([line for line in text
91
+ if '#' not in line and '//' not in line])
92
+ json_object = json.loads(text)
93
+ max_version = json_object["validVersions"].split("-")[-1]
94
+ print('| ', end='')
95
+ print(str(api_num).ljust(max_first_column), end='')
96
+ print('| ', end='')
97
+ print(api.ljust(max_second_column), end='')
98
+ print('| ', end='')
99
+ print(str(max_version).ljust(max_third_column) + '|', end='')
100
+ print(f' {rest}')
@@ -16,3 +16,157 @@ semaphore:
16
16
  - /semaphore.*/
17
17
  - /dev_.*/
18
18
  - /feature\/.*/
19
+ tasks:
20
+ - name: verify-linux-packages
21
+ branch: master
22
+ scheduled: false
23
+ pipeline_file: .semaphore/verify-linux-packages.yml
24
+ parameters:
25
+ - name: LIBRDKAFKA_VERSION
26
+ required: true
27
+ description: librdkafka version to verify
28
+ - name: run-all-tests
29
+ branch: master
30
+ scheduled: false
31
+ pipeline_file: .semaphore/run-all-tests.yml
32
+ parameters:
33
+ - name: GIT_REF
34
+ required: false
35
+ description: "librdkafka git ref to test."
36
+
37
+ - name: TEST_KAFKA_GIT_REF
38
+ required: true
39
+ default_value: ""
40
+ description: "Kafka version to test against. When a valid version, the corresponding
41
+ package is downloaded. [<username>/]<git_ref>[@<commit_hash>] is also supported
42
+ to clone from GitHub and build from source."
43
+
44
+ - name: TEST_CP_VERSION
45
+ required: false
46
+ description: "CP version to test against"
47
+
48
+ - name: TEST_KAFKA_VERSION
49
+ required: false
50
+ description: "Kafka version to assume in this branch. If empty (default)
51
+ uses TEST_KAFKA_GIT_REF when a valid version, otherwise 9.9.9."
52
+
53
+ - name: TEST_KRAFT
54
+ required: true
55
+ default_value: "True"
56
+ description: "Run a KRaft cluster."
57
+ options:
58
+ - "True"
59
+ - "False"
60
+
61
+ - name: TEST_TYPE
62
+ required: true
63
+ default_value: "plaintext,ssl"
64
+ description: "Run PLAINTEXT or SSL tests or both. Defaults to both."
65
+ options:
66
+ - "plaintext,ssl"
67
+ - "plaintext"
68
+ - "ssl"
69
+
70
+ - name: TEST_SSL_INTERMEDIATE_CA
71
+ required: false
72
+ description: "Run SSL tests with an intermediate CA certificate."
73
+ options:
74
+ - "True"
75
+ - "False"
76
+
77
+ - name: TEST_SASL
78
+ required: false
79
+ description: "SASL mechanism to use."
80
+ options:
81
+ - ""
82
+ - "PLAIN"
83
+ - "SCRAM-SHA-256"
84
+ - "SCRAM-SHA-512"
85
+ - "GSSAPI"
86
+ - "OAUTHBEARER"
87
+
88
+ - name: TEST_QUICK
89
+ required: true
90
+ default_value: "False"
91
+ description: "Run only quick tests."
92
+ options:
93
+ - "True"
94
+ - "False"
95
+
96
+ - name: TEST_LOCAL
97
+ required: true
98
+ default_value: "All"
99
+ description: "Run only local, only non-local or all tests."
100
+ options:
101
+ - "All"
102
+ - "Local"
103
+ - "Non-local"
104
+
105
+ - name: TEST_PARALLEL
106
+ required: false
107
+ description: "Number of parallel tests to run. Empty means default value."
108
+
109
+ - name: TEST_MODE
110
+ required: false
111
+ description: "Test mode to use. Empty means default value."
112
+
113
+ - name: TESTS
114
+ required: false
115
+ description: "Run specified tests only. Empty means run all tests.
116
+ Can be a comma-separated list of test numbers or ranges,
117
+ even overlapping. Example:
118
+ 1,3,9-11,10-15,17-,-10"
119
+
120
+ - name: TESTS_BATCH_SIZE
121
+ required: false
122
+ description: "Run tests in batches of this size.
123
+ Empty means no batches, run all tests at once."
124
+
125
+ - name: TEST_ITERATIONS
126
+ required: false
127
+ description: "Run specified tests this many times.
128
+ Empty means run tests once."
129
+
130
+ - name: TEST_ASSERT
131
+ required: true
132
+ default_value: "False"
133
+ description: "Assert on failures"
134
+ options:
135
+ - "True"
136
+ - "False"
137
+
138
+ - name: TEST_DEBUG
139
+ required: false
140
+ description: "Enable debug output for tests."
141
+
142
+ - name: TEST_LEVEL
143
+ required: false
144
+ description: "Test verbosity level. Default is 2. Increase to 3 or 4 for more output."
145
+
146
+ - name: TEST_CONF
147
+ required: false
148
+ description: "Additional broker configuration as a JSON array. Example:
149
+ [group.coordinator.rebalance.protocols=classic,consumer]"
150
+
151
+ - name: TEST_TRIVUP_PARAMETERS
152
+ required: false
153
+ description: "Additional trivup parameters."
154
+
155
+ - name: TEST_RUNNER_PARAMETERS
156
+ required: false
157
+ description: "Additional test runner parameters."
158
+
159
+ - name: TEST_ENV_VARIABLES
160
+ required: false
161
+ description: "Additional environment variables to set for tests.
162
+ Example: A=1,B=2,C=3"
163
+
164
+ - name: TEST_ARCHES
165
+ required: true
166
+ default_value: "x86_64,aarch64"
167
+ description: "Test on these architectures: x86_64, aarch64 or both"
168
+ options:
169
+ - "x86_64,aarch64"
170
+ - "x86_64"
171
+ - "aarch64"
172
+
File without changes
@@ -53,6 +53,7 @@
53
53
  #include <time.h>
54
54
  #include <assert.h>
55
55
  #include <limits.h>
56
+ #include <sys/stat.h>
56
57
 
57
58
  #include "tinycthread.h"
58
59
  #include "rdsysqueue.h"
@@ -220,12 +221,18 @@ static RD_INLINE RD_UNUSED char *rd_strndup(const char *s, size_t len) {
220
221
 
221
222
 
222
223
  /* Round/align X upwards to STRIDE, which must be power of 2. */
223
- #define RD_ROUNDUP(X, STRIDE) (((X) + ((STRIDE)-1)) & ~(STRIDE - 1))
224
+ #define RD_ROUNDUP(X, STRIDE) (((X) + ((STRIDE) - 1)) & ~(STRIDE - 1))
224
225
 
225
226
  #define RD_ARRAY_SIZE(A) (sizeof((A)) / sizeof(*(A)))
226
227
  #define RD_ARRAYSIZE(A) RD_ARRAY_SIZE(A)
227
228
  #define RD_SIZEOF(TYPE, MEMBER) sizeof(((TYPE *)NULL)->MEMBER)
228
229
  #define RD_OFFSETOF(TYPE, MEMBER) ((size_t) & (((TYPE *)NULL)->MEMBER))
230
+ /** Array foreach */
231
+ #define RD_ARRAY_FOREACH_INDEX(ELEM, ARRAY, INDEX) \
232
+ for ((INDEX = 0, (ELEM) = (ARRAY)[INDEX]); \
233
+ INDEX < RD_ARRAY_SIZE(ARRAY); \
234
+ (ELEM) = \
235
+ (++INDEX < RD_ARRAY_SIZE(ARRAY) ? (ARRAY)[INDEX] : (ELEM)))
229
236
 
230
237
  /**
231
238
  * Returns the 'I'th array element from static sized array 'A'
@@ -427,7 +434,7 @@ static RD_INLINE RD_UNUSED int rd_refcnt_get(rd_refcnt_t *R) {
427
434
 
428
435
  #define RD_INTERFACE_CALL(i, name, ...) (i->name(i->opaque, __VA_ARGS__))
429
436
 
430
- #define RD_CEIL_INTEGER_DIVISION(X, DEN) (((X) + ((DEN)-1)) / (DEN))
437
+ #define RD_CEIL_INTEGER_DIVISION(X, DEN) (((X) + ((DEN) - 1)) / (DEN))
431
438
 
432
439
  /**
433
440
  * @brief Utility types to hold memory,size tuple.
@@ -438,4 +445,140 @@ typedef struct rd_chariov_s {
438
445
  size_t size;
439
446
  } rd_chariov_t;
440
447
 
448
+ /**
449
+ * @brief Read the file at \p file_path in binary mode and return its contents.
450
+ * The returned buffer is NULL-terminated,
451
+ * the size parameter will contain the actual file size.
452
+ *
453
+ * @param file_path Path to the file to read.
454
+ * @param size Pointer to store the file size (optional).
455
+ * @param max_size Maximum file size to read (0 for no limit) (optional).
456
+ *
457
+ * @returns Newly allocated buffer containing the file contents.
458
+ * NULL on error (file not found, too large, etc).
459
+ *
460
+ * @remark The returned pointer ownership is transferred to the caller.
461
+ *
462
+ * @locality Any thread
463
+ */
464
+ static RD_INLINE RD_UNUSED char *
465
+ rd_file_read(const char *file_path, size_t *size, size_t max_size) {
466
+ FILE *file;
467
+ char *buf = NULL;
468
+ size_t file_size;
469
+ size_t read_size;
470
+ if (!size)
471
+ size = &read_size;
472
+
473
+ #ifndef _WIN32
474
+ file = fopen(file_path, "rb");
475
+ #else
476
+ file = NULL;
477
+ errno = fopen_s(&file, file_path, "rb");
478
+ #endif
479
+ if (!file)
480
+ return NULL;
481
+
482
+ if (fseek(file, 0, SEEK_END) != 0)
483
+ goto err;
484
+
485
+ file_size = (size_t)ftell(file);
486
+ if (file_size < 0)
487
+ goto err;
488
+
489
+ if (fseek(file, 0, SEEK_SET) != 0)
490
+ goto err;
491
+
492
+ /* Check if file is too large */
493
+ if (max_size > 0 && file_size > max_size)
494
+ goto err;
495
+
496
+ /* Allocate buffer with extra byte for NULL terminator */
497
+ buf = (char *)rd_malloc(file_size + 1);
498
+ read_size = fread(buf, 1, file_size, file);
499
+
500
+ if (read_size != file_size)
501
+ goto err;
502
+
503
+ /* NULL terminate the buffer */
504
+ buf[file_size] = '\0';
505
+ *size = file_size;
506
+ fclose(file);
507
+ return buf;
508
+ err:
509
+ fclose(file);
510
+ if (buf)
511
+ rd_free(buf);
512
+ return NULL;
513
+ }
514
+
515
+ static RD_INLINE RD_UNUSED FILE *
516
+ rd_file_mkstemp(const char *prefix,
517
+ const char *mode,
518
+ char *tempfile_path_out,
519
+ size_t tempfile_path_out_size) {
520
+ FILE *tempfile;
521
+
522
+ #ifdef _WIN32
523
+ char tempfolder_path[MAX_PATH];
524
+ char tempfile_path[MAX_PATH];
525
+ if (!GetTempPathA(MAX_PATH, tempfolder_path))
526
+ return NULL; /* Failed to get temp folder path */
527
+
528
+
529
+ if (!GetTempFileNameA(tempfolder_path, "TMP", 1, tempfile_path))
530
+ return NULL; /* Failed to create temp file name */
531
+
532
+ tempfile = fopen(tempfile_path, mode);
533
+ #else
534
+ int tempfile_fd;
535
+ char tempfile_path[512];
536
+ rd_snprintf(tempfile_path, sizeof(tempfile_path), "/tmp/%sXXXXXX",
537
+ prefix);
538
+ tempfile_fd = mkstemp(tempfile_path);
539
+ if (tempfile_fd < 0)
540
+ return NULL;
541
+
542
+ tempfile = fdopen(tempfile_fd, mode);
543
+ #endif
544
+
545
+ if (!tempfile)
546
+ return NULL;
547
+
548
+ if (tempfile_path_out)
549
+ rd_snprintf(tempfile_path_out, tempfile_path_out_size, "%s",
550
+ tempfile_path);
551
+ return tempfile;
552
+ }
553
+
554
+ /**
555
+ * @brief Retrive stat for a \p path .
556
+ *
557
+ * @param path Path to the file or directory.
558
+ * @param is_dir Pointer to store if the \p path is a directory (optional).
559
+ *
560
+ * @return `rd_true` if the path exists.
561
+ */
562
+ static RD_INLINE RD_UNUSED rd_bool_t rd_file_stat(const char *path,
563
+ rd_bool_t *is_dir) {
564
+ #ifdef _WIN32
565
+ struct _stat st;
566
+ if (_stat(path, &st) == 0) {
567
+ if (is_dir)
568
+ *is_dir = st.st_mode & S_IFDIR;
569
+ return rd_true;
570
+ }
571
+ #else
572
+ struct stat st;
573
+ if (stat(path, &st) == 0) {
574
+ if (is_dir)
575
+ *is_dir = S_ISDIR(st.st_mode);
576
+ return rd_true;
577
+ }
578
+ #endif
579
+ if (is_dir)
580
+ *is_dir = rd_false;
581
+ return rd_false;
582
+ }
583
+
441
584
  #endif /* _RD_H_ */
@@ -54,14 +54,13 @@ typedef union {
54
54
  #define sinx_family in.sin_family
55
55
  #define sinx_addr in.sin_addr
56
56
  #define RD_SOCKADDR_INX_LEN(sinx) \
57
- ((sinx)->sinx_family == AF_INET \
58
- ? sizeof(struct sockaddr_in) \
59
- : (sinx)->sinx_family == AF_INET6 ? sizeof(struct sockaddr_in6) \
60
- : sizeof(rd_sockaddr_inx_t))
57
+ ((sinx)->sinx_family == AF_INET ? sizeof(struct sockaddr_in) \
58
+ : (sinx)->sinx_family == AF_INET6 ? sizeof(struct sockaddr_in6) \
59
+ : sizeof(rd_sockaddr_inx_t))
61
60
  #define RD_SOCKADDR_INX_PORT(sinx) \
62
- ((sinx)->sinx_family == AF_INET \
63
- ? (sinx)->in.sin_port \
64
- : (sinx)->sinx_family == AF_INET6 ? (sinx)->in6.sin6_port : 0)
61
+ ((sinx)->sinx_family == AF_INET ? (sinx)->in.sin_port \
62
+ : (sinx)->sinx_family == AF_INET6 ? (sinx)->in6.sin6_port \
63
+ : 0)
65
64
 
66
65
  #define RD_SOCKADDR_INX_PORT_SET(sinx, port) \
67
66
  do { \