Skip to content

Commit

Permalink
kibana: fix sync check for Kibana index pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
simitt committed Nov 20, 2018
1 parent 40d48fa commit 71df85d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion script/are_kibana_saved_objects_updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ def iterate(val_id, key, v1, v2):
for item1, item2 in zip(v1, v2):
ret_val = max(ret_val, iterate(val_id, key, *json_val(item1, item2)))
else:
d = jsondiff.diff(*json_val(v1, v2))
d = jsondiff.JsonDiffer(syntax='symmetric').diff(*json_val(v1, v2))
if d:
if key == "attributes.title":
return ret_val
ret_val = 2
print("Difference for id '{}' for key '{}'".format(val_id, key))
try:
Expand Down Expand Up @@ -126,6 +128,9 @@ def main():
exit_val = max(exit_val, iterate(k["id"], "", s, k))
if exit_val == 0:
print("up-to-date")
if "title" in k["attributes"]:
print("`title` need to be set dynamically, remove it from the index-pattern!")
exit_val = 3

return exit_val

Expand Down

0 comments on commit 71df85d

Please sign in to comment.