karafka-core 2.6.7 → 2.6.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 +5 -5
- data/.github/workflows/push.yml +6 -5
- data/.github/workflows/sigstore_check.yml +49 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +3 -3
- data/lib/karafka/core/contractable/contract.rb +9 -3
- data/lib/karafka/core/helpers/kafka/config.rb +27 -0
- data/lib/karafka/core/version.rb +1 -1
- data/lib/karafka-core.rb +1 -0
- data/renovate.json +0 -9
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76358e7c8611fc35f916793e0cab32637f46d55b48d00e6362657d8226df183b
|
|
4
|
+
data.tar.gz: d2ca3020b63d0476dbe8cd12e6bccacc1e684a900bd0e3d1cb9938bfaffee4ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 65f9f87efa744efe7ea64f1edcb7e4b10c719e3a4ec8610b76a27ea6d48fe2a0ec8d11926efcd524d29d58883076e7d728e2074e71eff473ff3bf7d1aa6ad29e
|
|
7
|
+
data.tar.gz: 66d0a8fcdd746259711bf11b7dbd477e372640e9e385c7d43a960a6439946486b4b49f43958d7c841a11d33c7a62a458cb1caece6870cee251013ecc1c6ffeef
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -80,7 +80,7 @@ jobs:
|
|
|
80
80
|
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
|
81
81
|
|
|
82
82
|
- name: Set up Ruby
|
|
83
|
-
uses: ruby/setup-ruby@
|
|
83
|
+
uses: ruby/setup-ruby@f9c4492e86def3e644ab32a0ef185eda5b0c20d0 # v1.342.0
|
|
84
84
|
with:
|
|
85
85
|
ruby-version: ${{matrix.ruby}}
|
|
86
86
|
bundler: 'latest'
|
|
@@ -114,9 +114,9 @@ jobs:
|
|
|
114
114
|
with:
|
|
115
115
|
fetch-depth: 0
|
|
116
116
|
- name: Set up Ruby
|
|
117
|
-
uses: ruby/setup-ruby@
|
|
117
|
+
uses: ruby/setup-ruby@f9c4492e86def3e644ab32a0ef185eda5b0c20d0 # v1.342.0
|
|
118
118
|
with:
|
|
119
|
-
ruby-version: '4.0.
|
|
119
|
+
ruby-version: '4.0.10'
|
|
120
120
|
bundler-cache: true
|
|
121
121
|
- name: Run rubocop
|
|
122
122
|
run: bundle exec rubocop
|
|
@@ -133,9 +133,9 @@ jobs:
|
|
|
133
133
|
with:
|
|
134
134
|
fetch-depth: 0
|
|
135
135
|
- name: Set up Ruby
|
|
136
|
-
uses: ruby/setup-ruby@
|
|
136
|
+
uses: ruby/setup-ruby@f9c4492e86def3e644ab32a0ef185eda5b0c20d0 # v1.342.0
|
|
137
137
|
with:
|
|
138
|
-
ruby-version: '4.0.
|
|
138
|
+
ruby-version: '4.0.10'
|
|
139
139
|
bundler-cache: true
|
|
140
140
|
- name: Run yard-lint
|
|
141
141
|
run: bundle exec yard-lint lib/
|
data/.github/workflows/push.yml
CHANGED
|
@@ -24,12 +24,13 @@ jobs:
|
|
|
24
24
|
fetch-depth: 0
|
|
25
25
|
|
|
26
26
|
- name: Set up Ruby
|
|
27
|
-
uses: ruby/setup-ruby@
|
|
27
|
+
uses: ruby/setup-ruby@f9c4492e86def3e644ab32a0ef185eda5b0c20d0 # v1.342.0
|
|
28
28
|
with:
|
|
29
29
|
bundler-cache: false
|
|
30
30
|
|
|
31
|
-
- name:
|
|
32
|
-
run:
|
|
33
|
-
bundle install --jobs 4 --retry 3
|
|
31
|
+
- name: Build the gem
|
|
32
|
+
run: gem build *.gemspec
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
# Unlike rubygems/release-gem, this action does not push when signing fails
|
|
35
|
+
- name: Sign and push the gem (with Sigstore attestation)
|
|
36
|
+
uses: karafka/misc/.github/actions/gem-push@0fae3bd661f8f240f5b12039eb844ad52940a4fb # master
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Sigstore Check
|
|
2
|
+
|
|
3
|
+
# Builds the gem, signs it the way the push workflows do and verifies the attestation, without
|
|
4
|
+
# pushing anything, so a broken signer shows up before a release
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '0 3 * * *'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ master ]
|
|
11
|
+
paths:
|
|
12
|
+
- '.github/workflows/sigstore_check.yml'
|
|
13
|
+
- '.github/workflows/push*.yml'
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
21
|
+
cancel-in-progress: true
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
sign:
|
|
25
|
+
# Signing needs the OIDC token, which forks do not get
|
|
26
|
+
if: >-
|
|
27
|
+
github.repository_owner == 'karafka' &&
|
|
28
|
+
(github.event_name != 'pull_request' ||
|
|
29
|
+
github.event.pull_request.head.repo.full_name == github.repository)
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
timeout-minutes: 15
|
|
32
|
+
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
id-token: write
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
39
|
+
|
|
40
|
+
- name: Set up Ruby
|
|
41
|
+
uses: ruby/setup-ruby@f9c4492e86def3e644ab32a0ef185eda5b0c20d0 # v1.342.0
|
|
42
|
+
with:
|
|
43
|
+
bundler-cache: false
|
|
44
|
+
|
|
45
|
+
- name: Build the gem
|
|
46
|
+
run: gem build *.gemspec
|
|
47
|
+
|
|
48
|
+
- name: Sign and verify the gem
|
|
49
|
+
uses: karafka/misc/.github/actions/sigstore-check@0fae3bd661f8f240f5b12039eb844ad52940a4fb # master
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.10
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Karafka Core Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.9 (2026-11-20)
|
|
4
|
+
- [Maintenance] Release the code of 2.6.8 again, with a Sigstore attestation. 2.6.6, 2.6.7 and 2.6.8 were published without one: signing failed in the release workflow (the signer does not work with json 3.x, the default of Ruby 4.0) and the attestation patch then pushed the gems unsigned. There are no code changes; use 2.6.9 rather than 2.6.8 for the attested gem.
|
|
5
|
+
- [Maintenance] Sign the gem with `sigstore-cli` and push it with `gem push --attestation` (the `gem-push` action of `karafka/misc`), so a failed signing stops the release instead of publishing the gem without an attestation.
|
|
6
|
+
- [Maintenance] Add the `Sigstore Check` workflow: nightly, and on pull requests that change the push workflow, it builds the gem, signs it like a release and verifies the attestation, without pushing.
|
|
7
|
+
|
|
8
|
+
## 2.6.8 (2026-11-12)
|
|
9
|
+
- [Feature] Add `Helpers::Kafka::Config.enabled?` that treats a librdkafka boolean setting as on only when it is `true` or `"true"`.
|
|
10
|
+
- [Change] Make `Contractable::Contract.virtual` raise `ArgumentError` when called inside `nested`. Such a rule ignored the nesting and got the root data.
|
|
11
|
+
|
|
3
12
|
## 2.6.7 (2026-11-10)
|
|
4
13
|
- [Maintenance] Declare `rake` in the `Gemfile`. It came only through `karafka-rdkafka`, which will stop depending on it for precompiled platform gems.
|
|
5
14
|
- [Enhancement] Make `Taggable::Tags#add` with the value a tag already has and `#delete` of a missing tag about 6x faster on MRI and JRuby.
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
karafka-core (2.6.
|
|
4
|
+
karafka-core (2.6.9)
|
|
5
5
|
karafka-rdkafka (>= 0.20.0)
|
|
6
6
|
logger (>= 1.6.0)
|
|
7
7
|
|
|
@@ -59,9 +59,9 @@ GEM
|
|
|
59
59
|
rake (> 12)
|
|
60
60
|
logger (1.7.0)
|
|
61
61
|
mini_portile2 (2.8.9)
|
|
62
|
-
minitest (6.0
|
|
62
|
+
minitest (6.1.0)
|
|
63
63
|
drb (~> 2.0)
|
|
64
|
-
prism (
|
|
64
|
+
prism (>= 1.5, < 3)
|
|
65
65
|
prism (1.9.0)
|
|
66
66
|
rake (13.4.2)
|
|
67
67
|
simplecov (1.3.2)
|
|
@@ -101,11 +101,17 @@ module Karafka
|
|
|
101
101
|
# raise `FrozenError`). Build the result in the block (e.g. `[[%i[id], :invalid]]`)
|
|
102
102
|
# rather than returning a constant.
|
|
103
103
|
#
|
|
104
|
-
# @note A virtual rule
|
|
105
|
-
# (also when it is not a Hash) and its error paths start at the root. Define
|
|
106
|
-
# rules outside of `nested` and use full paths in the returned errors.
|
|
104
|
+
# @note A virtual rule cannot be defined inside `nested`: its block receives the root
|
|
105
|
+
# data (also when it is not a Hash) and its error paths start at the root. Define
|
|
106
|
+
# virtual rules outside of `nested` and use full paths in the returned errors.
|
|
107
|
+
#
|
|
108
|
+
# @raise [ArgumentError] when called inside a `nested` block, with the nested path as the
|
|
109
|
+
# message
|
|
107
110
|
def virtual(&block)
|
|
108
111
|
init_accu
|
|
112
|
+
|
|
113
|
+
raise ArgumentError, @nested.join(".") unless @nested.empty?
|
|
114
|
+
|
|
109
115
|
@rules << Rule.new([], :virtual, block).freeze
|
|
110
116
|
end
|
|
111
117
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Karafka
|
|
4
|
+
module Core
|
|
5
|
+
module Helpers
|
|
6
|
+
# Kafka related helpers
|
|
7
|
+
module Kafka
|
|
8
|
+
# Reads librdkafka configuration values the way the ecosystem acts on them
|
|
9
|
+
module Config
|
|
10
|
+
# Values that turn a librdkafka boolean setting on
|
|
11
|
+
ENABLED_VALUES = [true, "true"].freeze
|
|
12
|
+
|
|
13
|
+
private_constant :ENABLED_VALUES
|
|
14
|
+
|
|
15
|
+
class << self
|
|
16
|
+
# @param value [Object] librdkafka boolean setting value (e.g. from a `kafka` hash)
|
|
17
|
+
# @return [Boolean] true only when the value is `true` or `"true"`
|
|
18
|
+
# @note Any other value, including `nil` (setting not provided) and `"false"`, is false
|
|
19
|
+
def enabled?(value)
|
|
20
|
+
ENABLED_VALUES.include?(value)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/karafka/core/version.rb
CHANGED
data/lib/karafka-core.rb
CHANGED
|
@@ -7,6 +7,7 @@ require "rdkafka"
|
|
|
7
7
|
require "karafka/core"
|
|
8
8
|
require "karafka/core/version"
|
|
9
9
|
require "karafka/core/helpers/time"
|
|
10
|
+
require "karafka/core/helpers/kafka/config"
|
|
10
11
|
require "karafka/core/monitoring"
|
|
11
12
|
require "karafka/core/monitoring/event"
|
|
12
13
|
require "karafka/core/monitoring/monitor"
|
data/renovate.json
CHANGED
|
@@ -44,13 +44,6 @@
|
|
|
44
44
|
"ruby/setup-ruby"
|
|
45
45
|
],
|
|
46
46
|
"minimumReleaseAge": "5 days"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"description": "Major updates stay manual",
|
|
50
|
-
"matchUpdateTypes": [
|
|
51
|
-
"major"
|
|
52
|
-
],
|
|
53
|
-
"automerge": false
|
|
54
47
|
}
|
|
55
48
|
],
|
|
56
49
|
"labels": [
|
|
@@ -63,8 +56,6 @@
|
|
|
63
56
|
"before 4am on the first day of the month"
|
|
64
57
|
]
|
|
65
58
|
},
|
|
66
|
-
"automerge": true,
|
|
67
|
-
"platformAutomerge": true,
|
|
68
59
|
"osvVulnerabilityAlerts": true,
|
|
69
60
|
"vulnerabilityAlerts": {
|
|
70
61
|
"labels": [
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: karafka-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.6.
|
|
4
|
+
version: 2.6.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maciej Mensfeld
|
|
@@ -51,6 +51,7 @@ files:
|
|
|
51
51
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
52
52
|
- ".github/workflows/ci.yml"
|
|
53
53
|
- ".github/workflows/push.yml"
|
|
54
|
+
- ".github/workflows/sigstore_check.yml"
|
|
54
55
|
- ".github/workflows/trigger-wiki-refresh.yml"
|
|
55
56
|
- ".github/workflows/verify-action-pins.yml"
|
|
56
57
|
- ".gitignore"
|
|
@@ -80,6 +81,7 @@ files:
|
|
|
80
81
|
- lib/karafka/core/contractable/contract.rb
|
|
81
82
|
- lib/karafka/core/contractable/result.rb
|
|
82
83
|
- lib/karafka/core/contractable/rule.rb
|
|
84
|
+
- lib/karafka/core/helpers/kafka/config.rb
|
|
83
85
|
- lib/karafka/core/helpers/minitest_locator.rb
|
|
84
86
|
- lib/karafka/core/helpers/rspec_locator.rb
|
|
85
87
|
- lib/karafka/core/helpers/time.rb
|