Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2022.0.0 (2022-09-07)

Switch to calendar-year major version numbers

* Fix elasticsearch-dsl 6.3.0 incompatibility?

## 5.0.0 (2018-11-28)

Changes:
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch_metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from elasticsearch_dsl.connections import connections
from django.utils.module_loading import autodiscover_modules

__version__ = "5.0.0"
__version__ = "2022.0.0"

default_app_config = "elasticsearch_metrics.ElasticsearchMetricsConfig"

Expand Down
6 changes: 5 additions & 1 deletion elasticsearch_metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,12 @@ def check_index_template(cls, using=None):

mappings_in_sync = current_data["mappings"] == template_data["mappings"]
if "settings" in current_data and "index" in current_data["settings"]:
current_settings = current_data["settings"]["index"]
template_settings = template_data.get("settings", {})
current_settings = {
key: value
for key, value in current_data["settings"]["index"]
if key in template_settings
}
# ES automatically casts number_of_shards and number_of_replicas to a string
# so we need to cast before we compare
# TODO: Are there other settings that need to be handled?
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def read(fname):
"metrics",
"statistics",
),
install_requires=["elasticsearch-dsl>=6.0.0,<6.3.0"],
install_requires=["elasticsearch-dsl>=6.3.0,<7.0.0"],
extras_require=EXTRAS_REQUIRE,
classifiers=[
"Operating System :: OS Independent",
Expand Down