rimless 1.5.0 → 1.6.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/.github/workflows/documentation.yml +3 -3
- data/.github/workflows/release.yml +4 -4
- data/.github/workflows/test.yml +3 -3
- data/.rubocop.yml +1 -7
- data/CHANGELOG.md +13 -0
- data/Dockerfile +3 -3
- data/Gemfile +3 -1
- data/Makefile +4 -1
- data/config/docker/.bashrc +3 -1
- data/doc/kafka-playground/Dockerfile +4 -4
- data/doc/kafka-playground/Gemfile +1 -1
- data/doc/kafka-playground/Gemfile.lock +50 -44
- data/doc/kafka-playground/README.md +9 -4
- data/doc/kafka-playground/bin/create-topic +1 -0
- data/doc/kafka-playground/bin/delete-topic +1 -0
- data/doc/kafka-playground/bin/produce-event +1 -0
- data/doc/kafka-playground/config/environment.rb +3 -1
- data/doc/kafka-playground/docker-compose.yml +3 -27
- data/gemfiles/rails_5.2.gemfile +1 -1
- data/lib/rimless/avro_utils.rb +10 -6
- data/lib/rimless/karafka/avro_deserializer.rb +3 -3
- data/lib/rimless/rspec.rb +1 -1
- data/lib/rimless/tasks/consumer.rake +1 -1
- data/lib/rimless/tasks/templates/custom_consumer_spec.rb +1 -1
- data/lib/rimless/version.rb +1 -1
- data/lib/rimless.rb +1 -0
- data/log/make.log +6 -0
- data/rimless.gemspec +2 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eabd6c0d5bdd171ce8b754bbd37454bd1289f981ba3568bf58ada17e4eb91d7
|
4
|
+
data.tar.gz: be7347e5abb58a8aa18b5ae198e7a36804f13a73905c733d36177a0fbe95fb69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82374943aa7b559372a7eb60eaabb644df4a872d3a4143273a1f0d56f1da490eec3c802a9e306914756fd71c58f57fe149e8f810eafdbc08d9c4d9776eb8ae2c
|
7
|
+
data.tar.gz: 3af38794436c3fc86e735c88d7fac36690f75a4f702b4cddbcedb2fa55f2f1e66bfd8831e48798f4021b743da2834241324f66bb6415f08cf9ddf975d4866323
|
@@ -12,14 +12,14 @@ jobs:
|
|
12
12
|
runs-on: ubuntu-22.04
|
13
13
|
timeout-minutes: 5
|
14
14
|
steps:
|
15
|
-
- uses: actions/checkout@
|
15
|
+
- uses: actions/checkout@v4
|
16
16
|
|
17
17
|
- name: Install the correct Ruby version
|
18
18
|
uses: ruby/setup-ruby@v1
|
19
19
|
with:
|
20
|
-
ruby-version: 2.
|
20
|
+
ruby-version: 2.7
|
21
21
|
bundler-cache: true
|
22
|
-
rubygems: '3.
|
22
|
+
rubygems: '3.4.22'
|
23
23
|
|
24
24
|
- name: Prepare the virtual environment
|
25
25
|
uses: hausgold/actions/ci@master
|
@@ -18,14 +18,14 @@ jobs:
|
|
18
18
|
runs-on: ubuntu-22.04
|
19
19
|
timeout-minutes: 5
|
20
20
|
steps:
|
21
|
-
- uses: actions/checkout@
|
21
|
+
- uses: actions/checkout@v4
|
22
22
|
|
23
|
-
- name: Install Ruby 2.
|
23
|
+
- name: Install Ruby 2.7
|
24
24
|
uses: ruby/setup-ruby@v1
|
25
25
|
with:
|
26
|
-
ruby-version: 2.
|
26
|
+
ruby-version: 2.7
|
27
27
|
bundler-cache: true
|
28
|
-
rubygems: '3.
|
28
|
+
rubygems: '3.4.22'
|
29
29
|
|
30
30
|
- name: Prepare the virtual environment
|
31
31
|
uses: hausgold/actions/ci@master
|
data/.github/workflows/test.yml
CHANGED
@@ -18,19 +18,19 @@ jobs:
|
|
18
18
|
strategy:
|
19
19
|
fail-fast: false
|
20
20
|
matrix:
|
21
|
-
ruby: ['2.
|
21
|
+
ruby: ['2.7']
|
22
22
|
rails: ['5.2']
|
23
23
|
env:
|
24
24
|
BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
|
25
25
|
steps:
|
26
|
-
- uses: actions/checkout@
|
26
|
+
- uses: actions/checkout@v4
|
27
27
|
|
28
28
|
- name: Install the correct Ruby version
|
29
29
|
uses: ruby/setup-ruby@v1
|
30
30
|
with:
|
31
31
|
ruby-version: ${{ matrix.ruby }}
|
32
32
|
bundler-cache: true
|
33
|
-
rubygems: '3.
|
33
|
+
rubygems: '3.4.22'
|
34
34
|
|
35
35
|
- name: Prepare the virtual environment
|
36
36
|
uses: hausgold/actions/ci@master
|
data/.rubocop.yml
CHANGED
@@ -12,7 +12,7 @@ AllCops:
|
|
12
12
|
NewCops: enable
|
13
13
|
SuggestExtensions: false
|
14
14
|
DisplayCopNames: true
|
15
|
-
TargetRubyVersion: 2.
|
15
|
+
TargetRubyVersion: 2.7
|
16
16
|
TargetRailsVersion: 5.2
|
17
17
|
Exclude:
|
18
18
|
- bin/**/*
|
@@ -65,9 +65,3 @@ RSpec/FilePath:
|
|
65
65
|
# Because we just implemented the ActiveRecord API.
|
66
66
|
Rails/SkipsModelValidations:
|
67
67
|
Enabled: false
|
68
|
-
|
69
|
-
# Because Rubocop does not respect the `TargetRubyVersion: 2.5` for this cop,
|
70
|
-
# so it converts to `then` which is not yet available on Ruby 2.5 which causes
|
71
|
-
# `NoMethodError` errors. NOTE: Remove when Ruby 2.5 support is dropped.
|
72
|
-
Style/ObjectThen:
|
73
|
-
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,19 @@
|
|
2
2
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
4
4
|
|
5
|
+
### 1.6.0
|
6
|
+
|
7
|
+
* Dropped support for Ruby <2.7 (#38)
|
8
|
+
* Moved the schema file validation into the retry block for parallel execution
|
9
|
+
(#37)
|
10
|
+
* Updated the [Kafka Playground](./doc/kafka-playground) to the latest
|
11
|
+
Apache Kafka (3.7) and Schema Registry (7.6) versions (#35)
|
12
|
+
|
13
|
+
### 1.5.1
|
14
|
+
|
15
|
+
* Added a retry to write compiled schema files as this may fail on parallel
|
16
|
+
execution (#33)
|
17
|
+
|
5
18
|
### 1.5.0
|
6
19
|
|
7
20
|
* Do not extend the `Rimless.logger` to write to stdout by default when running
|
data/Dockerfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
FROM hausgold/ruby:2.
|
1
|
+
FROM hausgold/ruby:2.7
|
2
2
|
MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
|
3
3
|
|
4
4
|
# Update system gem
|
5
|
-
RUN gem update --system '3.
|
5
|
+
RUN gem update --system '3.4.22'
|
6
6
|
|
7
7
|
# Install system packages and the latest bundler
|
8
8
|
RUN apt-get update -yqqq && \
|
@@ -11,7 +11,7 @@ RUN apt-get update -yqqq && \
|
|
11
11
|
ca-certificates \
|
12
12
|
bash-completion inotify-tools && \
|
13
13
|
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
|
14
|
-
gem install bundler -v '~> 2.
|
14
|
+
gem install bundler -v '~> 2.4.22' --no-document --no-prerelease
|
15
15
|
|
16
16
|
# Add new web user
|
17
17
|
RUN mkdir /app && \
|
data/Gemfile
CHANGED
@@ -11,7 +11,9 @@ gemspec
|
|
11
11
|
gem 'appraisal', '~> 2.4'
|
12
12
|
gem 'bundler', '~> 2.3'
|
13
13
|
gem 'countless', '~> 1.1'
|
14
|
-
|
14
|
+
# TODO: Remove the upper lock when
|
15
|
+
# https://github.com/thoughtbot/factory_bot/issues/1614 is solved.
|
16
|
+
gem 'factory_bot', '~> 6.2', '< 6.4.5'
|
15
17
|
gem 'guard-rspec', '~> 4.7'
|
16
18
|
gem 'railties', '>= 5.2'
|
17
19
|
gem 'rake', '~> 13.0'
|
data/Makefile
CHANGED
@@ -25,6 +25,7 @@ ID ?= id
|
|
25
25
|
MKDIR ?= mkdir
|
26
26
|
RM ?= rm
|
27
27
|
XARGS ?= xargs
|
28
|
+
TEST ?= test
|
28
29
|
|
29
30
|
# Container binaries
|
30
31
|
APPRAISAL ?= appraisal
|
@@ -35,6 +36,7 @@ RAKE ?= rake
|
|
35
36
|
RSPEC ?= rspec
|
36
37
|
RUBOCOP ?= rubocop
|
37
38
|
YARD ?= yard
|
39
|
+
RUBY_VERSION := ruby-version
|
38
40
|
|
39
41
|
# Files
|
40
42
|
GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
|
@@ -113,7 +115,8 @@ test-style: \
|
|
113
115
|
|
114
116
|
test-style-ruby:
|
115
117
|
# Run the static code analyzer (rubocop)
|
116
|
-
@$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a
|
118
|
+
@$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
|
119
|
+
|| ($(TEST) $$($(RUBY_VERSION)) != '2.7' && true))
|
117
120
|
|
118
121
|
clean:
|
119
122
|
# Clean the dependencies
|
data/config/docker/.bashrc
CHANGED
@@ -15,7 +15,9 @@ sudo sed -i 's/autostart=.*/autostart=false/g' /etc/supervisor/conf.d/*
|
|
15
15
|
sudo supervisord >/dev/null 2>&1 &
|
16
16
|
|
17
17
|
# Wait for supervisord
|
18
|
-
while ! supervisorctl status >/dev/null 2>&1; do
|
18
|
+
while ! (sudo supervisorctl status | grep avahi) >/dev/null 2>&1; do
|
19
|
+
sleep 1
|
20
|
+
done
|
19
21
|
|
20
22
|
# Boot the mDNS stack
|
21
23
|
echo '# Start the mDNS stack'
|
@@ -1,11 +1,11 @@
|
|
1
|
-
FROM hausgold/ruby:2.
|
1
|
+
FROM hausgold/ruby:2.7
|
2
2
|
MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
|
3
3
|
|
4
4
|
# Update system gem
|
5
|
-
RUN gem update --system
|
5
|
+
RUN gem update --system '3.4.22'
|
6
6
|
|
7
7
|
# Add backports repository
|
8
|
-
RUN echo 'deb http://
|
8
|
+
RUN echo 'deb http://archive.debian.org/debian buster-backports main' \
|
9
9
|
>> /etc/apt/sources.list
|
10
10
|
|
11
11
|
# Install nodejs 16
|
@@ -18,7 +18,7 @@ RUN apt-get update -yqqq && \
|
|
18
18
|
ca-certificates jq curl cmake \
|
19
19
|
bash-completion inotify-tools && \
|
20
20
|
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
|
21
|
-
gem install bundler --no-document --no-prerelease
|
21
|
+
gem install bundler -v '~> 2.4.22' --no-document --no-prerelease
|
22
22
|
|
23
23
|
# Install kcat (formerly known as kafkacat)
|
24
24
|
RUN curl -sL https://github.com/edenhill/kcat/archive/refs/tags/1.7.0.tar.gz \
|
@@ -1,27 +1,29 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activesupport (6.1.
|
4
|
+
activesupport (6.1.7.7)
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
6
6
|
i18n (>= 1.6, < 2)
|
7
7
|
minitest (>= 5.1)
|
8
8
|
tzinfo (~> 2.0)
|
9
9
|
zeitwerk (~> 2.3)
|
10
|
-
addressable (2.8.
|
11
|
-
public_suffix (>= 2.0.2, <
|
10
|
+
addressable (2.8.6)
|
11
|
+
public_suffix (>= 2.0.2, < 6.0)
|
12
12
|
avro (1.9.2)
|
13
13
|
multi_json
|
14
14
|
avro_turf (0.11.0)
|
15
15
|
avro (>= 1.7.7, < 1.10)
|
16
16
|
excon (~> 0.45)
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
bigdecimal (3.1.8)
|
18
|
+
concurrent-ruby (1.2.3)
|
19
|
+
connection_pool (2.4.1)
|
20
|
+
crack (1.0.0)
|
21
|
+
bigdecimal
|
20
22
|
rexml
|
21
|
-
delivery_boy (1.
|
23
|
+
delivery_boy (1.2.0)
|
22
24
|
king_konf (~> 1.0)
|
23
|
-
ruby-kafka (~> 1.
|
24
|
-
digest-crc (0.6.
|
25
|
+
ruby-kafka (~> 1.5)
|
26
|
+
digest-crc (0.6.5)
|
25
27
|
rake (>= 12.0.0, < 14.0.0)
|
26
28
|
dry-configurable (0.12.1)
|
27
29
|
concurrent-ruby (~> 1.0)
|
@@ -64,15 +66,15 @@ GEM
|
|
64
66
|
dry-equalizer (~> 0.2)
|
65
67
|
dry-initializer (~> 3.0)
|
66
68
|
dry-schema (~> 1.5, >= 1.5.2)
|
67
|
-
envlogic (1.1.
|
69
|
+
envlogic (1.1.4)
|
68
70
|
dry-inflector (~> 0.1)
|
69
|
-
excon (0.
|
70
|
-
hashdiff (1.0
|
71
|
-
i18n (1.
|
71
|
+
excon (0.109.0)
|
72
|
+
hashdiff (1.1.0)
|
73
|
+
i18n (1.14.5)
|
72
74
|
concurrent-ruby (~> 1.0)
|
73
75
|
io-console (0.5.9)
|
74
|
-
irb (1.
|
75
|
-
reline (>= 0.
|
76
|
+
irb (1.4.2)
|
77
|
+
reline (>= 0.3.0)
|
76
78
|
karafka (1.4.3)
|
77
79
|
dry-configurable (~> 0.8)
|
78
80
|
dry-inflector (~> 0.1)
|
@@ -90,46 +92,50 @@ GEM
|
|
90
92
|
sidekiq (>= 4.2)
|
91
93
|
karafka-testing (1.4.1)
|
92
94
|
karafka (~> 1.4.0.rc2)
|
93
|
-
king_konf (1.0.
|
94
|
-
minitest (5.
|
95
|
+
king_konf (1.0.1)
|
96
|
+
minitest (5.15.0)
|
95
97
|
multi_json (1.15.0)
|
96
|
-
mustermann (
|
98
|
+
mustermann (2.0.2)
|
97
99
|
ruby2_keywords (~> 0.0.1)
|
98
|
-
public_suffix (4.0.
|
99
|
-
rack (2.2.
|
100
|
-
rack-protection (2.
|
100
|
+
public_suffix (4.0.7)
|
101
|
+
rack (2.2.9)
|
102
|
+
rack-protection (2.2.4)
|
101
103
|
rack
|
102
|
-
rake (13.
|
103
|
-
redis (4.
|
104
|
-
reline (0.
|
104
|
+
rake (13.2.1)
|
105
|
+
redis (4.8.1)
|
106
|
+
reline (0.3.1)
|
105
107
|
io-console (~> 0.5)
|
106
|
-
|
107
|
-
|
108
|
-
|
108
|
+
retries (0.0.5)
|
109
|
+
rexml (3.2.8)
|
110
|
+
strscan (>= 3.0.9)
|
111
|
+
rimless (1.5.1)
|
112
|
+
activesupport (>= 5.2)
|
109
113
|
avro_turf (~> 0.11.0)
|
110
|
-
karafka (~> 1.4)
|
114
|
+
karafka (~> 1.4, < 1.4.15)
|
111
115
|
karafka-sidekiq-backend (~> 1.4)
|
112
116
|
karafka-testing (~> 1.4)
|
113
|
-
|
117
|
+
retries (>= 0.0.5)
|
118
|
+
sinatra (~> 2.2)
|
114
119
|
sparsify (~> 1.1)
|
115
|
-
waterdrop (~> 1.
|
116
|
-
webmock
|
117
|
-
ruby-kafka (1.
|
120
|
+
waterdrop (~> 1.4)
|
121
|
+
webmock (~> 3.18)
|
122
|
+
ruby-kafka (1.5.0)
|
118
123
|
digest-crc
|
119
124
|
ruby2_keywords (0.0.5)
|
120
|
-
sidekiq (6.
|
121
|
-
connection_pool (>= 2.2.
|
125
|
+
sidekiq (6.5.12)
|
126
|
+
connection_pool (>= 2.2.5, < 3)
|
122
127
|
rack (~> 2.0)
|
123
|
-
redis (>= 4.
|
124
|
-
sinatra (2.
|
125
|
-
mustermann (~>
|
128
|
+
redis (>= 4.5.0, < 5)
|
129
|
+
sinatra (2.2.4)
|
130
|
+
mustermann (~> 2.0)
|
126
131
|
rack (~> 2.2)
|
127
|
-
rack-protection (= 2.
|
132
|
+
rack-protection (= 2.2.4)
|
128
133
|
tilt (~> 2.0)
|
129
134
|
sparsify (1.1.0)
|
130
|
-
|
131
|
-
|
132
|
-
|
135
|
+
strscan (3.1.0)
|
136
|
+
thor (1.2.2)
|
137
|
+
tilt (2.3.0)
|
138
|
+
tzinfo (2.0.6)
|
133
139
|
concurrent-ruby (~> 1.0)
|
134
140
|
waterdrop (1.4.2)
|
135
141
|
delivery_boy (>= 0.2, < 2.x)
|
@@ -138,17 +144,17 @@ GEM
|
|
138
144
|
dry-validation (~> 1.2)
|
139
145
|
ruby-kafka (>= 0.7.8)
|
140
146
|
zeitwerk (~> 2.1)
|
141
|
-
webmock (3.
|
147
|
+
webmock (3.23.0)
|
142
148
|
addressable (>= 2.8.0)
|
143
149
|
crack (>= 0.3.2)
|
144
150
|
hashdiff (>= 0.4.0, < 2.0.0)
|
145
|
-
zeitwerk (2.
|
151
|
+
zeitwerk (2.6.14)
|
146
152
|
|
147
153
|
PLATFORMS
|
148
154
|
x86_64-linux
|
149
155
|
|
150
156
|
DEPENDENCIES
|
151
|
-
rimless (~> 1.
|
157
|
+
rimless (~> 1.5)
|
152
158
|
thor (~> 1.1)
|
153
159
|
|
154
160
|
BUNDLED WITH
|
@@ -76,10 +76,15 @@ the creation of the `/etc/mdns.allow` file.
|
|
76
76
|
After the installation and bootup processes are finished you should have a
|
77
77
|
working Apache Kafka setup which includes the following:
|
78
78
|
|
79
|
-
* A single node [Apache Kafka](https://kafka.apache.org/)
|
80
|
-
|
81
|
-
* [
|
82
|
-
|
79
|
+
* A single node [Apache Kafka](https://kafka.apache.org/) (without Zookeeper,
|
80
|
+
KRaft) broker
|
81
|
+
* [Confluent Schema
|
82
|
+
Registry](https://docs.confluent.io/platform/current/schema-registry/index.html),
|
83
|
+
used for [Apache Avro](https://avro.apache.org/docs/current/) schemas
|
84
|
+
* [Lenses.io Schema Registry
|
85
|
+
UI](https://github.com/lensesio/schema-registry-ui), you can access it via
|
86
|
+
mDNS at http://schema-registry-ui.playground.local
|
87
|
+
* A Ruby 2.7 enabled playground container with configured Rimless support
|
83
88
|
|
84
89
|
## Examples
|
85
90
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
2
4
|
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
3
5
|
require 'active_support'
|
@@ -30,7 +32,7 @@ KafkaClient = Kafka.new(Rimless.configuration.kafka_brokers, logger: AppLogger)
|
|
30
32
|
# (Avahi, libnss[-mdns]). The default resolver of +Resolv+ does not include the
|
31
33
|
# mDNS stack so we have to reconfigure it here for local usage only.
|
32
34
|
#
|
33
|
-
# See: https://docs.ruby-lang.org/en/2.
|
35
|
+
# See: https://docs.ruby-lang.org/en/2.7.0/Resolv.html
|
34
36
|
require 'resolv'
|
35
37
|
Resolv::DefaultResolver.replace_resolvers(
|
36
38
|
[
|
@@ -1,35 +1,12 @@
|
|
1
1
|
version: "3"
|
2
2
|
services:
|
3
|
-
zookeeper:
|
4
|
-
image: zookeeper:3.7
|
5
|
-
network_mode: bridge
|
6
|
-
ports: ["2181"]
|
7
|
-
ulimits:
|
8
|
-
# Due to systemd/pam RLIMIT_NOFILE settings (max int inside the
|
9
|
-
# container), the Java process seams to allocate huge limits which result
|
10
|
-
# in a +unable to allocate file descriptor table - out of memory+ error.
|
11
|
-
# Lowering this value fixes the issue for now.
|
12
|
-
#
|
13
|
-
# See: http://bit.ly/2U62A80
|
14
|
-
# See: http://bit.ly/2T2Izit
|
15
|
-
nofile:
|
16
|
-
soft: 100000
|
17
|
-
hard: 100000
|
18
|
-
|
19
3
|
kafka:
|
20
|
-
image: hausgold/kafka:
|
4
|
+
image: hausgold/kafka:3.7
|
21
5
|
network_mode: bridge
|
22
6
|
environment:
|
23
7
|
MDNS_HOSTNAME: kafka.playground.local
|
24
8
|
# See: http://bit.ly/2UDzgqI for Kafka downscaling
|
25
9
|
KAFKA_HEAP_OPTS: -Xmx256M -Xms32M
|
26
|
-
links:
|
27
|
-
- zookeeper
|
28
|
-
extra_hosts:
|
29
|
-
# Due to missing nss-mdns support on Alpine Linux
|
30
|
-
# and the requirement to tell our self who we are
|
31
|
-
# for Apache Kafka, we register ourself as hostent.
|
32
|
-
- kafka.playground.local:127.0.0.1
|
33
10
|
ulimits:
|
34
11
|
# Due to systemd/pam RLIMIT_NOFILE settings (max int inside the
|
35
12
|
# container), the Java process seams to allocate huge limits which result
|
@@ -43,17 +20,16 @@ services:
|
|
43
20
|
hard: 100000
|
44
21
|
|
45
22
|
schema-registry:
|
46
|
-
image: hausgold/schema-registry:
|
23
|
+
image: hausgold/schema-registry:7.6
|
47
24
|
network_mode: bridge
|
48
25
|
environment:
|
49
26
|
MDNS_HOSTNAME: schema-registry.playground.local
|
27
|
+
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka.playground.local:9092
|
50
28
|
# Set the default Apache Avro schema compatibility
|
51
29
|
#
|
52
30
|
# See: http://bit.ly/2TcpoY1
|
53
31
|
# See: http://bit.ly/2Hfo4wj
|
54
32
|
SCHEMA_REGISTRY_AVRO_COMPATIBILITY_LEVEL: full
|
55
|
-
links:
|
56
|
-
- zookeeper
|
57
33
|
ulimits:
|
58
34
|
# Due to systemd/pam RLIMIT_NOFILE settings (max int inside the
|
59
35
|
# container), the Java process seams to allocate huge limits which result
|
data/gemfiles/rails_5.2.gemfile
CHANGED
@@ -5,7 +5,7 @@ source "https://rubygems.org"
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
6
6
|
gem "bundler", "~> 2.3"
|
7
7
|
gem "countless", "~> 1.1"
|
8
|
-
gem "factory_bot", "~> 6.2"
|
8
|
+
gem "factory_bot", "~> 6.2", "< 6.4.5"
|
9
9
|
gem "guard-rspec", "~> 4.7"
|
10
10
|
gem "railties", "~> 5.2.0"
|
11
11
|
gem "rake", "~> 13.0"
|
data/lib/rimless/avro_utils.rb
CHANGED
@@ -34,12 +34,16 @@ module Rimless
|
|
34
34
|
def render_file(src)
|
35
35
|
# Convert the template path to the destination path
|
36
36
|
dest = schema_path(src)
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
|
38
|
+
# Allow parallel cleanups and execution
|
39
|
+
with_retries(max_tries: 3, rescue: Errno::ENOENT) do
|
40
|
+
# Create the deep path when not yet existing
|
41
|
+
FileUtils.mkdir_p(File.dirname(dest))
|
42
|
+
# Write the rendered file contents to the destination
|
43
|
+
File.write(dest, ERB.new(File.read(src)).result(binding))
|
44
|
+
# Check the written file for correct JSON
|
45
|
+
validate_file(dest)
|
46
|
+
end
|
43
47
|
end
|
44
48
|
|
45
49
|
# Check the given file for valid JSON.
|
@@ -19,9 +19,9 @@ module Rimless
|
|
19
19
|
# occurence should be rare.
|
20
20
|
Rimless
|
21
21
|
.decode(params.raw_payload)
|
22
|
-
.
|
23
|
-
.
|
24
|
-
.
|
22
|
+
.then { |data| Sparsify(data, sparse_array: true) }
|
23
|
+
.then { |data| data.transform_keys { |key| key.delete('\\') } }
|
24
|
+
.then { |data| Unsparsify(data, sparse_array: true) }
|
25
25
|
.deep_symbolize_keys
|
26
26
|
end
|
27
27
|
end
|
data/lib/rimless/rspec.rb
CHANGED
@@ -36,7 +36,7 @@ RSPEC_CONFIGURER.configure do |config|
|
|
36
36
|
num = ENV.fetch('TEST_ENV_NUMBER', nil)
|
37
37
|
num = '1' if num.empty?
|
38
38
|
|
39
|
-
conf.compiled_avro_schema_path =
|
39
|
+
conf.compiled_avro_schema_path =
|
40
40
|
conf.compiled_avro_schema_path.join("test-worker-#{num}")
|
41
41
|
end
|
42
42
|
end
|
@@ -15,7 +15,7 @@ namespace :rimless do
|
|
15
15
|
|
16
16
|
Rimless.consumer.consumer_groups.each do |consumer_group|
|
17
17
|
consumer_group.topics.each do |topic|
|
18
|
-
name = topic.name.split('.')[1
|
18
|
+
name = topic.name.split('.')[1..].join('.')
|
19
19
|
|
20
20
|
puts "# Topic: #{name}"
|
21
21
|
puts "# Consumer: #{topic.consumer}"
|
data/lib/rimless/version.rb
CHANGED
data/lib/rimless.rb
CHANGED
data/log/make.log
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
GNU Make 4.3
|
2
|
+
Built for x86_64-pc-linux-gnu
|
3
|
+
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
4
|
+
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
5
|
+
This is free software: you are free to change and redistribute it.
|
6
|
+
There is NO WARRANTY, to the extent permitted by law.
|
data/rimless.gemspec
CHANGED
@@ -33,13 +33,14 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
34
34
|
spec.require_paths = ['lib']
|
35
35
|
|
36
|
-
spec.required_ruby_version = '>= 2.
|
36
|
+
spec.required_ruby_version = '>= 2.7'
|
37
37
|
|
38
38
|
spec.add_runtime_dependency 'activesupport', '>= 5.2'
|
39
39
|
spec.add_runtime_dependency 'avro_turf', '~> 0.11.0'
|
40
40
|
spec.add_runtime_dependency 'karafka', '~> 1.4', '< 1.4.15'
|
41
41
|
spec.add_runtime_dependency 'karafka-sidekiq-backend', '~> 1.4'
|
42
42
|
spec.add_runtime_dependency 'karafka-testing', '~> 1.4'
|
43
|
+
spec.add_runtime_dependency 'retries', '>= 0.0.5'
|
43
44
|
spec.add_runtime_dependency 'sinatra', '~> 2.2'
|
44
45
|
spec.add_runtime_dependency 'sparsify', '~> 1.1'
|
45
46
|
spec.add_runtime_dependency 'waterdrop', '~> 1.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rimless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -86,6 +86,20 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '1.4'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: retries
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 0.0.5
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 0.0.5
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
name: sinatra
|
91
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -228,6 +242,7 @@ files:
|
|
228
242
|
- lib/rimless/tasks/templates/karafka.rb
|
229
243
|
- lib/rimless/version.rb
|
230
244
|
- log/development.log
|
245
|
+
- log/make.log
|
231
246
|
- rimless.gemspec
|
232
247
|
homepage:
|
233
248
|
licenses:
|
@@ -246,7 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
246
261
|
requirements:
|
247
262
|
- - ">="
|
248
263
|
- !ruby/object:Gem::Version
|
249
|
-
version: '2.
|
264
|
+
version: '2.7'
|
250
265
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
266
|
requirements:
|
252
267
|
- - ">="
|