kennel 2.23.0 → 2.24.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/lib/kennel/models/monitor.rb +3 -1
- data/lib/kennel/models/slo.rb +7 -0
- data/lib/kennel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7aa1a80ee02f8f528d79075c83293405c2cd1974534211bef8be52c2ec8c7a33
|
|
4
|
+
data.tar.gz: 869cdbdd20bbdc9d73562a675c37e86aae1c4343a0e008f2874545442b47396e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b279ef955d3f281245173826eb8d57a255dd1abae803f99ce8baf72edc4f622d613d3ec32c81f984a26f8be8e59b6b9cbfe6f2522ce94ff4ab72f5f7ec5ea907
|
|
7
|
+
data.tar.gz: f3dd35dc1ca45cf2fa3f7b14127da6febae75255488f66f3cf1b3a56873a7845848647322d2694d4c11126cb0ff685afa8b2bcafbc9a04fa142cf29eb438da34
|
|
@@ -377,7 +377,9 @@ module Kennel
|
|
|
377
377
|
return unless (match = data.fetch(:query).match(/(?:{([^}]*)}\s*)?by\s*[({]([^})]+)[})]/))
|
|
378
378
|
|
|
379
379
|
allowed =
|
|
380
|
-
match[1].to_s.split(/\s*,\s*/)
|
|
380
|
+
match[1].to_s.split(/\s*,\s*/)
|
|
381
|
+
.reject { |k| k.start_with?("!") } # {!a:b} does not pin a value, so a.name is not available
|
|
382
|
+
.map { |k| k.split(":", 2)[-2] } + # {a:b} -> a TODO: does not work for service check
|
|
381
383
|
match[2].to_s.gsub(/["']/, "").split(/\s*,\s*/) # by {a} -> a
|
|
382
384
|
|
|
383
385
|
return if allowed.include?("*")
|
data/lib/kennel/models/slo.rb
CHANGED
|
@@ -79,6 +79,13 @@ module Kennel
|
|
|
79
79
|
url[/[?&]slo_id=([a-z\d]{10,})/, 1] || url[/\/slo\/([a-z\d]{10,})(:?\/edit)?(\?|$)/, 1]
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
# datadog rejects changing the type in place, so force a re-create
|
|
83
|
+
def allowed_update_error(actual)
|
|
84
|
+
actual_type = actual[:type]
|
|
85
|
+
return if actual_type == type
|
|
86
|
+
"cannot update type from #{actual_type} to #{type}"
|
|
87
|
+
end
|
|
88
|
+
|
|
82
89
|
def resolve_linked_tracking_ids!(id_map, **args)
|
|
83
90
|
return unless (ids = as_json[:monitor_ids]) # ignore_default can remove it
|
|
84
91
|
as_json[:monitor_ids] = ids.map do |id|
|
data/lib/kennel/version.rb
CHANGED