kennel 1.66.0 → 1.66.1

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: 0bfed774a67cfbd29eea6800403e1a61c16a182e96ea69fe730770c2e4fa392c
4
- data.tar.gz: 2bd236d4dc087fc81e39282d5b7efa26b3422565fd75a62a601966a02a6c8a8c
3
+ metadata.gz: 97bb44fcc344bb6e906a6cd364ccbd8e00cdbe499257b349ed3b30190087fa58
4
+ data.tar.gz: 17db69d7a4de5599aed07dac93db2563943be29bfa456099f330efd5f0dc2c55
5
5
  SHA512:
6
- metadata.gz: 47944bbb4119eb15b998aaacafa53a2738b18031017ba8b0688f5470ce4067e263360f77b9ebd18348398ce328fb75b99ed5805a2ab3d4df56e6fb38180aa955
7
- data.tar.gz: 575bc37d35aec741c6479c1f8370992305f1c8f17058d52cfd257f7f638e3663954c88e5d14cf2d045fcbd6ddd21bb573039032ff6171f3f0e30dc9bf381a840
6
+ metadata.gz: 7385074e9d4d3b2e1868f501d74850510f9e6412474a55b8bb3b863c637e02bd4ca2ba065429c1566b86044ef66978e4e4aabff25bb6a3501d22cf388c009f79
7
+ data.tar.gz: 62c6acd58e137e577016e8f79b690a85ab9637ffab527382e94fdbf07cd752b767371ed468e9413f154c0d8dd61198c105be37a968b86ce814013d84c5ba86c1
@@ -3,6 +3,7 @@ module Kennel
3
3
  class Syncer
4
4
  CACHE_FILE = "tmp/cache/details" # keep in sync with .travis.yml caching
5
5
  TRACKING_FIELDS = [:message, :description].freeze
6
+ DELETE_ORDER = ["dashboard", "slo", "monitor"].freeze # dashboards references monitors + slos, slos reference monitors
6
7
 
7
8
  def initialize(api, expected, project: nil)
8
9
  @api = api
@@ -98,6 +99,8 @@ module Kennel
98
99
  ensure_all_ids_found
99
100
  @create = @expected.map { |e| [nil, e] }
100
101
  end
102
+
103
+ @delete.sort_by! { |_, _, a| DELETE_ORDER.index a.fetch(:api_resource) }
101
104
  end
102
105
 
103
106
  # Make diff work even though we cannot mass-fetch definitions
@@ -113,7 +113,7 @@ namespace :kennel do
113
113
 
114
114
  desc "Convert existing resources to copy-pastable definitions to import existing resources RESOURCE=[dashboard,monitor,slo] ID=1234"
115
115
  task import: :environment do
116
- resource = ENV["RESOURCE"] || Kennel::Tasks.abort("Call with RESOURCE= dashboard or monitor or slo")
116
+ resource = ENV["RESOURCE"] || Kennel::Tasks.abort("Call with RESOURCE=dashboard or monitor or slo")
117
117
  id = ENV["ID"] || Kennel::Tasks.abort("Call with ID=1234")
118
118
  id = Integer(id) if id =~ /^\d+$/ # dashboards can have alphanumeric ids
119
119
  puts Kennel::Importer.new(Kennel.send(:api)).import(resource, id)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.66.0"
3
+ VERSION = "1.66.1"
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: 1.66.0
4
+ version: 1.66.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-21 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday