karafka-core 2.5.8 → 2.5.9
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/ci.yml +40 -27
- data/.github/workflows/push.yml +2 -2
- data/.github/workflows/verify-action-pins.yml +1 -1
- data/.gitignore +0 -1
- data/.rubocop.yml +37 -0
- data/.ruby-version +1 -1
- data/.yard-lint.yml +173 -72
- data/CHANGELOG.md +5 -0
- data/Gemfile +5 -6
- data/Gemfile.lint +13 -0
- data/Gemfile.lint.lock +103 -0
- data/Gemfile.lock +12 -23
- data/Rakefile +14 -2
- data/karafka-core.gemspec +21 -21
- data/lib/karafka/core/configurable/node.rb +39 -39
- data/lib/karafka/core/configurable.rb +4 -4
- data/lib/karafka/core/contractable/contract.rb +2 -2
- data/lib/karafka/core/contractable/result.rb +10 -10
- data/lib/karafka/core/helpers/rspec_locator.rb +9 -9
- data/lib/karafka/core/helpers/time.rb +1 -1
- data/lib/karafka/core/monitoring/monitor.rb +1 -1
- data/lib/karafka/core/monitoring/notifications.rb +2 -2
- data/lib/karafka/core/monitoring/statistics_decorator.rb +69 -62
- data/lib/karafka/core/version.rb +1 -1
- data/lib/karafka/core.rb +1 -1
- data/lib/karafka-core.rb +22 -22
- data/package-lock.json +331 -0
- data/package.json +9 -0
- data/renovate.json +28 -6
- data/test/lib/karafka/core/configurable/leaf_test.rb +3 -0
- data/test/lib/karafka/core/configurable/node_test.rb +3 -0
- data/test/lib/karafka/core/configurable_test.rb +504 -0
- data/test/lib/karafka/core/contractable/contract_test.rb +241 -0
- data/test/lib/karafka/core/contractable/result_test.rb +106 -0
- data/test/lib/karafka/core/contractable/rule_test.rb +5 -0
- data/test/lib/karafka/core/contractable_test.rb +3 -0
- data/test/lib/karafka/core/helpers/time_test.rb +29 -0
- data/test/lib/karafka/core/instrumentation/callbacks_manager_test.rb +81 -0
- data/test/lib/karafka/core/instrumentation_test.rb +35 -0
- data/test/lib/karafka/core/monitoring/event_test.rb +25 -0
- data/test/lib/karafka/core/monitoring/monitor_test.rb +237 -0
- data/test/lib/karafka/core/monitoring/notifications_test.rb +275 -0
- data/test/lib/karafka/core/monitoring/statistics_decorator_test.rb +284 -0
- data/test/lib/karafka/core/monitoring_test.rb +3 -0
- data/test/lib/karafka/core/patches/rdkafka/bindings_test.rb +25 -0
- data/test/lib/karafka/core/taggable/tags_test.rb +66 -0
- data/test/lib/karafka/core/taggable_test.rb +36 -0
- data/test/lib/karafka/core/version_test.rb +5 -0
- data/test/lib/karafka/core_test.rb +13 -0
- data/test/lib/karafka-core_test.rb +3 -0
- data/test/support/class_builder.rb +24 -0
- data/test/support/describe_current_helper.rb +85 -0
- data/test/test_helper.rb +55 -0
- metadata +31 -4
- data/.coditsu/ci.yml +0 -3
- data/.rspec +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f40905132baef109ff513aedd80d0be8aa041a4bc44117e2e897e554daa9b47c
|
|
4
|
+
data.tar.gz: d4fbaeb025d4f79d834aea13f4defd294f7d874c628973ce5279b840b713d006
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ae8c3a4772bb914737111319cab6706a45a6af62826a16cb357d43a7521f0b390e2ab338e2e818c24c738d586d1feb89c18799b055d83ce4f089b9642c36910
|
|
7
|
+
data.tar.gz: fbeaeac510a0b2ad3ef23cca8d5a5b958a9e6debbe98899fb4590f3a1dbccaec7543fbd58dea66b5cd344a7783b051d4d60398ba370e66d8fb07a2244ad454d0
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -21,15 +21,15 @@ jobs:
|
|
|
21
21
|
fail-fast: false
|
|
22
22
|
matrix:
|
|
23
23
|
ruby:
|
|
24
|
-
- '4.0
|
|
24
|
+
- '4.0'
|
|
25
25
|
- '3.4'
|
|
26
26
|
- '3.3'
|
|
27
27
|
- '3.2'
|
|
28
28
|
include:
|
|
29
|
-
- ruby: '
|
|
29
|
+
- ruby: '4.0'
|
|
30
30
|
coverage: 'true'
|
|
31
31
|
steps:
|
|
32
|
-
- uses: actions/checkout@
|
|
32
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
33
33
|
with:
|
|
34
34
|
fetch-depth: 0
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
|
38
38
|
|
|
39
39
|
- name: Set up Ruby
|
|
40
|
-
uses: ruby/setup-ruby@
|
|
40
|
+
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
|
|
41
41
|
with:
|
|
42
42
|
ruby-version: ${{matrix.ruby}}
|
|
43
43
|
bundler: 'latest'
|
|
@@ -57,55 +57,68 @@ jobs:
|
|
|
57
57
|
- name: Run all tests
|
|
58
58
|
env:
|
|
59
59
|
GITHUB_COVERAGE: ${{matrix.coverage}}
|
|
60
|
-
run: bundle exec
|
|
60
|
+
run: bundle exec rake test
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
rubocop:
|
|
63
63
|
timeout-minutes: 5
|
|
64
64
|
runs-on: ubuntu-latest
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
env:
|
|
66
|
+
BUNDLE_GEMFILE: Gemfile.lint
|
|
67
67
|
steps:
|
|
68
|
-
- uses: actions/checkout@
|
|
68
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
69
69
|
with:
|
|
70
70
|
fetch-depth: 0
|
|
71
|
-
- name:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
ACTUAL_SHA256=$(sha256sum coditsu_script.sh | awk '{ print $1 }')
|
|
79
|
-
if [ "$ACTUAL_SHA256" != "$EXPECTED_SHA256" ]; then
|
|
80
|
-
echo "::error::Checksum verification failed. Expected $EXPECTED_SHA256 but got $ACTUAL_SHA256."
|
|
81
|
-
exit 1
|
|
82
|
-
fi
|
|
83
|
-
- name: Run Coditsu
|
|
84
|
-
run: ./coditsu_script.sh
|
|
71
|
+
- name: Set up Ruby
|
|
72
|
+
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
|
|
73
|
+
with:
|
|
74
|
+
ruby-version: '4.0.1'
|
|
75
|
+
bundler-cache: true
|
|
76
|
+
- name: Run rubocop
|
|
77
|
+
run: bundle exec rubocop
|
|
85
78
|
|
|
86
79
|
yard-lint:
|
|
87
80
|
timeout-minutes: 5
|
|
88
81
|
runs-on: ubuntu-latest
|
|
82
|
+
env:
|
|
83
|
+
BUNDLE_GEMFILE: Gemfile.lint
|
|
89
84
|
steps:
|
|
90
|
-
- uses: actions/checkout@
|
|
85
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
91
86
|
with:
|
|
92
87
|
fetch-depth: 0
|
|
93
88
|
- name: Set up Ruby
|
|
94
|
-
uses: ruby/setup-ruby@
|
|
89
|
+
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
|
|
95
90
|
with:
|
|
96
|
-
ruby-version: '
|
|
91
|
+
ruby-version: '4.0.1'
|
|
97
92
|
bundler-cache: true
|
|
98
93
|
- name: Run yard-lint
|
|
99
94
|
run: bundle exec yard-lint lib/
|
|
100
95
|
|
|
96
|
+
lostconf:
|
|
97
|
+
timeout-minutes: 5
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
101
|
+
with:
|
|
102
|
+
fetch-depth: 0
|
|
103
|
+
- name: Set up Node.js
|
|
104
|
+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
105
|
+
with:
|
|
106
|
+
node-version: '20'
|
|
107
|
+
cache: 'npm'
|
|
108
|
+
- name: Install dependencies
|
|
109
|
+
run: npm ci
|
|
110
|
+
- name: Run lostconf
|
|
111
|
+
run: npx lostconf --fail-on-stale
|
|
112
|
+
|
|
101
113
|
ci-success:
|
|
102
114
|
name: CI Success
|
|
103
115
|
runs-on: ubuntu-latest
|
|
104
116
|
if: always()
|
|
105
117
|
needs:
|
|
106
|
-
-
|
|
118
|
+
- rubocop
|
|
107
119
|
- specs
|
|
108
120
|
- yard-lint
|
|
121
|
+
- lostconf
|
|
109
122
|
steps:
|
|
110
123
|
- name: Check all jobs passed
|
|
111
124
|
if: |
|
data/.github/workflows/push.yml
CHANGED
|
@@ -19,12 +19,12 @@ jobs:
|
|
|
19
19
|
id-token: write
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
|
-
- uses: actions/checkout@
|
|
22
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
23
23
|
with:
|
|
24
24
|
fetch-depth: 0
|
|
25
25
|
|
|
26
26
|
- name: Set up Ruby
|
|
27
|
-
uses: ruby/setup-ruby@
|
|
27
|
+
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
|
|
28
28
|
with:
|
|
29
29
|
bundler-cache: false
|
|
30
30
|
|
|
@@ -7,7 +7,7 @@ jobs:
|
|
|
7
7
|
verify_action_pins:
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
|
-
- uses: actions/checkout@
|
|
10
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
11
11
|
- name: Check SHA pins
|
|
12
12
|
run: |
|
|
13
13
|
if grep -E -r "uses: .*/.*@(v[0-9]+|main|master)($|[[:space:]]|$)" --include="*.yml" --include="*.yaml" .github/workflows/ | grep -v "#"; then
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
plugins:
|
|
4
|
+
- rubocop-minitest
|
|
5
|
+
- rubocop-performance
|
|
6
|
+
- rubocop-thread_safety
|
|
7
|
+
|
|
8
|
+
inherit_gem:
|
|
9
|
+
standard: config/base.yml
|
|
10
|
+
standard-performance: config/base.yml
|
|
11
|
+
|
|
12
|
+
AllCops:
|
|
13
|
+
NewCops: enable
|
|
14
|
+
TargetRubyVersion: 3.2
|
|
15
|
+
Include:
|
|
16
|
+
- "**/*.rb"
|
|
17
|
+
- "**/*.gemspec"
|
|
18
|
+
- "**/Gemfile"
|
|
19
|
+
- "**/Rakefile"
|
|
20
|
+
- Gemfile.lint
|
|
21
|
+
|
|
22
|
+
# Layout
|
|
23
|
+
Layout/LineLength:
|
|
24
|
+
Max: 100
|
|
25
|
+
|
|
26
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
27
|
+
EnforcedStyle: space
|
|
28
|
+
|
|
29
|
+
# ThreadSafety
|
|
30
|
+
ThreadSafety/ClassAndModuleAttributes:
|
|
31
|
+
Enabled: false
|
|
32
|
+
|
|
33
|
+
ThreadSafety/ClassInstanceVariable:
|
|
34
|
+
Enabled: false
|
|
35
|
+
|
|
36
|
+
ThreadSafety/NewThread:
|
|
37
|
+
Enabled: false
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.1
|
data/.yard-lint.yml
CHANGED
|
@@ -3,172 +3,273 @@
|
|
|
3
3
|
|
|
4
4
|
# Global settings for all validators
|
|
5
5
|
AllValidators:
|
|
6
|
-
# YARD command-line options (applied to all validators by default)
|
|
7
6
|
YardOptions:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# Global file exclusion patterns
|
|
7
|
+
- "--private"
|
|
8
|
+
- "--protected"
|
|
12
9
|
Exclude:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Exit code behavior (error, warning, convention, never)
|
|
20
|
-
FailOnSeverity: error
|
|
21
|
-
|
|
22
|
-
# Minimum documentation coverage percentage (0-100)
|
|
23
|
-
# Fails if coverage is below this threshold
|
|
10
|
+
- .git/**/*
|
|
11
|
+
- vendor/**/*
|
|
12
|
+
- node_modules/**/*
|
|
13
|
+
- test/**/*
|
|
14
|
+
FailOnSeverity: convention
|
|
24
15
|
MinCoverage: 98.0
|
|
25
|
-
|
|
26
|
-
# Diff mode settings
|
|
27
16
|
DiffMode:
|
|
28
|
-
|
|
29
|
-
DefaultBaseRef: ~
|
|
17
|
+
DefaultBaseRef:
|
|
30
18
|
|
|
31
19
|
# Documentation validators
|
|
32
20
|
Documentation/UndocumentedObjects:
|
|
33
|
-
Description:
|
|
21
|
+
Description: Checks for classes, modules, and methods without documentation.
|
|
34
22
|
Enabled: true
|
|
35
23
|
Severity: error
|
|
36
24
|
ExcludedMethods:
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
- initialize/0
|
|
26
|
+
- "/^_/"
|
|
39
27
|
|
|
40
28
|
Documentation/UndocumentedMethodArguments:
|
|
41
|
-
Description:
|
|
29
|
+
Description: Checks for method parameters without @param tags.
|
|
42
30
|
Enabled: true
|
|
43
31
|
Severity: error
|
|
44
32
|
|
|
45
33
|
Documentation/UndocumentedBooleanMethods:
|
|
46
|
-
Description:
|
|
34
|
+
Description: Checks that question mark methods document their boolean return.
|
|
47
35
|
Enabled: true
|
|
48
36
|
Severity: error
|
|
49
37
|
|
|
50
38
|
Documentation/UndocumentedOptions:
|
|
51
|
-
Description:
|
|
39
|
+
Description: Detects methods with options hash parameters but no @option tags.
|
|
52
40
|
Enabled: true
|
|
53
41
|
Severity: error
|
|
54
42
|
|
|
55
43
|
Documentation/MarkdownSyntax:
|
|
56
|
-
Description:
|
|
44
|
+
Description: Detects common markdown syntax errors in documentation.
|
|
57
45
|
Enabled: true
|
|
58
46
|
Severity: error
|
|
59
47
|
|
|
48
|
+
Documentation/EmptyCommentLine:
|
|
49
|
+
Description: Detects empty comment lines at the start or end of documentation blocks.
|
|
50
|
+
Enabled: true
|
|
51
|
+
Severity: convention
|
|
52
|
+
EnabledPatterns:
|
|
53
|
+
Leading: true
|
|
54
|
+
Trailing: true
|
|
55
|
+
|
|
56
|
+
Documentation/BlankLineBeforeDefinition:
|
|
57
|
+
Description: Detects blank lines between YARD documentation and method definition.
|
|
58
|
+
Enabled: true
|
|
59
|
+
Severity: convention
|
|
60
|
+
OrphanedSeverity: convention
|
|
61
|
+
EnabledPatterns:
|
|
62
|
+
SingleBlankLine: true
|
|
63
|
+
OrphanedDocs: true
|
|
64
|
+
|
|
60
65
|
# Tags validators
|
|
61
66
|
Tags/Order:
|
|
62
|
-
Description:
|
|
67
|
+
Description: Enforces consistent ordering of YARD tags.
|
|
63
68
|
Enabled: true
|
|
64
69
|
Severity: error
|
|
65
70
|
EnforcedOrder:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
- param
|
|
72
|
+
- option
|
|
73
|
+
- return
|
|
74
|
+
- raise
|
|
75
|
+
- example
|
|
71
76
|
|
|
72
77
|
Tags/InvalidTypes:
|
|
73
|
-
Description:
|
|
78
|
+
Description: Validates type definitions in @param, @return, @option tags.
|
|
74
79
|
Enabled: true
|
|
75
80
|
Severity: error
|
|
76
81
|
ValidatedTags:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
- param
|
|
83
|
+
- option
|
|
84
|
+
- return
|
|
80
85
|
|
|
81
86
|
Tags/TypeSyntax:
|
|
82
|
-
Description:
|
|
87
|
+
Description: Validates YARD type syntax using YARD parser.
|
|
83
88
|
Enabled: true
|
|
84
89
|
Severity: error
|
|
85
90
|
ValidatedTags:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
- param
|
|
92
|
+
- option
|
|
93
|
+
- return
|
|
94
|
+
- yieldreturn
|
|
90
95
|
|
|
91
96
|
Tags/MeaninglessTag:
|
|
92
|
-
Description:
|
|
97
|
+
Description: Detects @param/@option tags on classes, modules, or constants.
|
|
93
98
|
Enabled: true
|
|
94
99
|
Severity: error
|
|
95
100
|
CheckedTags:
|
|
96
|
-
|
|
97
|
-
|
|
101
|
+
- param
|
|
102
|
+
- option
|
|
98
103
|
InvalidObjectTypes:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
- class
|
|
105
|
+
- module
|
|
106
|
+
- constant
|
|
102
107
|
|
|
103
108
|
Tags/CollectionType:
|
|
104
|
-
Description:
|
|
109
|
+
Description: Validates Hash collection syntax consistency.
|
|
105
110
|
Enabled: true
|
|
106
111
|
Severity: error
|
|
107
|
-
EnforcedStyle: long
|
|
112
|
+
EnforcedStyle: long
|
|
108
113
|
ValidatedTags:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
- param
|
|
115
|
+
- option
|
|
116
|
+
- return
|
|
117
|
+
- yieldreturn
|
|
113
118
|
|
|
114
119
|
Tags/TagTypePosition:
|
|
115
|
-
Description:
|
|
120
|
+
Description: Validates type annotation position in tags.
|
|
116
121
|
Enabled: true
|
|
117
122
|
Severity: error
|
|
118
123
|
CheckedTags:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
# EnforcedStyle: 'type_after_name' (YARD standard: @param name [Type])
|
|
122
|
-
# or 'type_first' (@param [Type] name)
|
|
124
|
+
- param
|
|
125
|
+
- option
|
|
123
126
|
EnforcedStyle: type_after_name
|
|
124
127
|
|
|
125
128
|
Tags/ApiTags:
|
|
126
|
-
Description:
|
|
127
|
-
Enabled: false
|
|
129
|
+
Description: Enforces @api tags on public objects.
|
|
130
|
+
Enabled: false
|
|
128
131
|
Severity: error
|
|
129
132
|
AllowedApis:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
- public
|
|
134
|
+
- private
|
|
135
|
+
- internal
|
|
133
136
|
|
|
134
137
|
Tags/OptionTags:
|
|
135
|
-
Description:
|
|
138
|
+
Description: Requires @option tags for methods with options parameters.
|
|
136
139
|
Enabled: true
|
|
137
140
|
Severity: error
|
|
138
141
|
|
|
142
|
+
Tags/ExampleSyntax:
|
|
143
|
+
Description: Validates Ruby syntax in @example tags.
|
|
144
|
+
Enabled: true
|
|
145
|
+
Severity: warning
|
|
146
|
+
|
|
147
|
+
Tags/RedundantParamDescription:
|
|
148
|
+
Description: Detects meaningless parameter descriptions that add no value.
|
|
149
|
+
Enabled: true
|
|
150
|
+
Severity: convention
|
|
151
|
+
CheckedTags:
|
|
152
|
+
- param
|
|
153
|
+
- option
|
|
154
|
+
Articles:
|
|
155
|
+
- The
|
|
156
|
+
- the
|
|
157
|
+
- A
|
|
158
|
+
- a
|
|
159
|
+
- An
|
|
160
|
+
- an
|
|
161
|
+
MaxRedundantWords: 6
|
|
162
|
+
GenericTerms:
|
|
163
|
+
- object
|
|
164
|
+
- instance
|
|
165
|
+
- value
|
|
166
|
+
- data
|
|
167
|
+
- item
|
|
168
|
+
- element
|
|
169
|
+
EnabledPatterns:
|
|
170
|
+
ArticleParam: true
|
|
171
|
+
PossessiveParam: true
|
|
172
|
+
TypeRestatement: true
|
|
173
|
+
ParamToVerb: true
|
|
174
|
+
IdPattern: true
|
|
175
|
+
DirectionalDate: true
|
|
176
|
+
TypeGeneric: true
|
|
177
|
+
|
|
178
|
+
Tags/InformalNotation:
|
|
179
|
+
Description: Detects informal tag notation patterns like "Note:" instead of @note.
|
|
180
|
+
Enabled: true
|
|
181
|
+
Severity: warning
|
|
182
|
+
CaseSensitive: false
|
|
183
|
+
RequireStartOfLine: true
|
|
184
|
+
Patterns:
|
|
185
|
+
Note: "@note"
|
|
186
|
+
Todo: "@todo"
|
|
187
|
+
TODO: "@todo"
|
|
188
|
+
FIXME: "@todo"
|
|
189
|
+
See: "@see"
|
|
190
|
+
See also: "@see"
|
|
191
|
+
Warning: "@deprecated"
|
|
192
|
+
Deprecated: "@deprecated"
|
|
193
|
+
Author: "@author"
|
|
194
|
+
Version: "@version"
|
|
195
|
+
Since: "@since"
|
|
196
|
+
Returns: "@return"
|
|
197
|
+
Raises: "@raise"
|
|
198
|
+
Example: "@example"
|
|
199
|
+
|
|
200
|
+
Tags/NonAsciiType:
|
|
201
|
+
Description: Detects non-ASCII characters in type annotations.
|
|
202
|
+
Enabled: true
|
|
203
|
+
Severity: warning
|
|
204
|
+
ValidatedTags:
|
|
205
|
+
- param
|
|
206
|
+
- option
|
|
207
|
+
- return
|
|
208
|
+
- yieldreturn
|
|
209
|
+
- yieldparam
|
|
210
|
+
|
|
211
|
+
Tags/TagGroupSeparator:
|
|
212
|
+
Description: Enforces blank line separators between different YARD tag groups.
|
|
213
|
+
Enabled: false
|
|
214
|
+
Severity: convention
|
|
215
|
+
TagGroups:
|
|
216
|
+
param:
|
|
217
|
+
- param
|
|
218
|
+
- option
|
|
219
|
+
return:
|
|
220
|
+
- return
|
|
221
|
+
error:
|
|
222
|
+
- raise
|
|
223
|
+
- throws
|
|
224
|
+
example:
|
|
225
|
+
- example
|
|
226
|
+
meta:
|
|
227
|
+
- see
|
|
228
|
+
- note
|
|
229
|
+
- todo
|
|
230
|
+
- deprecated
|
|
231
|
+
- since
|
|
232
|
+
- version
|
|
233
|
+
- api
|
|
234
|
+
yield:
|
|
235
|
+
- yield
|
|
236
|
+
- yieldparam
|
|
237
|
+
- yieldreturn
|
|
238
|
+
RequireAfterDescription: false
|
|
239
|
+
|
|
139
240
|
# Warnings validators - catches YARD parser errors
|
|
140
241
|
Warnings/UnknownTag:
|
|
141
|
-
Description:
|
|
242
|
+
Description: Detects unknown YARD tags.
|
|
142
243
|
Enabled: true
|
|
143
244
|
Severity: error
|
|
144
245
|
|
|
145
246
|
Warnings/UnknownDirective:
|
|
146
|
-
Description:
|
|
247
|
+
Description: Detects unknown YARD directives.
|
|
147
248
|
Enabled: true
|
|
148
249
|
Severity: error
|
|
149
250
|
|
|
150
251
|
Warnings/InvalidTagFormat:
|
|
151
|
-
Description:
|
|
252
|
+
Description: Detects malformed tag syntax.
|
|
152
253
|
Enabled: true
|
|
153
254
|
Severity: error
|
|
154
255
|
|
|
155
256
|
Warnings/InvalidDirectiveFormat:
|
|
156
|
-
Description:
|
|
257
|
+
Description: Detects malformed directive syntax.
|
|
157
258
|
Enabled: true
|
|
158
259
|
Severity: error
|
|
159
260
|
|
|
160
261
|
Warnings/DuplicatedParameterName:
|
|
161
|
-
Description:
|
|
262
|
+
Description: Detects duplicate @param tags.
|
|
162
263
|
Enabled: true
|
|
163
264
|
Severity: error
|
|
164
265
|
|
|
165
266
|
Warnings/UnknownParameterName:
|
|
166
|
-
Description:
|
|
267
|
+
Description: Detects @param tags for non-existent parameters.
|
|
167
268
|
Enabled: true
|
|
168
269
|
Severity: error
|
|
169
270
|
|
|
170
271
|
# Semantic validators
|
|
171
272
|
Semantic/AbstractMethods:
|
|
172
|
-
Description:
|
|
273
|
+
Description: Ensures @abstract methods do not have real implementations.
|
|
173
274
|
Enabled: true
|
|
174
275
|
Severity: error
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Karafka Core Changelog
|
|
2
2
|
|
|
3
|
+
## 2.5.9 (2026-03-02)
|
|
4
|
+
- [Enhancement] Optimize `StatisticsDecorator` to eliminate per-hash Array allocations by using `each_pair` with a per-call pending-writes buffer instead of `current.keys.each`, reducing allocations from tens of thousands to one per call at scale.
|
|
5
|
+
- [Enhancement] Inline `StatisticsDecorator#append` and `#suffix_keys_for` into `#diff` to reduce method call overhead by ~96% (from ~915k to ~39k calls at 6400 partitions).
|
|
6
|
+
- [Enhancement] Support `excluded_keys` option in `StatisticsDecorator` to skip decoration of unused librdkafka statistics subtrees (e.g. broker toppars, window stats), yielding ~28% additional speedup at scale.
|
|
7
|
+
|
|
3
8
|
## 2.5.8 (2025-11-23)
|
|
4
9
|
- [Enhancement] Memoize `StatisticsDecorator` suffix keys to reduce string allocations (#268).
|
|
5
10
|
|
data/Gemfile
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
source
|
|
3
|
+
source "https://rubygems.org"
|
|
4
4
|
|
|
5
5
|
gemspec
|
|
6
6
|
|
|
7
7
|
group :test do
|
|
8
|
-
gem
|
|
9
|
-
gem
|
|
10
|
-
gem
|
|
11
|
-
gem
|
|
12
|
-
gem 'yard-lint'
|
|
8
|
+
gem "byebug"
|
|
9
|
+
gem "minitest"
|
|
10
|
+
gem "simplecov"
|
|
11
|
+
gem "warning"
|
|
13
12
|
end
|
data/Gemfile.lint
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
# Documentation linting
|
|
6
|
+
gem "yard-lint"
|
|
7
|
+
|
|
8
|
+
# Code style (StandardRB via RuboCop)
|
|
9
|
+
gem "standard"
|
|
10
|
+
gem "standard-performance"
|
|
11
|
+
gem "rubocop-performance"
|
|
12
|
+
gem "rubocop-minitest"
|
|
13
|
+
gem "rubocop-thread_safety"
|