You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we have an SLO, which exists in datadog, but not in kennel
we prepare a PR to import that SLO into kennel
rake kennel:update_datadog PROJECT=my_project works, but doesn't add the tracking_id
This is all fine so far. But now comes the problem:
on the same PR, we add a widget to some dashboard, with slo_id: "my_project:my_new_slo"
rake kennel:update_datadog PROJECT=my_projectfails, saying it can't resolve my_project:my_new_slo.
Very hacky fix:
diff --git a/lib/kennel/syncer.rb b/lib/kennel/syncer.rb
index fec037e..82eb87c 100644
--- a/lib/kennel/syncer.rb+++ b/lib/kennel/syncer.rb@@ -105,7 +105,15 @@ module Kennel
# Refuse to "adopt" existing items into kennel while running with a filter (i.e. on a branch).
# Without this, we'd adopt an item, then the next CI run would delete it
# (instead of "unadopting" it).
- e.add_tracking_id unless filter.filtering? && a.fetch(:tracking_id).nil?+ if filter.filtering? && a.fetch(:tracking_id).nil?+ # Eww!+ a[:tracking_id] = e.tracking_id+ resolver.add_actual([a])+ a[:tracking_id] = nil+ else+ e.add_tracking_id+ end+
id = a.fetch(:id)
diff = e.diff(a)
a[:id] = id
The text was updated successfully, but these errors were encountered:
zdrve
changed the title
Can't resolve ID of not-yet-adopting item
Can't resolve ID of not-yet-adopted item
Feb 22, 2023
Example:
rake kennel:update_datadog PROJECT=my_project
works, but doesn't add the tracking_idThis is all fine so far. But now comes the problem:
slo_id: "my_project:my_new_slo"
rake kennel:update_datadog PROJECT=my_project
fails, saying it can't resolvemy_project:my_new_slo
.Very hacky fix:
The text was updated successfully, but these errors were encountered: