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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 614aead22d9d8cbf26ce1ebc7d479bb31f639218975724c8d49788205498fc80
4
- data.tar.gz: c74efdd742433b316e89ea90d9bb454995ae6dde9e718058a29291c69f430947
3
+ metadata.gz: 7aa1a80ee02f8f528d79075c83293405c2cd1974534211bef8be52c2ec8c7a33
4
+ data.tar.gz: 869cdbdd20bbdc9d73562a675c37e86aae1c4343a0e008f2874545442b47396e
5
5
  SHA512:
6
- metadata.gz: 5e64729084251aede67228e6d2b610b2dd5a689a574ec47417aaceb31f14d1df6e7cb47b795108763ba0b28498d7db0b97aee5f1ad115949736ce74274b7f5b0
7
- data.tar.gz: bfc68b6992bf396e488b46ce309aab911bd6650fa5c7e8577e7632d18ec1175053f85e89db458b9e7278d560e54a27b05fc3dd2eb830bc9a81089c8d80d62bf9
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*/).map { |k| k.split(":", 2)[-2] } + # {a:b} -> a TODO: does not work for service check
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?("*")
@@ -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|
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "2.23.0"
3
+ VERSION = "2.24.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.0
4
+ version: 2.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser