Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kibana: fix sync check for Kibana index pattern. #1571

Merged
merged 2 commits into from Nov 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelogs/head.asciidoc
Expand Up @@ -9,3 +9,8 @@ https://github.com/elastic/apm-server/compare/6.5\...master[View commits]
- Set some configuration defaults (setup.template.settings.index.*, logging.metrics.enabled) in code {pull}1494[1494].
- Add `span.sync` property to intake json spec and index field in ES. {pull}1548[1548].
- Make `service.framework` properties optional and nullable {pull}1546[1546].

[float]
==== Bug fixes

- Fix index pattern bundled with Kibana to be in sync with ES template pull{1571}[1571].
7 changes: 6 additions & 1 deletion script/are_kibana_saved_objects_updated.py
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