ci-queue 0.79.0 → 0.80.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/Gemfile.lock +1 -1
- data/lib/ci/queue/redis/base.rb +1 -1
- data/lib/ci/queue/redis/build_record.rb +1 -1
- data/lib/ci/queue/redis/grind_record.rb +1 -1
- data/lib/ci/queue/redis/key_shortener.rb +53 -0
- data/lib/ci/queue/redis.rb +1 -0
- data/lib/ci/queue/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8f6b51411e322411c49898ac1a082148ca8b584769d8d3e52ddfd87b11cbb96
|
|
4
|
+
data.tar.gz: ee4e4beba8f6d2f97400631f7ac7b47ed8561c2af223e369ad9fcdbe88f4c6e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8f03c40ee904cc069300219ffd71262237de5d291eae1ab682289faae8108f90ec127cbd327b5ea1c0afe9a674e493670e3097922f8848bc3757ebbcb8c38f4
|
|
7
|
+
data.tar.gz: 8c9904ae453b65bd1be76f5cf3c49098f33a2cc1270699ec7569477465ff3c6369931da7e9a2eae789fc1949b07341148d2e8e73276d0362568bd65801fc6723
|
data/Gemfile.lock
CHANGED
data/lib/ci/queue/redis/base.rb
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'digest/md5'
|
|
3
|
+
|
|
4
|
+
module CI
|
|
5
|
+
module Queue
|
|
6
|
+
module Redis
|
|
7
|
+
module KeyShortener
|
|
8
|
+
# Suffix mapping for common key patterns
|
|
9
|
+
SUFFIX_ALIASES = {
|
|
10
|
+
'running' => 'r',
|
|
11
|
+
'processed' => 'p',
|
|
12
|
+
'queue' => 'q',
|
|
13
|
+
'owners' => 'o',
|
|
14
|
+
'error-reports' => 'e',
|
|
15
|
+
'requeues-count' => 'rc',
|
|
16
|
+
'assertions' => 'a',
|
|
17
|
+
'errors' => 'er',
|
|
18
|
+
'failures' => 'f',
|
|
19
|
+
'skips' => 's',
|
|
20
|
+
'requeues' => 'rq',
|
|
21
|
+
'total_time' => 't',
|
|
22
|
+
'test_failed_count' => 'fc',
|
|
23
|
+
'completed' => 'c',
|
|
24
|
+
'master-status' => 'm',
|
|
25
|
+
'created-at' => 'ca',
|
|
26
|
+
'workers' => 'w',
|
|
27
|
+
'worker' => 'w',
|
|
28
|
+
'warnings' => 'wn',
|
|
29
|
+
'worker-errors' => 'we',
|
|
30
|
+
'flaky-reports' => 'fl',
|
|
31
|
+
}.freeze
|
|
32
|
+
|
|
33
|
+
# We're transforming the key to a shorter format to minimize network traffic.
|
|
34
|
+
#
|
|
35
|
+
# Strategy:
|
|
36
|
+
# - Shorten prefix: 'b' instead of 'build'
|
|
37
|
+
# - Hash UUID: 8-char MD5 instead of 36-char UUID
|
|
38
|
+
# - Alias suffixes: single letters instead of full words
|
|
39
|
+
#
|
|
40
|
+
# Example:
|
|
41
|
+
# build:unit:019aef0e-c010-433e-b706-c658d3c16372:running (55 bytes)
|
|
42
|
+
# -> b:f03d3bef:r (13 bytes, 76% reduction)
|
|
43
|
+
|
|
44
|
+
def self.key(build_id, *args)
|
|
45
|
+
digest = Digest::MD5.hexdigest(build_id)[0..7]
|
|
46
|
+
shortened_args = args.map { |arg| SUFFIX_ALIASES[arg] || arg }
|
|
47
|
+
|
|
48
|
+
['b', digest, *shortened_args].join(':')
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
data/lib/ci/queue/redis.rb
CHANGED
data/lib/ci/queue/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ci-queue
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.80.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean Boussier
|
|
@@ -203,6 +203,7 @@ files:
|
|
|
203
203
|
- lib/ci/queue/redis/grind_record.rb
|
|
204
204
|
- lib/ci/queue/redis/grind_supervisor.rb
|
|
205
205
|
- lib/ci/queue/redis/heartbeat.lua
|
|
206
|
+
- lib/ci/queue/redis/key_shortener.rb
|
|
206
207
|
- lib/ci/queue/redis/monitor.rb
|
|
207
208
|
- lib/ci/queue/redis/release.lua
|
|
208
209
|
- lib/ci/queue/redis/requeue.lua
|