kennel 1.141.0 → 1.142.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e82dacccbb0c14e8b8bedd9545b782b7405ca057a02724e89aa03f0a624fa3e4
4
- data.tar.gz: f70302b436c823c6cbcb765edbd56da1103b83fadf398c2c904372a8f73b36a7
3
+ metadata.gz: 4d3462f8e8c88a8faab007c9d65f799703152083c59f9b1f726eb7f958efb743
4
+ data.tar.gz: f24f0df2e733292cb32cedfe257cb7393b8403f35585ede6fb008fd9e7668bb4
5
5
  SHA512:
6
- metadata.gz: c34733bc887129a6bda1ebc96898ca46cec0346bb008af8020d4159d23db515de54d8db8813749ba7883c0417b0cecb243a530789a4a99d6aa146679996007aa
7
- data.tar.gz: a7821e5e67899aa71a068bfabbd895f7c69a369a187b7245510fc969a69d4354bad352cfb953f64293140c6282fa21d38f0e8695ab60d9186a19b30faeddd019
6
+ metadata.gz: 75b7f56baabbffc696d44acae8d08277afd499fd1915f1f268a7ffd9010ff9fc6f1ae59c06f54a78d1b3e49829d9ec61f0d98fd16ac00d85ef494451339fe3e2
7
+ data.tar.gz: a5c96201475a76c9712313cbfc1bfbd629f87748d2d8d101dc3413ebc72a5399b18291df8fab64f6162c3e534fda17f6069d12fd380fc2c5e32c635f7a8bab13
data/Readme.md CHANGED
@@ -28,6 +28,7 @@ end
28
28
  class Bar < Kennel::Models::Project
29
29
  defaults(
30
30
  team: -> { Teams::Foo.new }, # use mention and tags from the team
31
+ tags: -> { super() + ["project:bar"] }, # unique tag for all project components
31
32
  parts: -> {
32
33
  [
33
34
  Kennel::Models::Monitor.new(
@@ -4,7 +4,7 @@ module Kennel
4
4
  class Project < Base
5
5
  settings :team, :parts, :tags, :mention, :name, :kennel_id
6
6
  defaults(
7
- tags: -> { ["service:#{kennel_id}"] + team.tags },
7
+ tags: -> { team.tags },
8
8
  mention: -> { team.mention }
9
9
  )
10
10
 
@@ -92,6 +92,14 @@ module Kennel
92
92
  invalid! :tags_are_upper_case, "Tags must not be upper case (bad tags: #{bad_tags.sort.inspect})"
93
93
  end
94
94
 
95
+ # prevent "Invalid payload: The target is incorrect: target must be a positive number between (0.0, 100.0)"
96
+ data[:thresholds]&.each do |threshold|
97
+ target = threshold.fetch(:target)
98
+ if !target || target <= 0 || target >= 100
99
+ invalid! :threshold_target_invalid, "SLO threshold target must be > 0 and < 100"
100
+ end
101
+ end
102
+
95
103
  # warning must be <= critical
96
104
  if data[:thresholds].any? { |t| t[:warning] && t[:warning].to_f <= t[:critical].to_f }
97
105
  invalid! :warning_must_be_gt_critical, "Threshold warning must be greater-than critical value"
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.141.0"
3
+ VERSION = "1.142.0"
4
4
  end
data/template/Readme.md CHANGED
@@ -28,6 +28,7 @@ end
28
28
  class Bar < Kennel::Models::Project
29
29
  defaults(
30
30
  team: -> { Teams::Foo.new }, # use mention and tags from the team
31
+ tags: -> { super() + ["project:bar"] }, # unique tag for all project components
31
32
  parts: -> {
32
33
  [
33
34
  Kennel::Models::Monitor.new(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.141.0
4
+ version: 1.142.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-04 00:00:00.000000000 Z
11
+ date: 2023-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs