kennel 2.4.0 → 2.5.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: 3e01b3965b78914228272c6db34282678f7804466ad2ce86bb74937f7ef22be7
4
- data.tar.gz: a40663b9cc2a5a609635ca8507e5f70883716307da3927de7e2d52e8a4f6e522
3
+ metadata.gz: ca7ba16c7952c8b56ba72203c27828ed64cf0b5e927673b7de2e3b132536d318
4
+ data.tar.gz: 77b70544f3be1cda6a21dd24ce5b80eaa9c3f6588d566f46d7c1b43e87bf93e0
5
5
  SHA512:
6
- metadata.gz: a70ca74dafb5e00e3cb02e85aa6a17b50ea86c38779749eca2623758d2eea649b7d708697f27216768f94b401e7f14a16aa3d85c03c9f4d4cae287357f260bc0
7
- data.tar.gz: 6ade52de1bf22e7b5932e017b029a1d46fde06fa7e310d7e482a993d0e6540c64f6123bb7c2b0170e7a94e5a431dde172bac4076afc63b80ed0a68f82292fbe2
6
+ metadata.gz: c773b16cd6f66d0941073c6146578b5e5b011aff2aa83e90dffea2f069912a3afdb14dabc553fb10436089947f056a9aa13797e9ae54ed3e668e2da6c7b1c40c
7
+ data.tar.gz: 8c61dac6e484e8ebba99d7abe758f45e81c56536e6d9c686c57e7dcb6a373c9ff1f2afa7feee583d31722c2969234057aa6e23e52a2685d9e73dade48ae37fc2
data/lib/kennel/tasks.rb CHANGED
@@ -66,18 +66,26 @@ namespace :kennel do
66
66
  Kennel::Tasks.abort "Error during diffing" unless $CHILD_STATUS.success?
67
67
  end
68
68
 
69
- # ideally do this on every run, but it's slow (~1.5s) and brittle (might not find all + might find false-positives)
69
+ # ideally do this on every run, but it's slow (~1.5s) and brittle
70
+ # (might not find all via the matcher + might find false-positives because random emails can also be sent to)
70
71
  # https://help.datadoghq.com/hc/en-us/requests/254114 for automatic validation
72
+ # /monitor/notifications has users+slack+sns so there is lots of overlap and we don't really need sns
73
+ # got a support ticket open to get sns into api/v2 too
71
74
  desc "Verify that all used monitor mentions are valid"
72
75
  task validate_mentions: :environment do
73
- known = Kennel::Api.new
74
- .send(:request, :get, "/monitor/notifications")
75
- .fetch(:handles)
76
- .values
77
- .flatten(1)
76
+ known = []
77
+
78
+ # @slack- @team- @webhook- user-emails
79
+ known += Kennel::Api.new.send(:request, :get, "/api/v2/notifications/handles?group_limit=99999")
80
+ .fetch(:data)
81
+ .flat_map { |d| d.dig(:attributes, :handles) }
78
82
  .map { |v| v.fetch(:value) }
79
83
 
80
- known += ENV["KNOWN"].to_s.split(",")
84
+ # group emails or other 1-off things to ignore
85
+ manual = ENV["KNOWN"].to_s.split(",")
86
+ dupes = (manual & known)
87
+ Kennel::Tasks.abort "KNOWN=#{dupes.join(",")} values are already known and should be removed" if dupes.any?
88
+ known += manual
81
89
 
82
90
  bad = []
83
91
  Dir["generated/**/*.json"].each do |f|
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "2.4.0"
3
+ VERSION = "2.5.0"
4
4
  end
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: 2.4.0
4
+ version: 2.5.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: 2025-10-17 00:00:00.000000000 Z
11
+ date: 2025-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs