kennel 1.66.0 → 1.66.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kennel/syncer.rb +3 -0
- data/lib/kennel/tasks.rb +1 -1
- data/lib/kennel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97bb44fcc344bb6e906a6cd364ccbd8e00cdbe499257b349ed3b30190087fa58
|
4
|
+
data.tar.gz: 17db69d7a4de5599aed07dac93db2563943be29bfa456099f330efd5f0dc2c55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7385074e9d4d3b2e1868f501d74850510f9e6412474a55b8bb3b863c637e02bd4ca2ba065429c1566b86044ef66978e4e4aabff25bb6a3501d22cf388c009f79
|
7
|
+
data.tar.gz: 62c6acd58e137e577016e8f79b690a85ab9637ffab527382e94fdbf07cd752b767371ed468e9413f154c0d8dd61198c105be37a968b86ce814013d84c5ba86c1
|
data/lib/kennel/syncer.rb
CHANGED
@@ -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
|
data/lib/kennel/tasks.rb
CHANGED
@@ -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=
|
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)
|
data/lib/kennel/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|